Fix an ambiguity in (git reset)

This is necessary to be able to check out a branch named "clone",
otherwise we get
> fatal: ambiguous argument 'copy': both revision and filename
This commit is contained in:
Miloslav Trmač 2016-08-24 20:39:16 +02:00
parent d24cdcbcf3
commit 7c17614143

View File

@ -36,7 +36,7 @@ clone() {
case "$vcs" in case "$vcs" in
git) git)
git clone --quiet --no-checkout "$url" "$target" git clone --quiet --no-checkout "$url" "$target"
( cd "$target" && git checkout --quiet "$rev" && git reset --quiet --hard "$rev" ) ( cd "$target" && git checkout --quiet "$rev" && git reset --quiet --hard "$rev" -- )
;; ;;
hg) hg)
hg clone --quiet --updaterev "$rev" "$url" "$target" hg clone --quiet --updaterev "$rev" "$url" "$target"