summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5b2eeed)
raw | patch | inline | side by side (parent: 5b2eeed)
author | Thomas Rast <trast@student.ethz.ch> | |
Tue, 12 Aug 2008 08:45:59 +0000 (10:45 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 13 Aug 2008 00:27:46 +0000 (17:27 -0700) |
Use rev-list --simplify-merges everywhere. This changes the behaviour
of --subdirectory-filter in cases such as
O -- A -\
\ \
\- B -- M
where A and B bring the same changes to the subdirectory: It now keeps
both sides of the merge. Previously, the history would have been
simplified to 'O -- A'. Merges of unrelated side histories that never
touch the subdirectory are still removed.
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
of --subdirectory-filter in cases such as
O -- A -\
\ \
\- B -- M
where A and B bring the same changes to the subdirectory: It now keeps
both sides of the merge. Previously, the history would have been
simplified to 'O -- A'. Merges of unrelated side histories that never
touch the subdirectory are still removed.
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-filter-branch.sh | patch | blob | history |
diff --git a/git-filter-branch.sh b/git-filter-branch.sh
index a140337e3558888f625f9656f7c21ea25f64d8be..2688254af399ddc452b120734d41b41292b0ed69 100755 (executable)
--- a/git-filter-branch.sh
+++ b/git-filter-branch.sh
case "$filter_subdir" in
"")
git rev-list --reverse --topo-order --default HEAD \
- --parents "$@"
+ --parents --simplify-merges "$@"
;;
*)
git rev-list --reverse --topo-order --default HEAD \
- --parents "$@" -- "$filter_subdir"
+ --parents --simplify-merges "$@" -- "$filter_subdir"
esac > ../revs || die "Could not get the commits"
commits=$(wc -l <../revs | tr -d " ")
do
sha1=$(git rev-parse "$ref"^0)
test -f "$workdir"/../map/$sha1 && continue
- ancestor=$(git rev-list -1 $ref -- "$filter_subdir")
+ ancestor=$(git rev-list --simplify-merges -1 \
+ $ref -- "$filter_subdir")
test "$ancestor" && echo $(map $ancestor) >> "$workdir"/../map/$sha1
done < "$tempdir"/heads
fi