summaryrefslogtreecommitdiff
path: root/git-filter-branch.sh
diff options
context:
space:
mode:
authorCsaba Henk <csaba@gluster.com>2010-08-27 20:44:56 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-08-27 23:47:01 (GMT)
commit7ec344d802970782036146e29ba2213e86d49fe1 (patch)
treef5599405b663d3b7f4bce082852df37215e65c98 /git-filter-branch.sh
parent515cc0101943b766fde7aa894827119e332ec033 (diff)
downloadgit-7ec344d802970782036146e29ba2213e86d49fe1.zip
git-7ec344d802970782036146e29ba2213e86d49fe1.tar.gz
git-7ec344d802970782036146e29ba2213e86d49fe1.tar.bz2
filter-branch: retire --remap-to-ancestor
We can be clever and know by ourselves when we need the behavior implied by "--remap-to-ancestor". No need to encumber users by having them exposed to it as a tunable. (Option kept for backward compatibility, but it's now a no-op.) Signed-off-by: Csaba Henk <csaba@gluster.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-filter-branch.sh')
-rwxr-xr-xgit-filter-branch.sh10
1 files changed, 9 insertions, 1 deletions
diff --git a/git-filter-branch.sh b/git-filter-branch.sh
index 88fb0f0..962a93b 100755
--- a/git-filter-branch.sh
+++ b/git-filter-branch.sh
@@ -139,6 +139,7 @@ do
continue
;;
--remap-to-ancestor)
+ # deprecated ($remap_to_ancestor is set now automatically)
shift
remap_to_ancestor=t
continue
@@ -265,7 +266,14 @@ mkdir ../map || die "Could not create map/ directory"
# we need "--" only if there are no path arguments in $@
nonrevs=$(git rev-parse --no-revs "$@") || exit
-test -z "$nonrevs" && dashdash=-- || dashdash=
+if test -z "$nonrevs"
+then
+ dashdash=--
+else
+ dashdash=
+ remap_to_ancestor=t
+fi
+
rev_args=$(git rev-parse --revs-only "$@")
case "$filter_subdir" in