[PATCH] services: Modify cgit-configuration fields

  • Done
  • quality assurance status badge
Details
2 participants
  • Ludovic Courtès
  • Thomas Albers
Owner
unassigned
Submitted by
Thomas Albers
Severity
normal
T
T
Thomas Albers wrote on 8 Aug 2023 18:37
(address . guix-patches@gnu.org)(name . Thomas Albers)(address . thomas@thomaslabs.org)
20230808163710.22801-1-thomas@thomaslabs.org
* gnu/services/cgit.scm (cgit-configuration)[root-readme]: Accept
'file-object' instead of only 'string'
---
gnu/services/cgit.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Toggle diff (15 lines)
diff --git a/gnu/services/cgit.scm b/gnu/services/cgit.scm
index e33cb9e7db..684ab73f76 100644
--- a/gnu/services/cgit.scm
+++ b/gnu/services/cgit.scm
@@ -581,7 +581,7 @@ (define-configuration cgit-configuration
(string "a fast webinterface for the git dscm")
"Text printed below the heading on the repository index page.")
(root-readme
- (string "")
+ (file-object "")
"The content of the file specified with this option will be included
verbatim below the \"about\" link on the repository index page.")
(root-title
--
2.41.0
L
L
Ludovic Courtès wrote on 21 Aug 2023 19:22
(name . Thomas Albers)(address . thomas@thomaslabs.org)(address . 65152@debbugs.gnu.org)
875y588g51.fsf@gnu.org
Hi,

Thomas Albers <thomas@thomaslabs.org> skribis:

Toggle quote (3 lines)
> * gnu/services/cgit.scm (cgit-configuration)[root-readme]: Accept
> 'file-object' instead of only 'string'

[...]

Toggle quote (6 lines)
> (root-readme
> - (string "")
> + (file-object "")
> "The content of the file specified with this option will be included
> verbatim below the \"about\" link on the repository index page.")

I think it’s a good idea but (1) we should preserve backward
compatibility for users passing a string (file contents), and (2) update
the docstrings and its copy in the manual.

Could you send a second version to address these? Let me know if
anything’s unclear.

Thanks,
Ludo’.
T
T
Thomas Albers Raviola wrote on 22 Aug 2023 11:18
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 65152@debbugs.gnu.org)
87a5uj8mfm.fsf@alpha.mail-host-address-is-not-set
Hi,

in this context `file-object' is defined to be either a `file-like'
object or a `string'. As such this wouldn't break backward compatibility
but include a superset of possible values.

Also the original string is not used as the contents of the readme file
but as a file path.

However if you still think something should be changed I can send a
second patch addressing any further issues.

Greetings,
Thomas
L
L
Ludovic Courtès wrote on 9 Sep 2023 12:32
(name . Thomas Albers Raviola)(address . thomas@thomaslabs.org)(address . 65152-done@debbugs.gnu.org)
87sf7nzlg2.fsf_-_@gnu.org
Hi,

Thomas Albers Raviola <thomas@thomaslabs.org> skribis:

Toggle quote (7 lines)
> in this context `file-object' is defined to be either a `file-like'
> object or a `string'. As such this wouldn't break backward compatibility
> but include a superset of possible values.
>
> Also the original string is not used as the contents of the readme file
> but as a file path.

Oh right, my bad, I had misunderstood that. So it’s all good, applied!

Eventually we should probably replace ‘file-object’ by ‘file-like’,
unless there’s a clear use case for passing out-of-band file names (a
use case would be passwords, but probably not ‘README’ files).

Thanks!

Ludo’.
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 65152@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 65152
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch