git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* cg-restore - restoring modified files
@ 2005-06-15  1:45 Pavel Roskin
  2005-07-29  8:48 ` Petr Baudis
  0 siblings, 1 reply; 2+ messages in thread
From: Pavel Roskin @ 2005-06-15  1:45 UTC (permalink / raw)
  To: git

Hello!

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.

-- 
Regards,
Pavel Roskin


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: cg-restore - restoring modified files
  2005-06-15  1:45 cg-restore - restoring modified files Pavel Roskin
@ 2005-07-29  8:48 ` Petr Baudis
  0 siblings, 0 replies; 2+ messages in thread
From: Petr Baudis @ 2005-07-29  8:48 UTC (permalink / raw)
  To: Pavel Roskin; +Cc: git

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,

> 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-07-29  8:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-15  1:45 cg-restore - restoring modified files Pavel Roskin
2005-07-29  8:48 ` Petr Baudis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).