From 7ec344d802970782036146e29ba2213e86d49fe1 Mon Sep 17 00:00:00 2001 From: Csaba Henk Date: Fri, 27 Aug 2010 20:44:56 +0000 Subject: 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 Signed-off-by: Junio C Hamano --- git-filter-branch.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'git-filter-branch.sh') 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 -- cgit v1.2.3