git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Difficulties in advertising a new branch to git newbies
@ 2007-01-30 20:13 Carl Worth
  2007-01-30 21:02 ` Jakub Narebski
                   ` (7 more replies)
  0 siblings, 8 replies; 50+ messages in thread
From: Carl Worth @ 2007-01-30 20:13 UTC (permalink / raw)
  To: git

[-- Attachment #1: Type: text/plain, Size: 4616 bytes --]

So here's a scenario I'm in right now. A user of my software reported a
bug. I put together some patches to fix the bug and pushed them out as
a new branch "proposed-fix" that I'd like the user to test.

I'm trying to let the user know about the new branch, but I have some
users that know nothing about git. So I'm going to spell things out
fairly carefully, (which I'm glad to do). I also don't know how recent
a version of git the user has, (for example if clone will give
separate remotes or not).

Also, these users are glad to follow instructions, but they're really
interested in just testing the fix I'm offering, and not interested in
getting involved in a git tutorial just yet. (Though, I'd be quite
happy if they found this a gentle and enjoyable introduction to git).

I'm finding that the instructions I'm having to write are much more
complicated than I would like them to be. And some of this is due to
incompatibility between git 1.5 and previous versions. I would be glad
to see improvements to my instructions, (or improvements to git to
allow my instructions to be simpler).

Here's what I've done historically:

	I've published a new "proposed-fix" that I'd like you to
	test. You can obtain this code as follows:

		git clone git://git.project.org/~cworth/project
		cd project
		git checkout -b build proposed-fix

	or alternately, if you've already got a clone of the project
	around, just do:

		git fetch git://git.project.org/~cworth/project proposed-fix:proposed-fix
		git checkout -b build proposed-fix

The things I haven't liked in the above are:

	1. The doubled-up "branch:branch" thing in git-fetch, which
           just plain looks awkward. Yes, it's common for "git pull"
           to fetch something and not store it in any branch, but it
           seems that it could ask for that behavior explicitly and we
           could make "fetch URL branch" act as "fetch URL
           branch:branch".

	2. The "-b build" thing in git-checkout. Worse than just
           looking awkward, this causes a real problem, since my
           git-fetch instructions only work the first time, (if they
           follow them later they're going to run into "branch build
           already exists"). Detached head in 1.5 should help here,
           but see below.

	3. The separation between how to clone and how to fetch into
           an existing repository is annoying. What I'd really like to
           do is just publish something like:

		git://git.project.org/~cworth/project proposed-fix

	   and allow users to just cut-and-paste that to commands as
	   needed. That is, I think it would be nice if "git fetch" or
	   "git clone" could accept the "URL branch" string above and
	   just do the right thing with it.

I've been hoping that some of the recent 1.5 work on git would make
this process simpler. But in fact it makes things worse. First, my
historic instructions don't work anymore with separate remotes. So I
would have to add something like:

	However, if you're using a very recent version of git, (1.5 or
	newer), then you'll need to use this alternate checkout
	command instead:

		git checkout -b build origin/proposed-fix

I really like most of what separate-remotes does. But I don't like
that branch names no longer resolve the same way they used to. Could
we fix git to resolve "branch" as "remotes/*/branch" if unique? That
would allow the old instructions and old habits to continue to work,
(making the change to separate-remotes much more compatible).

Also, if I'm willing to assume (or insist) that users have git 1.5 or
newer, it'd be nice to be able to drop the "-b build" thing thanks to
the new detached HEAD support. But if I suggest doing just:

		git checkout origin/proposed-fix

the user is presented with the following message which is much more
scary than useful in this situation:

	warning: you are not on ANY branch anymore.
	If you meant to create a new branch from the commit, you need -b to
	associate a new branch with the wanted checkout.  Example:
	  git checkout -b <new_branch_name> origin/proposed-fix

The user is getting warned, getting told they perhaps wanted to do
something else, and getting told that if so they would need to use a
different command. But the command I gave does exactly what they
wanted, and following git's advice here would be a bad idea.

I propose this warning be removed here. Otherwise, I either add text
to my instructions telling the user to ignore the warning message they
get, or else I go back to "-b build" and back to all the old problems
it causes.

Thanks for your time and attention,

-Carl

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 50+ messages in thread

end of thread, other threads:[~2007-02-06 19:58 UTC | newest]

Thread overview: 50+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-30 20:13 Difficulties in advertising a new branch to git newbies Carl Worth
2007-01-30 21:02 ` Jakub Narebski
2007-01-30 21:25   ` Yann Dirson
2007-01-30 21:31     ` Jakub Narebski
2007-01-30 21:32     ` Junio C Hamano
2007-01-30 21:40       ` Jakub Narebski
2007-01-30 22:33 ` Matthias Lederhofer
2007-01-30 22:36   ` Matthias Lederhofer
2007-01-30 23:10 ` Jeff King
2007-01-31  1:34   ` Junio C Hamano
2007-01-31  1:51     ` Nicolas Pitre
2007-01-31  3:22     ` Jeff King
2007-01-31 14:59       ` Nicolas Pitre
2007-01-31 17:07         ` Jeff King
2007-01-31 18:59           ` Nicolas Pitre
2007-01-31 22:53             ` Jeff King
2007-01-31 20:20           ` Junio C Hamano
2007-01-31 22:51             ` Theodore Tso
2007-01-31 23:03               ` Junio C Hamano
2007-01-31 23:18               ` Jakub Narebski
2007-01-31  1:48   ` Nicolas Pitre
2007-01-31  0:10 ` Daniel Barkalow
2007-01-31  1:55   ` Nicolas Pitre
2007-01-31  5:09     ` Daniel Barkalow
2007-01-31 14:31       ` Nicolas Pitre
2007-01-31 14:38         ` J. Bruce Fields
2007-01-31 14:53           ` Jakub Narebski
2007-01-31 15:15             ` Nicolas Pitre
2007-01-31 16:25         ` Daniel Barkalow
2007-01-31 18:25           ` Nicolas Pitre
2007-01-31 13:13 ` Guilhem Bonnefille
2007-01-31 16:06   ` Carl Worth
2007-01-31 16:15     ` Johannes Schindelin
2007-01-31 19:27 ` Santi Béjar
2007-01-31 19:50   ` Carl Worth
2007-02-01  0:20     ` Josef Weidendorfer
2007-02-01  9:02       ` Santi Béjar
2007-02-01  4:12 ` Jakub Narebski
2007-02-06  5:51 ` Carl Worth
2007-02-06  6:37   ` Junio C Hamano
2007-02-06  7:25     ` Junio C Hamano
2007-02-06  7:31       ` Jeff King
2007-02-06 18:53     ` Carl Worth
2007-02-06 19:14       ` Junio C Hamano
2007-02-06 19:39         ` Carl Worth
2007-02-06 19:58           ` Jakub Narebski
2007-02-06  7:28   ` Jeff King
2007-02-06  7:46     ` Junio C Hamano
2007-02-06  8:12       ` Jeff King
2007-02-06 15:33     ` Nicolas Pitre

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).