Web lists-archives.com

Re: [PATCH] builtin/send-pack: populate the default configs


Masaya Suzuki wrote:

> builtin/send-pack didn't call git_default_config, and because of this
> git push --signed didn't respect the username and email in gitconfig in
> the HTTP transport.
> Signed-off-by: Masaya Suzuki <masayasuzuki@xxxxxxxxxx>
> ---
>  builtin/send-pack.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Do you have a set of commands I can run to reproduce this?  Bonus
points if they're in the form of a patch to t/, but commands I can
manually run would be fine, too.

> --- a/builtin/send-pack.c
> +++ b/builtin/send-pack.c
> @@ -121,7 +121,7 @@ static int send_pack_config(const char *k, const char *v, void *cb)
>  			}
>  		}
>  	}
> -	return 0;
> +	return git_default_config(k, v, cb);

send-pack is not a command served by a daemon so this is less
potentially scary than the corresponding potential change to
upload-pack or receive-pack.  Some configuration this brings in:

- core.askpass: allows specifying an arbitrary command to use to
  ask for a password.  Respecting this setting should be very useful,
  even if it would be scary in a daemon.

- core.pager: allows specifying an arbitrary command to use as a
  pager, if pagination is on (but it shouldn't be on).
- core.logallrefupdates: whether to create reflogs for new refs
  (including new remote-tracking refs). Good.
- core.abbrev: what length of abbreviations to use when printing
  abbreviated object ids (good).
- core.compression, core.packedgitwindowsize, etc: pack generation
  tunables (good).
- advice.*: would allow us to make "git push" produce configurable
  advice (good!)
- etc

So it looks like a very good change.  Thanks for writing it.

Reviewed-by: Jonathan Nieder <jrnieder@xxxxxxxxx>