git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Remove need to untrack before tracking new branch

From
Petr Baudis <pasky@ucw.cz>
Date
Apr 14, 2005, 23:00 UTC
Message-ID
<20050414230047.GS22699@pasky.ji.cz>
In-Reply-To
<1113519687.23299.126.camel@nosferatu.lan>

Dear diary, on Fri, Apr 15, 2005 at 01:01:27AM CEST, I got a letter where Martin Schlemmer <azarah@nosferatu.za.org> told me that...

Show 12 quoted lines
> 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 <azarah@nosferatu.za.org> told me that...
> > > So basically the modes that are stored in the cache are not applied ...
> > > Although, yes, I prob should add the relevant code to checkout-cache.
> > 
> > This should be fixed now, BTW. git apply didn't correctly apply the
> > mode changes, but now it should. Several bugs prevented it to, in fact.
> > ;-)
> 
> Yep, I saw - thought you scrapped this, so mailed a new patch (or was
> busy doing the touch ups to the email when this came in.

Hmm, I must've missed the new patch. The latest I have still puts the stuff to update-cache and combines it with the show-diff change.

> > > > > show-diff.c:  a531ca4078525d1c8dcf84aae0bfa89fed6e5d96
> > > > > --- a531ca4078525d1c8dcf84aae0bfa89fed6e5d96/show-diff.c
> > > > > +++ uncommitted/show-diff.c
> > > > > @@ -5,13 +5,18 @@
..snip..
Show 39 quoted lines
> > > > > -       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?

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
C++: an octopus made by nailing extra legs onto a dog. -- Steve Taylor
Previous: Martin SchlemmerNext: Martin Schlemmer
Message 14 of 16 in “Re: Re: Re: Remove need to untrack before tracking new branch”
  1. Petr BaudisApr 13, 2005
  2. Martin SchlemmerApr 14, 2005
  3. Martin SchlemmerApr 14, 2005
  4. Martin SchlemmerApr 14, 2005
  5. Petr BaudisApr 14, 2005
  6. Martin SchlemmerApr 14, 2005
  7. Martin SchlemmerApr 14, 2005
  8. Alex RiesenApr 14, 2005
  9. Martin SchlemmerApr 15, 2005
  10. Paul JacksonApr 15, 2005
  11. Alex RiesenApr 15, 2005
  12. Petr BaudisApr 14, 2005
  13. Martin SchlemmerApr 14, 2005
  14. Petr BaudisApr 14, 2005
  15. Martin SchlemmerApr 14, 2005
  16. Martin SchlemmerApr 14, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.