From: "J. Bruce Fields" <bfields@fieldses.org>
To: Junio C Hamano <junkio@cox.net>
Cc: git@vger.kernel.org, Xavier Maillard <zedek@gnu.org>
Subject: [PATCH] git-merge: warn when -m provided on a fast forward
Date: Sun, 11 Mar 2007 12:28:56 -0400 [thread overview]
Message-ID: <20070311162856.GB629@fieldses.org> (raw)
In-Reply-To: <20070311160424.GA629@fieldses.org>
Warn the user that the "-m" option is ignored in the case of a fast
forward. That may save some confusion in the case where the user
doesn't know about fast forwards yet and may not realize that the
behavior here is intentional.
Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
---
git-merge.sh | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/git-merge.sh b/git-merge.sh
index 4afcd95..8b6fcf0 100755
--- a/git-merge.sh
+++ b/git-merge.sh
@@ -294,7 +294,12 @@ f,*)
git-update-index --refresh 2>/dev/null
new_head=$(git-rev-parse --verify "$1^0") &&
git-read-tree -v -m -u --exclude-per-directory=.gitignore $head "$new_head" &&
- finish "$new_head" "Fast forward" || exit
+ msg="Fast forward"
+ if test -n "$have_message"
+ then
+ msg="$msg (no commit created; -m option ignored)"
+ fi
+ finish "$new_head" "$msg" || exit
dropsave
exit 0
;;
--
1.5.0.gb75812-dirty
next prev parent reply other threads:[~2007-03-11 16:28 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-11 15:05 git merge and merge message Xavier Maillard
2007-03-11 16:04 ` J. Bruce Fields
2007-03-11 16:28 ` J. Bruce Fields [this message]
2007-03-11 18:15 ` Xavier Maillard
2007-03-11 20:19 ` Linus Torvalds
2007-03-11 20:31 ` Avi Kivity
2007-03-11 21:05 ` Linus Torvalds
2007-03-12 17:26 ` Avi Kivity
2007-03-11 21:41 ` Johannes Schindelin
2007-03-12 2:03 ` Junio C Hamano
2007-03-12 17:31 ` Avi Kivity
2007-03-11 20:56 ` Junio C Hamano
2007-03-13 8:55 ` [RFC] git log --first-parent Junio C Hamano
2007-03-13 14:17 ` Jeff King
2007-03-12 3:07 ` git merge and merge message Martin Langhoff
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=20070311162856.GB629@fieldses.org \
--to=bfields@fieldses.org \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
--cc=zedek@gnu.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).