]> git.ipfire.org Git - thirdparty/git.git/blobdiff - fetch-pack.c
Documentation: typofix --column description
[thirdparty/git.git] / fetch-pack.c
index 23179b8dd0250a700dec847d0c2916d7a8660917..876f90c759a09334bb4a47575c236d27f2887b98 100644 (file)
@@ -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);
        }