user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
* [PATCH] config: Honor gitconfig includes
@ 2020-03-29 11:12 Andreas Rottmann
  2020-03-29 17:53 ` Eric Wong
  0 siblings, 1 reply; 2+ messages in thread
From: Andreas Rottmann @ 2020-03-29 11:12 UTC (permalink / raw)
  To: meta

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: [PATCH] config: Honor gitconfig includes --]
[-- Type: text/x-patch, Size: 900 bytes --]

From 90b0eda357905d1940de51c2d830cee477a87394 Mon Sep 17 00:00:00 2001
From: Andreas Rottmann <mail@r0tty.org>
Date: Sun, 29 Mar 2020 12:29:41 +0200
Subject: [PATCH] config: Honor gitconfig includes

This allows for a setup where a central config file for the web server
includes per-user config files.
---
 lib/PublicInbox/Config.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/PublicInbox/Config.pm b/lib/PublicInbox/Config.pm
index 2d663515..917939ca 100644
--- a/lib/PublicInbox/Config.pm
+++ b/lib/PublicInbox/Config.pm
@@ -156,7 +156,7 @@ sub config_fh_parse ($$$) {
 sub git_config_dump {
 	my ($file) = @_;
 	return {} unless -e $file;
-	my @cmd = (qw/git config -z -l/, "--file=$file");
+	my @cmd = (qw/git config -z -l --includes/, "--file=$file");
 	my $cmd = join(' ', @cmd);
 	my $fh = popen_rd(\@cmd);
 	my $rv = config_fh_parse($fh, "\0", "\n");
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] config: Honor gitconfig includes
  2020-03-29 11:12 [PATCH] config: Honor gitconfig includes Andreas Rottmann
@ 2020-03-29 17:53 ` Eric Wong
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Wong @ 2020-03-29 17:53 UTC (permalink / raw)
  To: Andreas Rottmann; +Cc: meta

Andreas Rottmann <mail@r0tty.org> wrote:
> From 90b0eda357905d1940de51c2d830cee477a87394 Mon Sep 17 00:00:00 2001
> From: Andreas Rottmann <mail@r0tty.org>
> Date: Sun, 29 Mar 2020 12:29:41 +0200
> Subject: [PATCH] config: Honor gitconfig includes

Thanks Andreas!

For future reference (for this project, git.git, linux.git,
etc...), there's no need to include the above lines unless
they differ from what's in the headers.

And if they do differ, the "From " line isn't necessary and
"--8<--" can be used for "git am --scissors" compatibility :>


Most everything else looks good and pushed to master as
commit 6d6c6d27dd3ecafd523962dff2170d48a71680cf

Thanks again.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-03-29 17:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-29 11:12 [PATCH] config: Honor gitconfig includes Andreas Rottmann
2020-03-29 17:53 ` Eric Wong

Code repositories for project(s) associated with this public inbox

	https://80x24.org/public-inbox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).