Thread (6 messages) flat view 6 messages, 4 authors, 2016-06-15

Re: [PATCH] pull: require choice between rebase/merge on non-fast-forward pull

From: John Keeping <hidden>
Date: 2016-06-15 22:58:12

Possibly related (same subject, not in this thread)

On Thu, Jun 27, 2013 at 12:48:52PM -0700, Junio C Hamano wrote:
quoted hunk ↗ jump to hunk
diff --git a/git-pull.sh b/git-pull.sh
index 638aabb..4a6a863 100755
--- a/git-pull.sh
+++ b/git-pull.sh
@@ -264,6 +274,30 @@ case "$merge_head" in
 		die "$(gettext "Cannot rebase onto multiple branches")"
 	fi
 	;;
+*)
+	# integrating with a single other history
+	merge_head=${merge_head% }
+	if test -z "$rebase$no_ff$ff_only${squash#--no-squash}" &&
+		test -n "$orig_head" &&
+		! $(git merge-base --is-ancestor "$orig_head" "$merge_head")
I think this needs to be:

	! $(git merge-base --is-ancestor "$orig_head" "$merge_head" ||
	    git merge-base --is-ancestor "$merge_head" "$orig_head")

in order to avoid printing the message when "git pull" does not fetch
any new changes and the user has some new commits.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help