Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'mh/packed-ref-store' into next
[gitweb.git]
/
builtin
/
gc.c
diff --git
a/builtin/gc.c
b/builtin/gc.c
index 2ba50a28735eee23887211684e60aaeda81c3e98..e6b84475aef6aeab05beda137fb2882f663fac0f 100644
(file)
--- a/
builtin/gc.c
+++ b/
builtin/gc.c
@@
-414,8
+414,12
@@
int cmd_gc(int argc, const char **argv, const char *prefix)
if (report_last_gc_error())
return -1;
+ if (lock_repo_for_gc(force, &pid))
+ return 0;
if (gc_before_repack())
return -1;
+ delete_tempfile(&pidfile);
+
/*
* failure to daemonize is ok, we'll continue
* in foreground