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

Re: Re: Re: [patch pasky] update gitcancel.sh to handle modes as well

From
Petr Baudis <pasky@ucw.cz>
Date
Apr 14, 2005, 23:49 UTC
Message-ID
<20050414234901.GY22699@pasky.ji.cz>
In-Reply-To
<1113521946.23299.143.camel@nosferatu.lan>

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

Show 25 quoted lines
> On Fri, 2005-04-15 at 01:15 +0200, Petr Baudis wrote:
> > Dear diary, on Fri, Apr 15, 2005 at 01:04:50AM CEST, I got a letter
> > where Martin Schlemmer <azarah@nosferatu.za.org> told me that...
> > > Rather use checkout-cache to sync our tree, as should do the right thing
> > > instead of diffing (cancel imply just blow away everything).
> > > 
> > > Signed-off-by: Martin Schlemmer <azarah@nosferatu.za.org>
> > > 
> > > gitcancel.sh:  839b3c58f20f6eb8412f499a891e007e2e67d114
> > > --- 839b3c58f20f6eb8412f499a891e007e2e67d114/gitcancel.sh
> > > +++ uncommitted/gitcancel.sh
> > > @@ -10,9 +10,8 @@
> > >  #
> > >  # Takes no arguments. Takes the evil changes from the tree.
> > > 
> > > -# FIXME: Does not revert mode changes!
> > > 
> > > -show-diff | patch -p0 -R
> > >  rm -f .git/add-queue .git/rm-queue
> > > +checkout-cache -q -f -a
> > > 
> > >  update-cache --refresh
> > 
> 
> PS, shouldn't we add a read-tree $(tree-id) before the checkout-cache?

A correct tree should be in the index. And if for any completely weird and smelly reason it isn't, I'm pondering if we should back that out and always reread-tree (takes some time, but do you do git cancel all the time?), or rather comply to it and adjust to the loaded tree, whichever it is.

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
C++: an octopus made by nailing extra legs onto a dog. -- Steve Taylor
Previous: Martin Schlemmer
Message 7 of 7 in “update gitcancel.sh to handle modes as well”
  1. update gitcancel.sh to handle modes as wellMartin Schlemmer, Apr 14, 2005
  2. Petr BaudisApr 14, 2005
  3. Martin SchlemmerApr 14, 2005
  4. Petr BaudisApr 14, 2005
  5. Martin SchlemmerApr 14, 2005
  6. Martin SchlemmerApr 14, 2005
  7. Petr BaudisApr 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.