Re: [PATCH 3/3] Teach "git branch" about --new-workdir

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

 



Hi,

[re Cc'ed Julian]

On Mon, 23 Jul 2007, Jakub Narebski wrote:

> Julian Phillips wrote:
> 
> > I just think that to a user it feels like a checkout operation ... and 
> > that would less confusing as an option to checkout. ?Trying to explain 
> > that branch just creates a new branch, unless you give this option 
> > then it creates a working copy over there seems more compilcated than 
> > saying the checkout updates/creates this working copy, unless you use 
> > this option to create one over there.
> 
> IMVHO git-checkout is characterized that it changes _current_ working 
> directory.

Actually, the name suggests that the important action is "checkout", so I 
agree with Julian here.

> But having this in git-checkout would mean that you can create new 
> workdir for _existing_ branch. git-branch is rather (except from 
> listing) for creating new branches.

Note that it is possible to checkout the current branch with "git checkout 
HEAD".  Indeed, you can get the same effect with "git checkout -f HEAD" as 
with "git reset --hard" AFAIK.

> It is a fact that functionalities of git-checkout (-b) and git-branch
> (--new-work-dir) intersect a bit.

Yes, I pointed that out, too.  But we're not Python, so we do not have to 
pretend that it is a bad thing to have several way to do the same.  Which 
allows us better to cater for user's expectations.

Ciao,
Dscho

-
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