@matheusbsbs / matheus-bagliano / commits / 0f047f3b47
Fork 0

filter-branch: assume HEAD if no revision supplied

filter-branch previously took the first non-option argument as the name for a new branch. Since dfd05e38, it now takes a revision or a revision range and modifies the current branch. Update to operate on HEAD by default to conform with standard git interface practice. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Brandon Casey committed Jan 30, 2008 at 13:33 UTC 0f047f3b47693e8f80a00bcf4af421d9d2fc7efd
1 file changed +1 -2
git-filter-branch.sh
+1 -2
@@ -114,7 +114,6 @@ orig_namespace=refs/original/
114 force=
115 while :
116 do
117 - test $# = 0 && usage
117 case "$1" in
118 --)
119 shift
@@ -213,7 +212,7 @@ GIT_WORK_TREE=.
212 export GIT_DIR GIT_WORK_TREE
213
214 # The refs should be updated if their heads were rewritten
216 -git rev-parse --no-flags --revs-only --symbolic-full-name "$@" |
215 +git rev-parse --no-flags --revs-only --symbolic-full-name --default HEAD "$@" |
216 sed -e '/^^/d' >"$tempdir"/heads
217
218 test -s "$tempdir"/heads ||