diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2014-01-03 02:16:44 -0500 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2014-01-03 02:16:44 -0500 |
commit | 52cc0c3ff27d4c48d3461d9fd898367aa4a92631 (patch) | |
tree | f4d2b4fcfbc1c6cda116b7723ebe2eee774b0cd6 /src/gitget | |
parent | 3793e4fac9d1d853251e84838caa2b8849d1f32b (diff) | |
parent | 58e2a9cd5aa9a4eb80f8da675685f62aca128eb3 (diff) |
Merge branch 'master' into xbs
Conflicts:
src/lib/conf.sh
Diffstat (limited to 'src/gitget')
-rwxr-xr-x | src/gitget/gitget | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gitget/gitget b/src/gitget/gitget index 256b4e4..194ec05 100755 --- a/src/gitget/gitget +++ b/src/gitget/gitget @@ -191,6 +191,7 @@ main() { *) usage >&2; return 1;; esac done + shift $(($OPTIND - 1)) [[ $# == 3 ]] || { usage >&2; return 1; } local mode=$1 local url=${2#git+} @@ -198,6 +199,9 @@ main() { local urlmain=${url%%#*} local urlfrag=${url#*#} + if [[ "$urlfrag" == "$urlmain" ]]; then + urlfrag='' + fi local ref=${urlfrag#*=} if [[ -z $ref ]]; then |