diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2017-04-19 17:53:19 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2017-04-19 18:25:12 -0400 |
commit | 243b4c911e10060ab11c1d759d4100c92cdda9d9 (patch) | |
tree | a7a0e13012b63d03da83dc1df0e57cceb1fc41d2 /src/gitget | |
parent | d792dad1b0636234894f704e9222ddebe84f336f (diff) |
gitget: correctly handle the -f[orce] flag on bare repositories
Diffstat (limited to 'src/gitget')
-rwxr-xr-x | src/gitget/gitget | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/gitget/gitget b/src/gitget/gitget index 4d127c7..c941441 100755 --- a/src/gitget/gitget +++ b/src/gitget/gitget @@ -116,9 +116,13 @@ download_git_bare() { cd_safe "$dir" # Make sure we are fetching the right repo if [[ "$url" != "$(git config --get remote.origin.url)" ]] ; then - error "%s is not a clone of %s" "$dir" "$url" - plain "Aborting..." - exit 1 + if $FORCE; then + git config remote.origin.url "$url" + else + error "%s is not a clone of %s" "$dir" "$url" + plain "Aborting..." + exit 1 + fi fi if [[ -n $push ]] ; then if $FORCE; then |