From: "Tor Arne Vestbø" <torarnv@gmail.com>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: [PATCH v2] git-clone: Add option --branch to override initial branch
Date: Tue, 3 Mar 2009 17:47:09 +0100 [thread overview]
Message-ID: <49AD5F0D.8000700@gmail.com> (raw)
In-Reply-To: <alpine.DEB.1.00.0903031004570.6399@intel-tinevez-2-302>
Johannes Schindelin wrote:
> Leaving unnecessary initialization and funny indentation aside for a
> moment,
I do appreciate the feedback though. C is not my primary language, and
I'm happy to learn from my mistakes :-)
> Keep in mind: your change (as every change) bears the potential to
> introduce bugs and to complicate the user interface. The change must be
> worth those risks.
I fully understand. Here is my rationale for why it's worth the risk:
Imagine you have a project called Foo, which has active development on
the 'master' branch, and not quite so active development on the more
stable version branch '1.6' (which v1.6.0 and v1.6.1 was tagged from).
Now, you want to put up info on the project web page / wiki on how to
contribute to project Foo. This information is for new contributors --
who may be unfamiliar with git and it's inner workings. You write:
"To get started contributing to project Foo, please clone using:
$ git clone git://git.foo.com/project.git
"
This looks nice and inviting.
You also want to provide instructions for those who would like to
contribute to the more stable branch of project Foo, 1.6:
"If you would like to contribute to the stable 1.6 branch, do:
$ git clone -n git://git.foo.com/project.git
$ cd project
$ git checkout -t origin/1.6
$ git branch -D master
"
Which is not so nice and inviting. At least not compared to:
"If you would like to contribute to the stable 1.6 branch, do:
$ git clone git://git.foo.com/project.git --branch 1.6
"
Remember these are new contributors, unfamiliar with git. Presenting
them with a list of four commands that have to be run to get started
(commands which incidentally also are the first-ones new users mix up),
is not ideal. "What does -n do?", "What does -t do?", "What's a tracking
branch?", "Origin? What's that?", "What does -D do?", "Delete?! Will I
delete the main development line!?", etc.. :)
Also, remember that these commands are not something that can be
scripted or put into an alias, because these users have not cloned
anything yet.
I know Subversions is perhaps not the best ideal, but to contrast:
$ svn import http://svn.foo.bar/project/trunk
$ svn import http://svn.foo.bar/project/branches/1.6
Easy to get to a different branch without having to dive into the full
feature set of the SCM.
So, to conclude, I see this as a usability-feature of git-clone, which
outweighs the possible risk of introducing new bugs. It's not a feature
I will personally use that often, but it's one that I think new users
will appreciate.
Tor Arne
next prev parent reply other threads:[~2009-03-03 16:48 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-02 22:11 [PATCH] git-clone: Add option --branch to override initial branch Tor Arne Vestbø
2009-03-02 23:48 ` Johannes Schindelin
2009-03-03 0:09 ` Junio C Hamano
2009-03-03 0:11 ` Tor Arne Vestbø
2009-03-03 0:33 ` [PATCH v2] " Tor Arne Vestbø
2009-03-03 9:07 ` Johannes Schindelin
2009-03-03 16:47 ` Tor Arne Vestbø [this message]
2009-03-03 16:51 ` Junio C Hamano
2009-03-03 17:04 ` Tor Arne Vestbø
2009-03-03 17:07 ` Junio C Hamano
2009-03-04 6:55 ` Junio C Hamano
2009-03-04 8:56 ` Johannes Schindelin
2009-03-04 10:23 ` Tor Arne Vestbø
2009-03-09 14:39 ` Paolo Ciarrocchi
2009-03-09 16:01 ` Felipe Contreras
2009-03-11 8:52 ` Paolo Ciarrocchi
2009-03-12 4:18 ` Miles Bader
2009-03-12 8:48 ` Paolo Ciarrocchi
2009-03-12 9:12 ` Felipe Contreras
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=49AD5F0D.8000700@gmail.com \
--to=torarnv@gmail.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/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).