Re: [PATCH 5/5] rebase -i: avoid exporting GIT_AUTHOR_* variables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Wed, 26 Sep 2007, Johannes Sixt wrote:

> Johannes Schindelin schrieb:
> > diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
> > index 445a299..e3e89dd 100755
> > --- a/git-rebase--interactive.sh
> > +++ b/git-rebase--interactive.sh
> > @@ -174,7 +174,11 @@ pick_one_preserving_merges () {
> >  			eval "$author_script"
> >  			msg="$(git cat-file commit $sha1 | sed -e '1,/^$/d')"
> >  			# NEEDSWORK: give rerere a chance
> > -			if ! output git merge $STRATEGY -m "$msg"
> > $new_parents
> > +			if ! GIT_AUTHOR_NAME="$GIT_AUTHOR_NAME" \
> > +				GIT_AUTHOR_EMAIL="$GIT_AUTHOR_EMAIL" \
> > +				GIT_AUTHOR_DATE="$GIT_AUTHOR_DATE" \
> > +				output git merge $STRATEGY -m "$msg" \
> > +					$new_parents
> >  			then
> >  				printf "%s\n" "$msg" > "$GIT_DIR"/MERGE_MSG
> >  				die Error redoing merge $sha1
> > @@ -281,7 +285,9 @@ do_next () {
> >  		f)
> >  			# This is like --amend, but with a different message
> >  			eval "$author_script"
> > -			export GIT_AUTHOR_NAME GIT_AUTHOR_EMAIL
> > GIT_AUTHOR_DATE
> > +			GIT_AUTHOR_NAME="$GIT_AUTHOR_NAME" \
> > +			GIT_AUTHOR_EMAIL="$GIT_AUTHOR_EMAIL" \
> > +			GIT_AUTHOR_DATE="$GIT_AUTHOR_DATE" \
> >  			$USE_OUTPUT git commit -F "$MSG" $EDIT_COMMIT
> >  			;;
> >  		t)
> 
> According to Herbert Xu's recent post
> (http://article.gmane.org/gmane.comp.version-control.git/59219) this won't
> export the variables in all shells since 'output' is a shell function. :-(

Argh.

You know, I am _so_ close to just scrap it and rewrite it in C.

Ciao,
Dscho

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux