diff options
author | Csaba Henk <csaba@gluster.com> | 2010-08-28 00:44:56 +0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-08-28 03:47:01 +0400 |
commit | 7ec344d802970782036146e29ba2213e86d49fe1 (patch) | |
tree | f5599405b663d3b7f4bce082852df37215e65c98 /git-filter-branch.sh | |
parent | 515cc0101943b766fde7aa894827119e332ec033 (diff) |
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-x | git-filter-branch.sh | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/git-filter-branch.sh b/git-filter-branch.sh index 88fb0f070e..962a93b586 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 |