Re: [PATCH] Fix contrib/hooks/post-receive-email for new branch with no new commits

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Tue, 10 Feb 2009, Jakub Narebski wrote:

> "Pat Notz" <pknotz@xxxxxxxxxx> writes:
> 
> > In the show_new_revisions function, the original code:
> > 
> >    git rev-parse --not --branches | grep -v $(git rev-parse $refname) |
> > 
> > isn't quite right since one can create a new branch and push it without
> > any new commits.  In that case, two refs will have the same sha1 but
> > both would get filtered by the 'grep'.  In the end, we'll show ALL the
> > history which is not what we want.  Instead, we should list the branches
> > by name and remove the branch being updated and THEN pass that list
> > through rev-parse.
> 
> Good idea, bad execution.

And I thought that I hold the patent for grumpy comments on this list :-)

As for your suggestions, I think they are valid.  We try to keep the 
interface of certain commands (so called "plumbing") stable, for script 
consumption.  "git for-each-ref" is such a command.

However, "git branch" is meant for human consumption, and a pretty recent 
patch wants to change the interface to make it even friendlier -- but 
breaking scripts' assumption in the process, should they use "git branch".

Ciao,
Dscho
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux