aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Reuße <seb@wirrsal.net>2015-12-27 11:27:38 +0100
committerJoey Hess <joeyh@joeyh.name>2016-01-22 14:53:09 -0400
commitb86f0a024393cee93d997f61c044edbbfafc53d8 (patch)
treec7d568aabe2bbb75f616e50d6b04e791ad67ee4b
parent5dcc77f507d497fe4023e94a47b6a7a1f1146bce (diff)
downloadgit-remote-gcrypt-b86f0a024393cee93d997f61c044edbbfafc53d8.zip
git-remote-gcrypt-b86f0a024393cee93d997f61c044edbbfafc53d8.tar.gz
git-remote-gcrypt-b86f0a024393cee93d997f61c044edbbfafc53d8.tar.bz2
Fix #20.
When a gcrypt remote is not available, for any reason (network being down, the drive containing it not being mounted, etc), pushing to the remote causes a new repository ID to be created. Instead, we now fail loudly when a remote is unavailable and when the remote ID is already set. https://github.com/bluss/git-remote-gcrypt/issues/20 (cherry picked from commit b46d48af15e0f8b89f2666aff2c045c9306305d6)
-rwxr-xr-xgit-remote-gcrypt7
1 files changed, 6 insertions, 1 deletions
diff --git a/git-remote-gcrypt b/git-remote-gcrypt
index 8d68669..9ca9552 100755
--- a/git-remote-gcrypt
+++ b/git-remote-gcrypt
@@ -505,7 +505,12 @@ ensure_connected()
tmp_manifest="$Tempdir/maniF"
GET "$URL" "$Manifestfile" "$tmp_manifest" 2>/dev/null || {
echo_info "Repository not found: $URL"
- return 0
+ if ! isnull "$Repoid"; then
+ echo_info "..but repository ID is set. Aborting."
+ return 1
+ else
+ return 0
+ fi
}
Did_find_repo=yes