On Fri, 2005-04-15 at 01:00 +0200, Petr Baudis wrote:
> Dear diary, on Fri, Apr 15, 2005 at 01:01:27AM CEST, I got a letter
> where Martin Schlemmer <[EMAIL PROTECTED]> told me that...
> > On Fri, 2005-04-15 at 00:42 +0200, Petr Baudis wrote:
> > > Dear diary, on Thu, Apr 14, 2005 at 11:40:09AM CEST, I got a letter
> > > where Martin Schlemmer <[EMAIL PROTECTED]> told me that...
> > > > > > -       snprintf(cmd, sizeof(cmd), "diff -L %s -u -N  - %s", name, 
> > > > > > name);
> > > > > > +       for (n = 0; n < 20; n++)
> > > > > > +               snprintf(&(sha1[n*2]), 3, "%02x", ce->sha1[n]);
> > > > > > +       snprintf(cmd, sizeof(cmd), "diff -L %s/%s -L uncommitted/%s 
> > > > > > -u -N  - %s",
> > > > > > +               sha1, ce->name, ce->name, ce->name);
> > > > > 
> > > > > The "directory" sha1 is the sha1 of the tree, not of the particular
> > > > > file - that one is in the "attributes" list (parentheses after the
> > > > > filename), together with mode.
> > > > > 
> > > > 
> > > > Does it really matter?  It is more just to get the patch prefix right,
> > > > and I did it as it went nicely with the printed:
> > > > 
> > > > ----
> > > > show-diff.c:  a531ca4078525d1c8dcf84aae0bfa89fed6e5d96
> > > > ----
> > > > 
> > > > for example ...
> > > 
> > > Yes, it matters, and I don't care how nicely it wents with what you
> > > print before.
> > > 
> > 
> > hah ;p
> > 
> > > Either print there some nonsense which is clear not to be a tree ID, or
> > > (much more preferably) print the real tree ID there. If some tool ever
> > > uses it (e.g. to help resolve conflicts, perhaps even actually doing a
> > > real merge based on the patch), you just confused it.
> > > 
> > 
> > Ok, understood.  Do you think it will be scripted?  If not I guess we
> > can just do labels like:
> > 
> > --- committed/
> > +++ uncommitted/
> > 
> > ?
> 
> Heh. Well, of course this could do. But is there any technical reason
> why not just carry the sha1 id of the tree around and stuff it there?
> 

Not at all. Just wanted to know if anybody saw the possible use before
adding possible cruft that could be done shorter - will do a patch
shortly.


Thanks,

-- 
Martin Schlemmer

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to