]> git.ipfire.org Git - thirdparty/git.git/blobdiff - bundle.c
Subject: setup: officially support --work-tree without --git-dir
[thirdparty/git.git] / bundle.c
index ff97adcb891caf98dcc655e71e29eaec5dae0135..65ea26bdb8c2cef671030c3a62d87d84612e8144 100644 (file)
--- a/bundle.c
+++ b/bundle.c
@@ -372,8 +372,10 @@ int create_bundle(struct bundle_header *header, const char *path,
        close(rls.in);
        if (finish_command(&rls))
                return error ("pack-objects died");
-       if (!bundle_to_stdout)
-               commit_lock_file(&lock);
+       if (!bundle_to_stdout) {
+               if (commit_lock_file(&lock))
+                       die_errno("cannot create '%s'", path);
+       }
        return 0;
 }