From: Junio C Hamano <gitster@pobox.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] commit: run git gc --auto just before the pre-commit hook
Date: Wed, 28 Feb 2018 14:29:43 -0800 [thread overview]
Message-ID: <xmqqzi3siw88.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <20180228221358.16286-1-avarab@gmail.com> ("Ævar Arnfjörð Bjarmason"'s message of "Wed, 28 Feb 2018 22:13:58 +0000")
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
> Change the behavior of git-commit back to what it was back in
> d4bb43ee27 ("Invoke "git gc --auto" from commit, merge, am and
> rebase.", 2007-09-05) when it was git-commit.sh.
... which was to run it just before post-commit. Do I retitle this
patch before queuing?
The code seems to run it "after" post-commit. We need to explain
why we chose to run it differently from the old practice, when we
claim we resurrect the old behaviour with this change.
> Shortly afterwards in f5bbc3225c ("Port git commit to C.", 2007-11-08)
> when it was ported to C the "git gc --auto" invocation went away.
So this is a decade late regression fix? As they say, better late
than never, probably.
> @@ -1608,6 +1609,7 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
>
> rerere(0);
> run_commit_hook(use_editor, get_index_file(), "post-commit", NULL);
> + run_command_v_opt(argv_gc_auto, RUN_GIT_CMD);
> if (amend && !no_post_rewrite) {
> commit_post_rewrite(current_head, &oid);
> }
next prev parent reply other threads:[~2018-02-28 22:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-28 22:13 [PATCH] commit: run git gc --auto just before the pre-commit hook Ævar Arnfjörð Bjarmason
2018-02-28 22:29 ` Junio C Hamano [this message]
2018-02-28 23:04 ` [PATCH v2] " Ævar Arnfjörð Bjarmason
2018-02-28 23:39 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqzi3siw88.fsf@gitster-ct.c.googlers.com \
--to=gitster@pobox.com \
--cc=avarab@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).