chiark
/
gitweb
/
~ian
/
topbloke.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
do not tolerate tb metadata in foreign branches
[topbloke.git]
/
topbloke-merge-driver
diff --git
a/topbloke-merge-driver
b/topbloke-merge-driver
index 72c749d5b389dcbf8fa95817880ff67a13992ace..a3d199920bac4a2e952859b9562886aac5a94338 100755
(executable)
--- a/
topbloke-merge-driver
+++ b/
topbloke-merge-driver
@@
-4,36
+4,42
@@
set -e
fail () { echo >&2 "$0: $*"; exit 127; }
case "$1" in
fail () { echo >&2 "$0: $*"; exit 127; }
case "$1" in
---v1) how=tip ;;
---v1-base) how=base ;;
---v1-dep) how=dep ;;
+--v1) how=same ;; # merge into tip from another tip of this patch
+ # or into base from another base of this patch
+--v1-base) how=base ;; # merge into tip from a base of this patch
+--v1-dep) how=dep ;; # merge into base from a dep's tip
*) fail "bad usage" ;;
esac
whichfile=$1
ancestor=$2
*) fail "bad usage" ;;
esac
whichfile=$1
ancestor=$2
-
current
=$3
-
other
=$4
+
ours
=$3
+
theirs
=$4
markersize=$5
markersize=$5
+set -- "$ours" "$ancestor" "$theirs"
+
case $on.$whichfile in
case $on.$whichfile in
-dep.msg|dep.deps|dep.flags)
- touch "$current"
- exit 0
+dep.msg|dep.deps|dep.props)
+ touch "$ours"
+ ;;
+base.msg)
+ echo '# not applicable' >"$ours"
+base.deps)
+ echo >"$ours"
+ touch >"$ours"
;;
;;
-base.msg|base.deps)
- echo '# not applicable' >"$current"
- exit 0
+base.props)
+ exec topbloke-merge-lists -M$markersize -P -UDeleted "$@"
;;
;;
-
base.flags
)
- exec
topbloke-merge-lists -UDeleted "$current" "$ancestor" "$other
"
+
same.msg
)
+ exec
git-merge-file --marker-size=$markersize "$@
"
;;
;;
-tip.msg)
- exec git-merge-file --marker-size=$markersize \
- "$current" "$ancestor" "$other"
+same.deps|*.included)
+ exec topbloke-merge-lists -M$markersize "$@"
;;
;;
-
tip.deps|tip.flags|*.included|*.pflag
s)
- exec topbloke-merge-lists
"$current" "$ancestor" "$other
"
+
same.props|*.pprop
s)
+ exec topbloke-merge-lists
-M$markersize -P "$@
"
;;
*)
fail "huh $on $whichfile ?"
;;
*)
fail "huh $on $whichfile ?"