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:
authorCsaba Henk <csaba@gluster.com>2010-08-28 00:31:47 +0400
committerJunio C Hamano <gitster@pobox.com>2010-08-28 03:46:26 +0400
commit0f5cdf653b8be5b8fad3fb2a3eaecfb9da80d215 (patch)
tree8352d2f05f1786546bd2bec9515e4b792e84ee67 /bundle.c
parent64fdc08dac6694d1e754580e7acb82dfa4988bb9 (diff)
bundle: detect if bundle file cannot be created
bundle command silently died with no sign of failure if it could not create the bundle file. (Eg.: its path resovles to a directory, or the parent dir is sticky while file already exists and is owned by someone else.) Signed-off-by: Csaba Henk <csaba@gluster.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'bundle.c')
-rw-r--r--bundle.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/bundle.c b/bundle.c
index ff97adcb89..65ea26bdb8 100644
--- 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;
}