Re: [PATCH RFC] new config option remote.<name>.pushexec
- From
Uwe Kleine-König <zeisberg@informatik.uni-freiburg.de>
- Date
- Jan 18, 2007, 07:17 UTC
- Message-ID
- <20070118071723.GB3245@informatik.uni-freiburg.de>
- In-Reply-To
- <7vps9dsgn0.fsf@assigned-by-dhcp.cox.net>
Hello Junio,
Junio C Hamano wrote:
Show 8 quoted lines
> Uwe Kleine-König <zeisberg@informatik.uni-freiburg.de> writes: > > > I tried to do the symmetric part for fetch, but that shell script is too > > complicated for me and so I let this part to s.o. being more familiar > > with git-fetch.sh. > > I do not know what s.o. is but something like this untested > patch would do.
s.o. = someone, I thought it's a usual abbreviation.
Show 5 quoted lines
> I do not have strong objection to the configuration on the push > side, but I am not sure if we want to call it pushexec -- it is > naming receive-pack so remote.*.receivepack might be more > appropriate, just in case we update the fetch/push protocol > someday to run more than one program on the other end.
I wondered about that, too. In the docs we currently have:
git-send-pack ... [--exec=<git-receive-pack>] git-fetch-pack ... [--exec=<git-upload-pack>] git-push ... [--exec=<receive-pack>] git-pull ... [--upload-pack <upload-pack>] git-fetch ... [--upload-pack <upload-pack>]
I have choosen 'pushexec' because that's the name of the option to push. remote.*.receivepack is cleaner, as is
git-push ... [--receive-pack=...]
. If we choose remote.*.receivepack, we should consider deprecating --exec and introduce --receive-pack (--upload-pack resp.)
Show 18 quoted lines
> diff --git a/git-fetch.sh b/git-fetch.sh > index 87b940b..7372c5f 100755 > --- a/git-fetch.sh > +++ b/git-fetch.sh > @@ -82,6 +82,13 @@ case "$#" in > set x $origin ; shift ;; > esac > > +if test -z "$exec" && exec=$(git-repo-config "remote.$1.uploadpack") > +then > + # No command line override and we have configuration for the remote. > + upload_pack="-u $exec" > + exec="--exec=$exec" > +fi > + > remote_nick="$1" > remote=$(get_remote_url "$@") > refs=
I thought that it would be cleaner to add this code to git-parse-remote.sh and only do it if $(get_data_source) == 'config'. But it's OK for me this way, too.
Best regards Uwe
-- Uwe Kleine-König If a lawyer and an IRS agent were both drowning, and you could only save one of them, would you go to lunch or read the paper?