If called with one argument, check also for no_trivial_merge_strategies whether all the merge can already be reached by HEAD. Otherwise git-merge creates an unnecessary commit, e.g.: $ (git init && touch foo && git add foo && git commit -m foo) >/dev/null $ git merge -s ours master Merge made by ours. $ git log --pretty=oneline d941346f022b7cb70c51d8122de4ae82657ae943 Merge branch 'master' 68a1d32229917d5d1f4c8f64096d1abde84e9f6b foo $ Signed-off-by: Gerrit Pape <pape@smarden.org> --- git-merge.sh | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/git-merge.sh b/git-merge.sh index 5ccf282..e90f62a 100755 --- a/git-merge.sh +++ b/git-merge.sh @@ -287,9 +287,6 @@ esac echo "$head" >"$GIT_DIR/ORIG_HEAD" case "$index_merge,$#,$common,$no_commit" in -f,*) - # We've been told not to try anything clever. Skip to real merge. - ;; ?,*,'',*) # No common ancestors found. We need a real merge. ;; @@ -299,6 +296,9 @@ f,*) finish_up_to_date "Already up-to-date." exit 0 ;; +f,*) + # We've been told not to try anything clever. Skip to real merge. + ;; ?,1,"$head",*) # Again the most common case of merging one remote. echo "Updating $(git rev-parse --short $head)..$(git rev-parse --short $1)" -- debian.1.5.3_rc4.1-dirty - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
| Ingo Molnar | [patch 02/13] syslets: add syslet.h include file, user API/ABI definitions |
| Heiko Carstens | Re: 2.6.25-rc6-git6: Reported regressions from 2.6.24 |
| Greg Kroah-Hartman | [PATCH 010/196] Chinese: add translation of Codingstyle |
| Rafael J. Wysocki | [Bug #10629] 2.6.26-rc1-$sha1: RIP __d_lookup+0x8c/0x160 |
git: | |
| Gerrit Renker | [PATCH 0/37] dccp: Feature negotiation - last call for comments |
| Linus Torvalds | Re: [GIT]: Networking |
| Mark Lord | Re: [BUG] New Kernel Bugs |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
