git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: git@vger.kernel.org
Cc: Avery Pennarun <apenwarr@gmail.com>
Subject: Re: What's cooking in git.git (Jan 2010, #05; Sat, 16)
Date: Sun, 17 Jan 2010 22:30:49 -0800	[thread overview]
Message-ID: <7vd417udpi.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: 7vljfxa1o6.fsf@alter.siamese.dyndns.org

Junio C Hamano <gitster@pobox.com> writes:

> [Stalled]
>
> * ap/merge-backend-opts (2008-07-18) 6 commits
>  - Document that merge strategies can now take their own options
>  - Extend merge-subtree tests to test -Xsubtree=dir.
>  - Make "subtree" part more orthogonal to the rest of merge-recursive.
>  - Teach git-pull to pass -X<option> to git-merge
>  - git merge -X<option>
>  - git-merge-file --ours, --theirs
>
> "git pull" patch needs sq-then-eval fix to protect it from $IFS
> but otherwise seemed good.

Generally I hate to step in to fix up other's series, especially when I
know that the party responsible for issues is capable enough.  As the
pre-release feature freeze gets closer, however, I sometimes find myself
doing so, and (I repeat) I hate it.

In any case, a squashable update to the "Teach git-pull to pass -X" would
look like this.  Please give it extra set of eyeballs.

diff --git a/git-pull.sh b/git-pull.sh
index 6d961b6..fc3536b 100755
--- a/git-pull.sh
+++ b/git-pull.sh
@@ -68,10 +68,10 @@ do
 		1,-X)
 			usage ;;
 		*,-X)
-			xx="-X $2"
+			xx="-X $(git rev-parse --sq-quote "$2")"
 			shift ;;
 		*,*)
-			xx="$1" ;;
+			xx=$(git rev-parse --sq-quote "$1") ;;
 		esac
 		merge_args="$merge_args$xx "
 		;;
@@ -228,8 +228,15 @@ then
 fi
 
 merge_name=$(git fmt-merge-msg $log_arg <"$GIT_DIR/FETCH_HEAD") || exit
-test true = "$rebase" &&
-	exec git-rebase $diffstat $strategy_args $merge_args --onto $merge_head \
-	${oldremoteref:-$merge_head}
-exec git-merge $diffstat $no_commit $squash $no_ff $ff_only $log_arg $strategy_args $merge_args \
-	"$merge_name" HEAD $merge_head $verbosity
+case "$rebase" in
+true)
+	eval="git-rebase $diffstat $strategy_args $merge_args"
+	eval="$eval --onto $merge_head ${oldremoteref:-$merge_head}"
+	;;
+*)
+	eval="git-merge $diffstat $no_commit $squash $no_ff $ff_only"
+	eval="$eval  $log_arg $strategy_args $merge_args"
+	eval="$eval \"$merge_name\" HEAD $merge_head $verbosity"
+	;;
+esac
+eval "exec $eval"

  parent reply	other threads:[~2010-01-18  6:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-17  2:46 What's cooking in git.git (Jan 2010, #05; Sat, 16) Junio C Hamano
2010-01-17 19:40 ` Jeff King
2010-01-18  3:02 ` Jakub Narebski
2010-01-18  6:30 ` Junio C Hamano [this message]
2010-01-28 21:16   ` Avery Pennarun

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=7vd417udpi.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=apenwarr@gmail.com \
    --cc=git@vger.kernel.org \
    /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).