From: Johannes Schindelin <johannes.schindelin@gmx.de>
As the scripted version of git-commit did, we now call gc --auto just
before the post-commit hook.
Any errors of gc --auto should be non-fatal, so we do not catch those; the
user should see them anyway.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
Junio wrote:
>
> * "git commit" used to have one [call to 'gc --auto'] at the
> end in the scripted version, but seems to have lost it in C
> rewrite.
How about this?
builtin-commit.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/builtin-commit.c b/builtin-commit.c
index 660a345..bec62b2 100644
--- a/builtin-commit.c
+++ b/builtin-commit.c
@@ -863,6 +863,7 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
char *nl, *p;
unsigned char commit_sha1[20];
struct ref_lock *ref_lock;
+ const char *argv_gc_auto[] = { "gc", "--auto", NULL };
git_config(git_commit_config);
@@ -987,6 +988,8 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
"not exceeded, and then \"git reset HEAD\" to recover.");
rerere();
+ /* We ignore errors in 'gc --auto', since the user should see them. */
+ run_command_v_opt(argv_gc_auto, RUN_GIT_CMD);
run_hook(get_index_file(), "post-commit", NULL);
if (!quiet)
print_summary(prefix, commit_sha1);
--
1.5.5.rc2.30.gf2056
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html| Ian Campbell | Re: [PATCH] x86: Construct 32 bit boot time page tables in native format. |
| Greg Kroah-Hartman | [PATCH 001/196] Chinese: Add the known_regression URI to the HOWTO |
| Justin Piszcz | Linux Software RAID 5 Performance Optimizations: 2.6.19.1: (211MB/s read & 195... |
| Alan | Re: [RFC] Heads up on sys_fallocate() |
| Matthias Scheler | Re: HEADS UP: timecounters (branch simonb-timecounters) merged into -current |
| David Laight | long usernames |
| Quentin Garnier | Re: Understanding foo_open, foo_read, etc. |
| Jared D. McNeill | Breaking binary compatibility for /dev/joy |
git: | |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Gerrit Renker | [PATCH 0/37] dccp: Feature negotiation - last call for comments |
| David Miller | [GIT]: Networking |
| Natalie Protasevich | [BUG] New Kernel Bugs |
