summaryrefslogtreecommitdiff
path: root/git-filter-branch.sh
diff options
context:
space:
mode:
authorBrandon Casey <casey@nrlssc.navy.mil>2008-01-30 19:33:04 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-01-31 02:50:25 (GMT)
commit0f047f3b47693e8f80a00bcf4af421d9d2fc7efd (patch)
tree218e083b2f163dd09a13396d1a7e7e2a97794c64 /git-filter-branch.sh
parentc41b439244c51b30c60953192816afc91e552578 (diff)
downloadgit-0f047f3b47693e8f80a00bcf4af421d9d2fc7efd.zip
git-0f047f3b47693e8f80a00bcf4af421d9d2fc7efd.tar.gz
git-0f047f3b47693e8f80a00bcf4af421d9d2fc7efd.tar.bz2
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>
Diffstat (limited to 'git-filter-branch.sh')
-rwxr-xr-xgit-filter-branch.sh3
1 files changed, 1 insertions, 2 deletions
diff --git a/git-filter-branch.sh b/git-filter-branch.sh
index 753bf50..ed54e20 100755
--- a/git-filter-branch.sh
+++ b/git-filter-branch.sh
@@ -114,7 +114,6 @@ orig_namespace=refs/original/
force=
while :
do
- test $# = 0 && usage
case "$1" in
--)
shift
@@ -213,7 +212,7 @@ GIT_WORK_TREE=.
export GIT_DIR GIT_WORK_TREE
# The refs should be updated if their heads were rewritten
-git rev-parse --no-flags --revs-only --symbolic-full-name "$@" |
+git rev-parse --no-flags --revs-only --symbolic-full-name --default HEAD "$@" |
sed -e '/^^/d' >"$tempdir"/heads
test -s "$tempdir"/heads ||