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:
-rw-r--r--fetch-pack.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fetch-pack.c b/fetch-pack.c
index 23179b8dd0..876f90c759 100644
--- a/fetch-pack.c
+++ b/fetch-pack.c
@@ -918,8 +918,9 @@ static int get_pack(struct fetch_pack_args *args,
if (start_command(&cmd))
die(_("fetch-pack: unable to fork off %s"), cmd_name);
if (do_keep && pack_lockfiles) {
- string_list_append_nodup(pack_lockfiles,
- index_pack_lockfile(cmd.out));
+ char *pack_lockfile = index_pack_lockfile(cmd.out);
+ if (pack_lockfile)
+ string_list_append_nodup(pack_lockfiles, pack_lockfile);
close(cmd.out);
}