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

Re: cg-restore - restoring modified files

From
Petr Baudis <pasky@suse.cz>
Date
Jul 29, 2005, 08:48 UTC
Message-ID
<20050729084801.GK24895@pasky.ji.cz>
In-Reply-To
<1118799921.3890.45.camel@dv>

Umm. I just discovered a portion of mailing list I somehow completely missed. :/ Sorry for the delayed replies.

Dear diary, on Wed, Jun 15, 2005 at 03:45:21AM CEST, I got a letter where Pavel Roskin <proski@gnu.org> told me that...

> Hello!
Hi,
Show 25 quoted lines
> I believe the documented behavior of cg-restore is inconsistent.
> 
> "Restore given files to their original state. Without any parameters, it
> recovers any files removed locally whose removal was not recorded by
> `cg-rm`."
> 
> I interpret it that cg-restore without arguments restores removed files
> but not modified ones.
> 
> "If passed a set of file names, it restores those files to their state
> as of the last commit (including bringing files removed with cg-rm back
> to life; FIXME: does not do that part yet)."
> 
> I interpret it that cg-restore with arguments restores both removed and
> modified files.
> 
> Maybe we need an option whether to restore modified files?  Or maybe
> they should always be restored (I think it would more consistent)?  Then
> the help text should be more clear about modified files.
> 
> The actual behavior is that modified files are never restored.  We need
> "-f" option for git-checkout-cache to overwrite existing files, and it's
> not used whether the filenames are specified or not.  I wanted to send a
> patch, but after reading help I'm not sure what exactly cg-restore is
> supposed to do.

in the meantime, I actually implemented the -f option. Now I agree that cg-rm'd files should indeed be restored only when -f is passed. Not a big deal yet since we don't remove them at all now. :-)

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
If you want the holes in your knowledge showing up try teaching
someone.  -- Alan Cox
Previous: Pavel Roskin
Message 2 of 2 in “cg-restore - restoring modified files”
  1. Pavel RoskinJun 15, 2005
  2. Petr BaudisJul 29, 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.