提交 0f047f3b 编写于 作者: B Brandon Casey 提交者: Junio C Hamano

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: NBrandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 c41b4392
......@@ -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 ||
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册