git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Sixt <j.sixt@viscovery.net>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: git@vger.kernel.org, gitster@pobox.com
Subject: Re: [PATCH 5/5] rebase -i: avoid exporting GIT_AUTHOR_* variables
Date: Wed, 26 Sep 2007 12:33:50 +0200	[thread overview]
Message-ID: <46FA358E.40500@viscovery.net> (raw)
In-Reply-To: <Pine.LNX.4.64.0709251643310.28395@racer.site>

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. :-(

-- Hannes

  reply	other threads:[~2007-09-26 10:34 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-25 15:42 [PATCH 0/5] Two real fixes, two minor fixes, and a style fix Johannes Schindelin
2007-09-25 15:42 ` [PATCH 1/5] rebase -i: commit when continuing after "edit" Johannes Schindelin
2007-09-25 15:42 ` [PATCH 2/5] rebase -i: style fixes and minor cleanups Johannes Schindelin
2007-09-25 15:43 ` [PATCH 3/5] rebase -i: Fix numbers in progress report Johannes Schindelin
2007-09-25 15:43 ` [PATCH 4/5] rebase -i: work on a detached HEAD Johannes Schindelin
2007-09-25 15:43 ` [PATCH 5/5] rebase -i: avoid exporting GIT_AUTHOR_* variables Johannes Schindelin
2007-09-26 10:33   ` Johannes Sixt [this message]
2007-09-26 10:51     ` Johannes Schindelin
     [not found]     ` <86zlz9smqr.fsf@lola.quinscape.zz>
2007-09-26 11:18       ` Johannes Sixt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46FA358E.40500@viscovery.net \
    --to=j.sixt@viscovery.net \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 NNTP newsgroup(s).