From: Carl Worth <cworth@cworth.org>
To: Martin Langhoff <martin@catalyst.net.nz>
Cc: git@vger.kernel.org, junkio@cox.net
Subject: Re: [RFC] git-clone: add --track <headname> support
Date: Thu, 12 Apr 2007 16:24:05 -0700 [thread overview]
Message-ID: <87slb5tbvu.wl%cworth@cworth.org> (raw)
In-Reply-To: <461EA8C5.1070503@catalyst.net.nz>
[-- Attachment #1: Type: text/plain, Size: 2002 bytes --]
On Fri, 13 Apr 2007 09:46:45 +1200, Martin Langhoff wrote:
> Hi Carl! Yes - this stuff should be simple, and _really hard to fsck up_.
I definitely agree. I think the use case of "tracking some branch
other than the default" is a really important one to make
easy. Precisely because there are a lot of users who will initially
use git for nothing other than this tracking, (not initially making
commits, or pushing, etc.).
So we would do well if this initial exposure were really easy. And
right now it's a bit too hard in my opinion, (in terms of commands,
concepts, and syntax the user has to use).
Is this correct sequence for the operation in 1.5.1 ?
git clone <repo>
cd <project>
git branch --track <branch> origin/<branch>
git checkout branch
git pull # as needed
I'd love to get that down to:
git clone <something with <repo> and <branch>>
cd <project>
git pull # as needed
and then adding a subsequent branch to track would be:
git track <something with <repo> and <branch>>
git checkout <branch>
git pull # as needed
> Oops - looks like we are talking about different things. What you write
> above can be done with "git-branch --track" on 1.5.1 so it's already in
> existence.
The mechanics are there, yes. All that's missing is the common
<something> syntax which, as shown above, can be shared for both
cloning originally and later adding a branch to track.
And <repo>#<branch> seems as good a <something> as anything else I
could imagine.
> With my proposed git-track as a wrapper around git-clone _and_
> git-branch --track, you only need to say
>
> To start working on foo, do
>
> git track <repo>#branch
Yeah, that's the idea. I had just planned on publishing the
<repo>#branch part and the user would learn whether to pass that to
"git clone" or "git track" as appropriate.
Making one command do either one seems a little too DWIM and
error-prone to me. But whatever works, (and more importantly, whatever
you can implement and get accepted).
-Carl
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2007-04-12 23:24 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-12 10:08 [RFC] git-clone: add --track <headname> support Martin Langhoff
2007-04-12 10:23 ` Junio C Hamano
2007-04-12 21:32 ` Martin Langhoff
2007-04-12 16:34 ` Carl Worth
2007-04-12 21:46 ` Martin Langhoff
2007-04-12 23:24 ` Carl Worth [this message]
2007-04-12 23:50 ` Martin Langhoff
2007-04-13 0:28 ` Junio C Hamano
2007-04-13 3:50 ` Junio C Hamano
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=87slb5tbvu.wl%cworth@cworth.org \
--to=cworth@cworth.org \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
--cc=martin@catalyst.net.nz \
/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).