1
0
mirror of https://github.com/containers/skopeo.git synced 2025-05-08 07:56:18 +00:00

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
git)
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 clone --quiet --updaterev "$rev" "$url" "$target"