From: Junio C Hamano <gitster@pobox•com>
To: Felipe Contreras <felipe.contreras@gmail•com>
Cc: git@vger•kernel.org, Ilya Bobyr <ilya.bobyr@gmail•com>
Subject: Re: [RFC/PATCH v2 3/3] Add 'update-branch' hook
Date: Wed, 23 Apr 2014 14:22:16 -0700 [thread overview]
Message-ID: <xmqq8uqvyc53.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <53582bb6ceb64_24448772ecaf@nysa.notmuch> (Felipe Contreras's message of "Wed, 23 Apr 2014 16:08:06 -0500")
Felipe Contreras <felipe.contreras@gmail•com> writes:
> Junio C Hamano wrote:
>> Felipe Contreras <felipe.contreras@gmail•com> writes:
>>
>> > This hook is invoked before a branch is updated, either when a branch is
>> > created or updated with 'git branch', or when it's rebased with 'git
>> > rebase'. It receives three parameters; the name of the branch, the
>> > SHA-1 of the latest commit, and the SHA-1 of the first commit of the
>> > branch.
>> >
>> > When a branch is created the first and last commits of the branch are
>> > the same, however when a branch is rebased they are not. If the SHA-1 of
>> > the first commit of the branch is not available (e.g. git reset) a null
>> > SHA-1 (40 zeroes) would be passed.
>> >
>> > The hook exit status can be used to deny the branch update.
>> >
>> > It can be used to verify the validity of branch names, and also to keep
>> > track of the origin point of a branch, which is otherwise not possible
>> > to find out [1].
>>
>> Please call it pre-update-branch at least,
>
> I will do so when I see a good argument for it.
If you choose to ignore "a user cannot tell from the name
update-branch when it will be called, we cannot introduce
post-update-branch later without making things more inconsistent if
we do not name it pre-something" and label them not "a good
argument", then I do not have anything to say to you.
next prev parent reply other threads:[~2014-04-23 21:22 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-23 19:42 [RFC/PATCH v2 0/3] New 'update-branch' hook Felipe Contreras
2014-04-23 19:42 ` [RFC/PATCH v2 1/3] sh-setup: export GIT_DIR Felipe Contreras
2014-04-23 20:01 ` Jeff King
2014-04-23 20:18 ` Junio C Hamano
2014-04-23 19:42 ` [RFC/PATCH v2 2/3] run-command: make sure hooks have always GIT_DIR Felipe Contreras
2014-04-23 20:37 ` Junio C Hamano
2014-04-23 21:15 ` Felipe Contreras
2014-04-23 19:42 ` [RFC/PATCH v2 3/3] Add 'update-branch' hook Felipe Contreras
2014-04-23 20:28 ` Junio C Hamano
2014-04-23 21:08 ` Felipe Contreras
2014-04-23 21:22 ` Junio C Hamano [this message]
2014-04-23 21:35 ` Felipe Contreras
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqq8uqvyc53.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox$(echo .)com \
--cc=felipe.contreras@gmail$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=ilya.bobyr@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox