git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Sep 26, 2007, 10:51 UTC
Message-ID
<Pine.LNX.4.64.0709261151300.28395@racer.site>
In-Reply-To
<46FA358E.40500@viscovery.net>
Hi,
On Wed, 26 Sep 2007, Johannes Sixt wrote:
Show 35 quoted lines
> 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

Previous: Johannes SixtNext: Johannes Sixt
Message 8 of 9 in “Two real fixes, two minor fixes, and a style fix”
  1. 0/5 Two real fixes, two minor fixes, and a style fixJohannes Schindelin, Sep 25, 2007
  2. 1/5 rebase -i: commit when continuing after "edit"Johannes Schindelin, Sep 25, 2007
  3. 2/5 rebase -i: style fixes and minor cleanupsJohannes Schindelin, Sep 25, 2007
  4. 3/5 rebase -i: Fix numbers in progress reportJohannes Schindelin, Sep 25, 2007
  5. 4/5 rebase -i: work on a detached HEADJohannes Schindelin, Sep 25, 2007
  6. 5/5 rebase -i: avoid exporting GIT_AUTHOR_* variablesJohannes Schindelin, Sep 25, 2007
  7. Johannes SixtSep 26, 2007
  8. Johannes SchindelinSep 26, 2007
  9. Johannes SixtSep 26, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.