From: Felipe Contreras <felipe.contreras@gmail.com>
To: Ilya Bobyr <ilya.bobyr@gmail.com>,
Felipe Contreras <felipe.contreras@gmail.com>,
git@vger.kernel.org
Subject: Re: [RTC/PATCH] Add 'update-branch' hook
Date: Tue, 22 Apr 2014 11:30:16 -0500 [thread overview]
Message-ID: <535699181d3d9_3e5aed730876@nysa.notmuch> (raw)
In-Reply-To: <53560F28.9020904@gmail.com>
Ilya Bobyr wrote:
> On 4/21/2014 1:49 PM, Felipe Contreras wrote:
> > Ilya Bobyr wrote:
> >> On 4/20/2014 7:23 PM, Felipe Contreras wrote:
> >>> This hook is invoked whenever 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 two parameters; the name of the branch, and the
> >>> SHA-1 of the latest commit, additionally, if there was a base commit the
> >>> branch was rebased onto, a third parameter contains it.
> >> And the old branch SHA could be found from in the reflog, correct?
> > Actually the old branch SHA-1 is actually the current one, since the branch
> > hasn't been updated at that point. Personally I don't see much value in adding
> > something the script can easily find out.
>
> If the hook is about a branch update, I would expect it to provide both
> old and new points for the branch, along with the name.
Again, I don't see the the point of passing something that is easy to find out:
`git rev-parse $branch` gives you that information.
> The fact that for rebases it also provides new base SHA is very
> convenient. As it is an optional argument it may make further extension
> of the interface a bit awkward.
> So, is seems reasonable to provide both from the very beginning.
So basically `git branch` would send the same SHA-1 twice.
--
Felipe Contreras
next prev parent reply other threads:[~2014-04-22 16:40 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-21 2:23 [RTC/PATCH] Add 'update-branch' hook Felipe Contreras
2014-04-21 7:25 ` Eric Sunshine
2014-04-21 20:02 ` Ilya Bobyr
2014-04-21 20:49 ` Felipe Contreras
2014-04-21 21:15 ` Ilya Bobyr
2014-04-21 21:17 ` Felipe Contreras
2014-04-21 21:39 ` Ilya Bobyr
2014-04-21 21:36 ` Felipe Contreras
2014-04-22 14:43 ` Stephen Leake
2014-04-22 16:31 ` Felipe Contreras
2014-04-22 17:09 ` Ilya Bobyr
2014-04-22 17:28 ` Felipe Contreras
2014-04-23 7:49 ` Stephen Leake
2014-04-23 9:07 ` Felipe Contreras
2014-04-23 22:44 ` Junio C Hamano
2014-04-24 1:11 ` Felipe Contreras
2014-04-26 17:38 ` Junio C Hamano
2014-04-26 19:28 ` Felipe Contreras
2014-04-24 14:26 ` Stephen Leake
2014-04-24 18:08 ` Felipe Contreras
2014-04-21 21:52 ` Junio C Hamano
2014-04-21 22:26 ` Felipe Contreras
2014-04-21 23:00 ` Junio C Hamano
2014-04-23 21:30 ` Felipe Contreras
2014-04-23 22:15 ` Junio C Hamano
2014-04-24 1:00 ` Felipe Contreras
2014-04-22 6:41 ` Ilya Bobyr
2014-04-22 16:30 ` Felipe Contreras [this message]
2014-04-21 21:17 ` Ilya Bobyr
2014-04-21 21:15 ` Felipe Contreras
2014-04-21 21:36 ` Ilya Bobyr
2014-04-21 21:35 ` Felipe Contreras
[not found] ` <CADcHDF+XcWEkvyP3tL4ibicnaMVJpixUZu1Ces0BXWkzPGsodw@mail.gmail.com>
2014-04-21 22:24 ` Felipe Contreras
2014-04-22 6:05 ` Ilya Bobyr
2014-04-22 6:45 ` Felipe Contreras
2014-04-22 7:00 ` Ilya Bobyr
2014-04-22 6:56 ` Felipe Contreras
2014-04-22 6:35 ` Ilya Bobyr
2014-04-22 16:27 ` 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=535699181d3d9_3e5aed730876@nysa.notmuch \
--to=felipe.contreras@gmail.com \
--cc=git@vger.kernel.org \
--cc=ilya.bobyr@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.
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 NNTP newsgroup(s).