summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
508096a)
Otherwise the commit history gets lost.
die "couldn't extract PK3 contents"
trap 'find "$GIT_WORK_TREE" -mindepth 1 -delete' EXIT
die "couldn't extract PK3 contents"
trap 'find "$GIT_WORK_TREE" -mindepth 1 -delete' EXIT
+# Note the refs and the common ancestor
master=refs/heads/master
ref=refs/heads/$branch
master=refs/heads/master
ref=refs/heads/$branch
+base=$(git merge-base $master $ref 2> /dev/null) ||
+base=$master
# Figure out the parent commit
parent=\
# Figure out the parent commit
parent=\
-$(git rev-parse --verify -q $ref || git rev-parse --verify -q $master) ||
+$(git rev-parse --verify -q $ref || git rev-parse --verify -q $base) ||
die "couldn't determine parent commit"
die "couldn't determine parent commit"
-# Read the tree at master into index
-git read-tree $master ||
+# Read the tree at base into index
+git read-tree $base ||
die "couldn't initialize index"
# Reject any modified files, the mapper should create a branch instead
die "couldn't initialize index"
# Reject any modified files, the mapper should create a branch instead