]> git.ipfire.org Git - thirdparty/git.git/blobdiff - git-remote-testgit.sh
doc: convert \--option to --option
[thirdparty/git.git] / git-remote-testgit.sh
index a9c75a2360fec7a9ce5f22877a471f70bc405ff1..752c763eb666e197304efbc7ea006325a36ff870 100755 (executable)
@@ -1,7 +1,13 @@
 #!/bin/sh
 # Copyright (c) 2012 Felipe Contreras
 
-alias=$1
+# The first argument can be a url when the fetch/push command was a url
+# instead of a configured remote. In this case, use a generic alias.
+if test "$1" = "testgit::$2"; then
+       alias=_
+else
+       alias=$1
+fi
 url=$2
 
 dir="$GIT_DIR/testgit/$alias"