Is anybody actually using git-cherry.sh?

3 messages, 2 authors, 2016-06-15 · open the first message on its own page

Is anybody actually using git-cherry.sh?

From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:42:30

Hi,

from git-cherry.sh:

-- snip --
for c in $inup
do
        git-diff-tree -p $c
done | git-patch-id |
while read id name
do
        echo $name >>$patch/$id
done
-- snap --

AFAICS this _must_ be broken. git-diff-tree -p <ent> does not emit 
"diff-tree <sha1>", and neither "commit <sha1>" lines. So this code would 
yield just one file, treating all diffs as one huge diff. A quick fix 
would be this change (without the patch I sent out earlier):

+	echo "diff-tree $c"
 	git-diff-tree -p $c

Am I wrong?

Ciao,
Dscho

Re: Is anybody actually using git-cherry.sh?

From: Jeff King <hidden>
Date: 2016-06-15 22:42:30

On Fri, Jun 23, 2006 at 06:22:05PM +0200, Johannes Schindelin wrote:
from git-cherry.sh:

-- snip --
for c in $inup
do
        git-diff-tree -p $c
done | git-patch-id |
while read id name
do
        echo $name >>$patch/$id
done
-- snap --

AFAICS this _must_ be broken.  git-diff-tree -p <ent> does not emit
"diff-tree <sha1>", and neither "commit <sha1>" lines. So this code
would yield just one file, treating all diffs as one huge diff. A
quick fix would be this change (without the patch I sent out earlier):
Maybe I don't understand what you're saying, but it works fine here
(using latest head of master):
  $ for c in origin origin^; do git-diff-tree -p $c; done | git-patch-id
  1511e4e276ccc98ecf0ea31dad1bc9010869fdaf f60349aa786d519368938d7b6e5bb2006eccb0cf
  86ce7eeedd87a78cd8cac79adb6d4d968ece9e53 50f575fc9836704d45a5f732125b8f58103425a4

It looks like patch-id does a flush whenever a sha1 is found at the
beginning of a line; diff-tree lines simply have the 'diff-tree ' part
ignored.

-Peff

Re: Is anybody actually using git-cherry.sh?

From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:42:30

Hi Peff,

On Fri, 23 Jun 2006, Jeff King wrote:
It looks like patch-id does a flush whenever a sha1 is found at the 
beginning of a line; diff-tree lines simply have the 'diff-tree ' part 
ignored.
Ah! Everything makes sense now. Thanks!

Ciao,
Dscho
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help