From: Chris Torek <chris.torek@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Tom Rutherford <tmrutherford@gmail.com>, Git List <git@vger.kernel.org>
Subject: Re: post-checkout hook aborts rebase
Date: Thu, 27 Aug 2020 12:04:52 -0700 [thread overview]
Message-ID: <CAPx1GvfXOMFDsXE74LiG_BG5Bqb+seHDWX69xGe49C240ORi6A@mail.gmail.com> (raw)
In-Reply-To: <xmqqzh6gqe7i.fsf@gitster.c.googlers.com>
On Thu, Aug 27, 2020 at 8:51 AM Junio C Hamano <gitster@pobox.com> wrote:
> I still suspect that the checkout run, merely as an implementation
> detail of rebase (or any other git subcommand), should not trigger
> any hook ...
The *last* checkout from the finished rebase perhaps *should*, but
other than that one, that seems logically correct.
> but before any such code change, at least let's update the
> documentation to clarify what we mean by "the outcome".
>
> Hopefully something like the below may be a good starting point?
>
> Documentation/githooks.txt | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/githooks.txt b/Documentation/githooks.txt
> index 31b601e4bc..cf95d6d02b 100644
> --- a/Documentation/githooks.txt
> +++ b/Documentation/githooks.txt
> @@ -193,7 +193,9 @@ worktree. The hook is given three parameters: the ref of the previous HEAD,
> the ref of the new HEAD (which may or may not have changed), and a flag
> indicating whether the checkout was a branch checkout (changing branches,
> flag=1) or a file checkout (retrieving a file from the index, flag=0).
> -This hook cannot affect the outcome of `git switch` or `git checkout`.
> +This hook cannot affect the outcome of `git switch` or `git checkout`,
> +other than that the hook's exit status becomes the exit status of
> +these two commands.
>
> It is also run after linkgit:git-clone[1], unless the `--no-checkout` (`-n`) option is
> used. The first parameter given to the hook is the null-ref, the second the
This looks good to me, and can either be independent of, or the first part of,
any rebase update.
Chris
next prev parent reply other threads:[~2020-08-27 19:05 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-26 23:10 post-checkout hook aborts rebase Tom Rutherford
2020-08-27 0:13 ` Junio C Hamano
2020-08-27 0:22 ` Junio C Hamano
2020-08-27 0:44 ` Tom Rutherford
2020-08-27 5:44 ` Chris Torek
2020-08-27 15:51 ` Junio C Hamano
2020-08-27 19:04 ` Chris Torek [this message]
2020-08-27 20:11 ` Elijah Newren
2020-08-27 20:32 ` Chris Torek
2020-09-09 9:43 ` Phillip Wood
2020-09-09 16:07 ` Tom Rutherford
2020-09-11 20:25 ` Philippe Blain
2020-09-12 0:51 ` Junio C Hamano
2020-08-27 16:27 ` Elijah Newren
2020-08-27 17:27 ` Junio C Hamano
2020-08-27 17:47 ` Elijah Newren
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=CAPx1GvfXOMFDsXE74LiG_BG5Bqb+seHDWX69xGe49C240ORi6A@mail.gmail.com \
--to=chris.torek@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=tmrutherford@gmail.com \
/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).