Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'upload-pack.c')
-rw-r--r--upload-pack.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/upload-pack.c b/upload-pack.c
index 3cdf4288b8..635abb371d 100644
--- a/upload-pack.c
+++ b/upload-pack.c
@@ -221,6 +221,9 @@ static int send_ref(const char *refname, const unsigned char *sha1)
static char *capabilities = "multi_ack thin-pack";
struct object *o = parse_object(sha1);
+ if (!o)
+ die("git-upload-pack: cannot find object %s:", sha1_to_hex(sha1));
+
if (capabilities)
packet_write(1, "%s %s%c%s\n", sha1_to_hex(sha1), refname,
0, capabilities);