summaryrefslogtreecommitdiff
path: root/src/gitget
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2013-11-02 15:12:44 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2013-11-02 15:12:44 -0400
commitf53edae7f21b36f6e7f47af6c42fad35371c5622 (patch)
tree6dbd934220df4f2aa95ce0df2e22bb423d256f78 /src/gitget
parented02bca748ef72df528d6749e9b384862d320492 (diff)
gitget: handle ref not being set
Diffstat (limited to 'src/gitget')
-rwxr-xr-xsrc/gitget/gitget4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gitget/gitget b/src/gitget/gitget
index 461dffc..256b4e4 100755
--- a/src/gitget/gitget
+++ b/src/gitget/gitget
@@ -200,6 +200,10 @@ main() {
local urlfrag=${url#*#}
local ref=${urlfrag#*=}
+ if [[ -z $ref ]]; then
+ ref=master
+ fi
+
name=${name:-${dir##*/}}
case "$mode" in