summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 123ee3c)
raw | patch | inline | side by side (parent: 123ee3c)
author | Junio C Hamano <junkio@cox.net> | |
Wed, 2 Nov 2005 03:34:49 +0000 (19:34 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Thu, 3 Nov 2005 22:55:10 +0000 (14:55 -0800) |
This adds the coolest merge strategy ever, "ours". It can take
arbitrary number of foreign heads and merge them into the
current branch, with the resulting tree always taken from our
branch head, hence its name.
What this means is that you can declare that the current branch
supersedes the development histories of other branches using
this merge strategy.
Signed-off-by: Junio C Hamano <junkio@cox.net>
arbitrary number of foreign heads and merge them into the
current branch, with the resulting tree always taken from our
branch head, hence its name.
What this means is that you can declare that the current branch
supersedes the development histories of other branches using
this merge strategy.
Signed-off-by: Junio C Hamano <junkio@cox.net>
.gitignore | patch | blob | history | |
Makefile | patch | blob | history | |
git-merge-ours.sh | [new file with mode: 0755] | patch | blob |
git-merge.sh | patch | blob | history |
diff --git a/.gitignore b/.gitignore
index 927c89cbacccf39f12979d02f6f9f473ac13e8e4..3edf6b41afe453130a3e7215991c6e2cd8dc57d7 100644 (file)
--- a/.gitignore
+++ b/.gitignore
git-merge-index
git-merge-octopus
git-merge-one-file
+git-merge-ours
git-merge-recursive
git-merge-resolve
git-merge-stupid
diff --git a/Makefile b/Makefile
index be6101ab23054c0af581f6d5cddb5c246304c7b1..6c01dc29537a7926f1e57c4fe115334c4cdc036c 100644 (file)
--- a/Makefile
+++ b/Makefile
git-tag.sh git-verify-tag.sh git-whatchanged.sh git.sh \
git-applymbox.sh git-applypatch.sh git-am.sh \
git-merge.sh git-merge-stupid.sh git-merge-octopus.sh \
- git-merge-resolve.sh git-grep.sh
+ git-merge-resolve.sh git-merge-ours.sh git-grep.sh
SCRIPT_PERL = \
git-archimport.perl git-cvsimport.perl git-relink.perl \
diff --git a/git-merge-ours.sh b/git-merge-ours.sh
--- /dev/null
+++ b/git-merge-ours.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+#
+# Copyright (c) 2005 Junio C Hamano
+#
+# Pretend we resolved the heads, but declare our tree trumps everybody else.
+#
+exit 0
diff --git a/git-merge.sh b/git-merge.sh
index dd104db7ad5991543b1156e142173e40b0ff05bc..b810fceaf8787f6c450abc628d0a329fe298b13f 100755 (executable)
--- a/git-merge.sh
+++ b/git-merge.sh
# all_strategies='resolve recursive stupid octopus'
-all_strategies='recursive octopus resolve stupid'
+all_strategies='recursive octopus resolve stupid ours'
default_strategies='resolve octopus'
use_strategies=