git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Computing the number of patches in linux-next tree
@ 2008-07-22 16:19 Tony Luck
  2008-07-22 16:28 ` Johannes Schindelin
  0 siblings, 1 reply; 6+ messages in thread
From: Tony Luck @ 2008-07-22 16:19 UTC (permalink / raw)
  To: Git Mailing List

I tried to produce a graph of the pending avalanche of patches
sitting in the linux-next tree and came up with this:

git tag | grep next- | sort | while read tag
do
        c=$(git-rev-list --no-merges $tag ^linus | wc -l)

        echo ${tag##next-} $c
done

Where "linus" is a branch that tracks Linus' tree.  But this gets the
wrong count
for old tags because maintainers who use the topic-branch method have
exactly the same commits in linux-next as eventually end up in Linus ... so
once Linus pulls these trees, the historical counts change.

What I really need at this point is the commit from Linus tree that Stephen
uses as the basis for each next-* tag.  I.e. change the loop body to

       base=`git-where-did-this-tag-branch-from-linus $tag`
       c=$(git-rev-list --no-merges $tag ^$base | wc -l)

Is this the right way to do this?
What does the "git-where-did-this-tag-branch-from-linus" command look like?

-Tony

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Computing the number of patches in linux-next tree
  2008-07-22 16:19 Computing the number of patches in linux-next tree Tony Luck
@ 2008-07-22 16:28 ` Johannes Schindelin
  2008-07-22 17:04   ` Junio C Hamano
  0 siblings, 1 reply; 6+ messages in thread
From: Johannes Schindelin @ 2008-07-22 16:28 UTC (permalink / raw)
  To: Tony Luck; +Cc: Git Mailing List

Hi,

On Tue, 22 Jul 2008, Tony Luck wrote:

> git tag | grep next- | sort | while read tag

This should not be necessary... AFAICT "git tag" sorts its output already.

> What does the "git-where-did-this-tag-branch-from-linus" command look like?

git merge-base --all <branch1> <branch2>

Be warned: there might be multiple merge bases.

Ciao,
Dscho

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Computing the number of patches in linux-next tree
  2008-07-22 16:28 ` Johannes Schindelin
@ 2008-07-22 17:04   ` Junio C Hamano
  2008-07-22 17:13     ` Luck, Tony
                       ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Junio C Hamano @ 2008-07-22 17:04 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: Tony Luck, Git Mailing List

Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:

> On Tue, 22 Jul 2008, Tony Luck wrote:
>
>> git tag | grep next- | sort | while read tag
>
> This should not be necessary... AFAICT "git tag" sorts its output already.
>
>> What does the "git-where-did-this-tag-branch-from-linus" command look like?
>
> git merge-base --all <branch1> <branch2>
>
> Be warned: there might be multiple merge bases.

I do not think that approach applies to linux-next, which is constantly
rewound to the then-tip-of-linus and merge remaining bits.  The question
is "where does this branch begin", which does not have an answer in git.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: Computing the number of patches in linux-next tree
  2008-07-22 17:04   ` Junio C Hamano
@ 2008-07-22 17:13     ` Luck, Tony
  2008-07-22 17:24     ` Johannes Schindelin
  2008-07-22 18:23     ` Harvey Harrison
  2 siblings, 0 replies; 6+ messages in thread
From: Luck, Tony @ 2008-07-22 17:13 UTC (permalink / raw)
  To: Junio C Hamano, Johannes Schindelin; +Cc: Git Mailing List

>> git merge-base --all <branch1> <branch2>
>>
>> Be warned: there might be multiple merge bases.
>
> I do not think that approach applies to linux-next, which is constantly
> rewound to the then-tip-of-linus and merge remaining bits.  The question
> is "where does this branch begin", which does not have an answer in git.

Using git merge-base on the next-20080701 tag and current Linus tree I get
76 possible merge bases.  None of them appear to be the "right" one (if
I check out this tag and look at Next/merge.log the right answer appears
to be 1702b52 if I'm reading the log correctly).

Perhaps my best hope is to
        $ git checkout $tag Next/merge.log
        ... parse merge.log to figure out $base ...

-Tony

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Computing the number of patches in linux-next tree
  2008-07-22 17:04   ` Junio C Hamano
  2008-07-22 17:13     ` Luck, Tony
@ 2008-07-22 17:24     ` Johannes Schindelin
  2008-07-22 18:23     ` Harvey Harrison
  2 siblings, 0 replies; 6+ messages in thread
From: Johannes Schindelin @ 2008-07-22 17:24 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Tony Luck, Git Mailing List

Hi,

On Tue, 22 Jul 2008, Junio C Hamano wrote:

> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> 
> > On Tue, 22 Jul 2008, Tony Luck wrote:
> >
> >> git tag | grep next- | sort | while read tag
> >
> > This should not be necessary... AFAICT "git tag" sorts its output already.
> >
> >> What does the "git-where-did-this-tag-branch-from-linus" command look like?
> >
> > git merge-base --all <branch1> <branch2>
> >
> > Be warned: there might be multiple merge bases.
> 
> I do not think that approach applies to linux-next, which is constantly
> rewound to the then-tip-of-linus and merge remaining bits.  The question
> is "where does this branch begin", which does not have an answer in git.

Oh.

Well, there is one thing that _could_ work most of the time, namely 
looking at the committer info of the first parent.

Dunno,
Dscho

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Computing the number of patches in linux-next tree
  2008-07-22 17:04   ` Junio C Hamano
  2008-07-22 17:13     ` Luck, Tony
  2008-07-22 17:24     ` Johannes Schindelin
@ 2008-07-22 18:23     ` Harvey Harrison
  2 siblings, 0 replies; 6+ messages in thread
From: Harvey Harrison @ 2008-07-22 18:23 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Johannes Schindelin, Tony Luck, Git Mailing List

On Tue, 2008-07-22 at 10:04 -0700, Junio C Hamano wrote:
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> 
> > On Tue, 22 Jul 2008, Tony Luck wrote:
> >
> >> git tag | grep next- | sort | while read tag
> >
> > This should not be necessary... AFAICT "git tag" sorts its output already.
> >
> >> What does the "git-where-did-this-tag-branch-from-linus" command look like?
> >
> > git merge-base --all <branch1> <branch2>
> >
> > Be warned: there might be multiple merge bases.
> 
> I do not think that approach applies to linux-next, which is constantly
> rewound to the then-tip-of-linus and merge remaining bits.  The question
> is "where does this branch begin", which does not have an answer in git.

I thought that was what Stephen has the next/stable branch for:

git log --pretty=oneline --no-merges next/stable..next/master | wc -l

At least for each day you can find the number of patches....I don't
think he tags the stable points, so historically that may be a problem.

Harvey

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-07-22 18:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-22 16:19 Computing the number of patches in linux-next tree Tony Luck
2008-07-22 16:28 ` Johannes Schindelin
2008-07-22 17:04   ` Junio C Hamano
2008-07-22 17:13     ` Luck, Tony
2008-07-22 17:24     ` Johannes Schindelin
2008-07-22 18:23     ` Harvey Harrison

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).