Re: What I miss from Cogito...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2008.03.23 22:14:11 -0400, Theodore Tso wrote:
> On Mon, Mar 24, 2008 at 02:40:30AM +0100, Björn Steinbrink wrote:
> > > If we were going to separate the two commands out, I'd use the name
> > > "git revert-file", because that's what people who are coming from bk
> > > or hg are used to (where "revert" means to undo the local edits done
> > > to a particular file, as opposed to the git meaning of undoing a
> > > particular commit).
> > 
> > Nah, that would create confusion within git, because it does something
> > totally different from git revert. And checkout can also checkout a
> > whole tree, not just a file. So you would either need revert-tree as
> > well... Or add more confusion, because revert-file "reverting" a tree is
> > not quite intuitive.
> 
> That's why I said "git revert-file" as being different from "git
> revert".  If you want to revert the entire tree in the sense of
> "undoing local edits", most people today use "git reset --hard".

But that still leaves out e.g. "git checkout HEAD -- some_directory/".
Passing a directory to git revert-file seems plain broken, but you can
do that with checkout, so you would also need a git revert-tree (or come
up with a better name ;-)). And IMHO the difference between git revert
and the suggested revert-file has too much potential for confusion
already.

> > Maybe it's just a misunderstanding on my side, but to me "checkout"
> > means as much as "get me something out of the repo". 
> 
> If that's true, why is the one-line summary in the git-checkout man
> page and in the git top-level man page read as follows?
> 
>        git-checkout - Checkout and switch to a branch
> 
> At the very least, will you admit that the summary in the man page is
> perhaps just a wee bit misleading?

I won't disagree on that one ;-) But I probably won't come up with
something better either. My brain stops somewhere at "Checkout stuff",
and that's even less useful than the current one.

Björn
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux