{"thread":{"id":"18457","subject":"[PATCH] Invoke \"git gc --auto\" when a commit is successful.","startedAt":"2009-03-21T22:34:54Z","lastAt":"2009-03-21T23:37:19Z","messageCount":3,"participants":["David J. Mellor","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"108845","messageId":"1237674894-8151-1-git-send-email-dmellor@whistlingcat.com","threadId":"18457","inReplyTo":null,"subject":"[PATCH] Invoke \"git gc --auto\" when a commit is successful.","fromName":"David J. Mellor","fromEmail":"dmellor@whistlingcat.com","sentAt":"2009-03-21T22:34:54Z","receivedAt":"2009-03-21T22:34:54Z","isPatch":true,"sender":{"key":"dmellor@whistlingcat.com","avatar":"https://gravatar.com/avatar/f21761ecb54023bce07527c3841f614f96a4a182b8b3e7cad4d836e4af4ebe9a?d=mp&s=160"},"body":"This functionality was added to the previous git-commit.sh script in d4bb43e,\nbut omitted when the script was ported to C in f5bbc32. This patch reinstates\nthe functionality by copying the equivalent code that was introduced in\nbuiltin-merge.c in 1c7b76b.\n\nSigned-off-by: David J. Mellor <dmellor@whistlingcat.com>\n---\n builtin-commit.c |    7 +++++++\n 1 files changed, 7 insertions(+), 0 deletions(-)\n\ndiff --git a/builtin-commit.c b/builtin-commit.c\nindex 46e649c..780c142 100644\n--- a/builtin-commit.c\n+++ b/builtin-commit.c\n@@ -1029,5 +1029,12 @@ int cmd_commit(int argc, const char **argv, const char *prefix)\n \tif (!quiet)\n \t\tprint_summary(prefix, commit_sha1);\n \n+\t/*\n+\t * Perform an automatic garbage collection if the commit was successful.\n+\t * We ignore errors in 'gc --auto', since the user should see them.\n+\t */\n+\tconst char *argv_gc_auto[] = { \"gc\", \"--auto\", NULL };\n+\trun_command_v_opt(argv_gc_auto, RUN_GIT_CMD);\n+\n \treturn 0;\n }\n-- \n1.6.2.1\n"},{"id":"108852","messageId":"7viqm2bgou.fsf@gitster.siamese.dyndns.org","threadId":"18457","inReplyTo":"1237674894-8151-1-git-send-email-dmellor@whistlingcat.com","subject":"Re: [PATCH] Invoke \"git gc --auto\" when a commit is successful.","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-03-21T23:26:57Z","receivedAt":"2009-03-21T23:26:57Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"I do not think situation has changed since the previous round:\n\n    http://thread.gmane.org/gmane.comp.version-control.git/78524/focus=82130\n"},{"id":"108854","messageId":"49C57A2F.6010709@whistlingcat.com","threadId":"18457","inReplyTo":"7viqm2bgou.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] Invoke \"git gc --auto\" when a commit is successful.","fromName":"David J. Mellor","fromEmail":"dmellor@whistlingcat.com","sentAt":"2009-03-21T23:37:19Z","receivedAt":"2009-03-21T23:37:19Z","isPatch":true,"sender":{"key":"dmellor@whistlingcat.com","avatar":"https://gravatar.com/avatar/f21761ecb54023bce07527c3841f614f96a4a182b8b3e7cad4d836e4af4ebe9a?d=mp&s=160"},"body":"On 03/21/2009 04:26 PM, Junio C Hamano wrote:\n> I do not think situation has changed since the previous round:\n> \n>     http://thread.gmane.org/gmane.comp.version-control.git/78524/focus=82130\n> \n> \nThanks for the pointer. I had searched the list before coding this up, \nbut somehow had missed this thread.\n"}]}