From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Julian Phillips <julian@quantumfyre.co.uk>
Cc: git@vger.kernel.org, gitster@pobox.com
Subject: Re: [PATCH 3/3] Teach "git branch" about --new-workdir
Date: Sun, 22 Jul 2007 22:59:55 +0100 (BST) [thread overview]
Message-ID: <Pine.LNX.4.64.0707222255010.14781@racer.site> (raw)
In-Reply-To: <Pine.LNX.4.64.0707222234020.5382@reaper.quantumfyre.co.uk>
Hi,
On Sun, 22 Jul 2007, Julian Phillips wrote:
> On Sun, 22 Jul 2007, Johannes Schindelin wrote:
>
> > On Sun, 22 Jul 2007, Julian Phillips wrote:
> >
> > > On Sun, 22 Jul 2007, Johannes Schindelin wrote:
> > >
> > > > IMHO this is a better syntax than what is in contrib/, and "git
> > > > branch" is probably the right place for such a thing, from a
> > > > user's perspective.
> > >
> > > Surely checkout would make more sense than branch? You are effectively
> > > checking out into a new directory ... also you may want to get an
> > > existing branch (certainly most of my usage of new-workdir is checking
> > > out existing branches, e.g. to look at - as in build and play with - an
> > > interesting branch that someone else has pushed out).
> >
> > My rationale here was:
> >
> > - to make sure that the user cannot check out the same branch as in the
> > current repo, _or some other workdir of it_, and
>
> Since you can checkout any branch you like once you have the workdir,
> this is really an artificial limitation - you are protected when you
> create the workdir, but not after.
Well, it is not really an artificial limitation. IMHO it is much more
likely that you keep in mind what you should not do, when you have to work
around such a limitation if you really want to do.
> If you want to have a workdir for an exisiting branch then you have to create
> a new one, and then switch it over. That seems like a really big usability
> wart to me ... certainly it would make the option pretty much useless to me.
> My original motivation for the new-workdir script was to give me the ability
> to flatten out branches from a single repo for when I'm working on multiple
> branches at the same time.
Nowadays, we have separate remotes layout by default. (Indeed, you cannot
even disable it, as I found out recently). Which means that you already
have to branch off your local branch. So the consequences are lesser.
> > - to have finer grained lock control, as well as respecting has_symlinks.
>
> Not really sure what this means, since I am too tired to have read the
> actual patch - is it referring to the fact that checkout is shell rather
> than C? If so, surely that is not really a good justification for
> putting the option in the "wrong" command?
Well, I am really not interested in shooting myself in the foot, and
having that option in checkout would make that much more likely. So I
really, really want to have this in git-branch.
Once git-checkout is builtin, we can still come back and add this option
to git-checkout (with a big fat red warning, to be sure); it is not like
we have git-branch and git-checkout functionality well separated...
Ciao,
Dscho
next prev parent reply other threads:[~2007-07-22 22:00 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-22 18:56 [PATCH 3/3] Teach "git branch" about --new-workdir Johannes Schindelin
2007-07-22 19:16 ` Daniel Barkalow
2007-07-22 19:24 ` Johannes Schindelin
2007-07-22 21:09 ` Julian Phillips
2007-07-22 21:25 ` Johannes Schindelin
2007-07-22 21:50 ` Julian Phillips
2007-07-22 21:59 ` Johannes Schindelin [this message]
2007-07-22 22:24 ` Julian Phillips
2007-07-22 22:46 ` Jakub Narebski
2007-07-22 23:37 ` Johannes Schindelin
2007-07-22 23:02 ` Johannes Schindelin
2007-07-23 3:56 ` Shawn O. Pearce
2007-07-23 4:45 ` Junio C Hamano
2007-07-23 5:14 ` Shawn O. Pearce
2007-07-23 5:22 ` Shawn O. Pearce
2007-07-23 10:32 ` Johannes Schindelin
2007-07-23 10:42 ` Johannes Schindelin
2007-07-24 8:19 ` Marius Storm-Olsen
2007-07-24 9:02 ` Johannes Schindelin
2007-07-24 9:47 ` Junio C Hamano
2007-07-24 11:07 ` Johannes Schindelin
2007-07-24 11:14 ` Marius Storm-Olsen
2007-07-24 12:06 ` Julian Phillips
2007-07-24 12:28 ` Marius Storm-Olsen
2007-07-24 12:37 ` Johannes Schindelin
2007-07-24 13:47 ` Josef Weidendorfer
2007-07-24 13:54 ` Johannes Schindelin
2007-07-24 14:21 ` Josef Weidendorfer
2007-07-25 0:09 ` Jakub Narebski
2007-07-24 12:42 ` Johannes Schindelin
2007-07-24 13:26 ` Marius Storm-Olsen
2007-07-24 13:29 ` Marius Storm-Olsen
2007-07-24 13:33 ` Johannes Schindelin
2007-07-24 18:02 ` Marius Storm-Olsen
2007-07-24 18:30 ` Johannes Schindelin
2007-07-24 19:36 ` Marius Storm-Olsen
2007-07-24 23:15 ` Alex Riesen
2007-07-25 6:47 ` Marius Storm-Olsen
2007-07-25 9:39 ` Johannes Schindelin
2007-07-25 10:22 ` Steven Grimm
2007-07-25 11:05 ` Andy Parkins
2007-07-25 12:10 ` Marius Storm-Olsen
2007-07-25 14:09 ` Johannes Schindelin
2007-07-25 20:40 ` Linus Torvalds
2007-07-26 11:51 ` Christian MICHON
2007-07-23 8:31 ` Julian Phillips
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.64.0707222255010.14781@racer.site \
--to=johannes.schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=julian@quantumfyre.co.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).