# [PATCH] Improvements to `git checkout -h`

7 messages from 2010-09-19 to 2010-09-27. Participants: Knittl, Ævar Arnfjörð Bjarmason, Matthieu Moy, Junio C Hamano.
Thread: https://gitlist.dev/t/25153

## Knittl, 2010-09-19 19:41

Subject: [PATCH] Improvements to `git checkout -h`
Message-ID: <AANLkTikra1iE5JpXvvPnNcwE=XEDF6B=ubCteEi77dqX@mail.gmail.com>
URL: https://gitlist.dev/e/AANLkTikra1iE5JpXvvPnNcwE%3DXEDF6B%3DubCteEi77dqX%40mail.gmail.com

```
print more information in `git checkout -h` to stop people from
complaining about git's help ;)

http://repo.or.cz/w/git/dkf.git/commitdiff/95209979cb1a0de071a3cceac593fbb40235b926

cheers, daniel

-- 
typed with http://neo-layout.org
myFtPhp -- visit http://myftphp.sf.net -- v. 0.4.7 released!

```

## Knittl, 2010-09-23 18:26

Subject: Re: [PATCH] Improvements to `git checkout -h`
Message-ID: <AANLkTikjqW5R4p90T3pWACPG9vGqd4uRETiE-Wb_BybS@mail.gmail.com>
URL: https://gitlist.dev/e/AANLkTikjqW5R4p90T3pWACPG9vGqd4uRETiE-Wb_BybS%40mail.gmail.com
In-Reply-To: <AANLkTikra1iE5JpXvvPnNcwE=XEDF6B=ubCteEi77dqX@mail.gmail.com>

```
any thoughts on this one?

On Sun, Sep 19, 2010 at 9:41 PM, Knittl <knittl89@googlemail.com> wrote:
> print more information in `git checkout -h` to stop people from
> complaining about git's help ;)
>
> http://repo.or.cz/w/git/dkf.git/commitdiff/95209979cb1a0de071a3cceac593fbb40235b926
>
> cheers, daniel
>
> --
> typed with http://neo-layout.org
> myFtPhp -- visit http://myftphp.sf.net -- v. 0.4.7 released!
>



-- 
typed with http://neo-layout.org
myFtPhp -- visit http://myftphp.sf.net -- v. 0.4.7 released!

```

## Ævar Arnfjörð Bjarmason, 2010-09-23 20:05

Subject: Re: [PATCH] Improvements to `git checkout -h`
Message-ID: <AANLkTi=LBzJWGuqtqJT1eUtmQqFTj8jixxB=hONTh+mi@mail.gmail.com>
URL: https://gitlist.dev/e/AANLkTi%3DLBzJWGuqtqJT1eUtmQqFTj8jixxB%3DhONTh%2Bmi%40mail.gmail.com
In-Reply-To: <AANLkTikjqW5R4p90T3pWACPG9vGqd4uRETiE-Wb_BybS@mail.gmail.com>

```
On Thu, Sep 23, 2010 at 18:26, Knittl <knittl89@googlemail.com> wrote:
> any thoughts on this one?

Hi and thanks for patching Git, but could you please submit patches as
detailed in Documentation/SubmittingPatches ?

```

## Knittl, 2010-09-23 20:37

Subject: Re: [PATCH] Improvements to `git checkout -h`
Message-ID: <AANLkTinBoofjS=+ropQnHARn+qtzJWh2Nx6n87cud5Di@mail.gmail.com>
URL: https://gitlist.dev/e/AANLkTinBoofjS%3D%2BropQnHARn%2BqtzJWh2Nx6n87cud5Di%40mail.gmail.com
In-Reply-To: <AANLkTi=LBzJWGuqtqJT1eUtmQqFTj8jixxB=hONTh+mi@mail.gmail.com>

```
On Thu, Sep 23, 2010 at 10:05 PM, Ævar Arnfjörð Bjarmason
<avarab@gmail.com> wrote:
> On Thu, Sep 23, 2010 at 18:26, Knittl <knittl89@googlemail.com> wrote:
>> any thoughts on this one?
>
> Hi and thanks for patching Git, but could you please submit patches as
> detailed in Documentation/SubmittingPatches ?

as i use gmail i thought i'd link to the patch, not to mess up
whitespace (still haven't got it working the correct way)

anyways, here it goes inlined:

-------8<---------

From 15781ca9a67f406ec4d608b2e3eae2b129eb7c06 Mon Sep 17 00:00:00 2001
From: Daniel Knittl-Frank <knittl89+git@googlemail.com>
Date: Sun, 19 Sep 2010 14:04:43 +0200
Subject: [PATCH] Improvements to `git checkout -h`

be a little more verbose about what each option does

Signed-off-by: Daniel Knittl-Frank <knittl89+git@googlemail.com>
---
 builtin/checkout.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/builtin/checkout.c b/builtin/checkout.c
index f2f355a..9240faf 100644
--- a/builtin/checkout.c
+++ b/builtin/checkout.c
@@ -691,16 +691,16 @@ int cmd_checkout(int argc, const char **argv,
const char *prefix)
 			   "create and checkout a new branch"),
 		OPT_STRING('B', NULL, &opts.new_branch_force, "branch",
 			   "create/reset and checkout a branch"),
-		OPT_BOOLEAN('l', NULL, &opts.new_branch_log, "log for new branch"),
-		OPT_SET_INT('t', "track",  &opts.track, "track",
+		OPT_BOOLEAN('l', NULL, &opts.new_branch_log, "create reflog for new branch"),
+		OPT_SET_INT('t', "track",  &opts.track, "set upstream info for new branch",
 			BRANCH_TRACK_EXPLICIT),
 		OPT_STRING(0, "orphan", &opts.new_orphan_branch, "new branch", "new
unparented branch"),
-		OPT_SET_INT('2', "ours", &opts.writeout_stage, "stage",
+		OPT_SET_INT('2', "ours", &opts.writeout_stage, "checkout our
version for unmerged files",
 			    2),
-		OPT_SET_INT('3', "theirs", &opts.writeout_stage, "stage",
+		OPT_SET_INT('3', "theirs", &opts.writeout_stage, "checkout their
version for unmerged files",
 			    3),
-		OPT_BOOLEAN('f', "force", &opts.force, "force"),
-		OPT_BOOLEAN('m', "merge", &opts.merge, "merge"),
+		OPT_BOOLEAN('f', "force", &opts.force, "force checkout (throw away
local modifications)"),
+		OPT_BOOLEAN('m', "merge", &opts.merge, "perform a 3-way merge with
the new branch"),
 		OPT_STRING(0, "conflict", &conflict_style, "style",
 			   "conflict style (merge or diff3)"),
 		OPT_BOOLEAN('p', "patch", &patch_mode, "select hunks interactively"),
-- 
1.7.3.235.g952099




-- 
typed with http://neo-layout.org
myFtPhp -- visit http://myftphp.sf.net -- v. 0.4.7 released!

```

## Matthieu Moy, 2010-09-23 20:48

Subject: Re: [PATCH] Improvements to `git checkout -h`
Message-ID: <vpqk4mcuqxa.fsf@bauges.imag.fr>
URL: https://gitlist.dev/e/vpqk4mcuqxa.fsf%40bauges.imag.fr
In-Reply-To: <AANLkTinBoofjS=+ropQnHARn+qtzJWh2Nx6n87cud5Di@mail.gmail.com>

```
Knittl <knittl89@googlemail.com> writes:

> as i use gmail i thought i'd link to the patch, not to mess up
> whitespace (still haven't got it working the correct way)

Doesn't the part on gmail in SubmittingPatches work for you?

Otherwise, the patch sounds good.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/

```

## Matthieu Moy, 2010-09-24 16:21

Subject: [PATCH] Improvements to `git checkout -h`
Message-ID: <1285345319-6109-1-git-send-email-Matthieu.Moy@imag.fr>
URL: https://gitlist.dev/e/1285345319-6109-1-git-send-email-Matthieu.Moy%40imag.fr
In-Reply-To: <AANLkTinBoofjS=+ropQnHARn+qtzJWh2Nx6n87cud5Di@mail.gmail.com>

```
From: Daniel Knittl-Frank <knittl89+git@googlemail.com>

be a little more verbose about what each option does

Signed-off-by: Daniel Knittl-Frank <knittl89+git@googlemail.com>
---
Daniel seems to have difficulty to send the patch through gmail, here
it is again, taken from repo.or.cz.

That seems OK for inclusion to me.

 builtin/checkout.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/builtin/checkout.c b/builtin/checkout.c
index 560eae1..a54583b 100644
--- a/builtin/checkout.c
+++ b/builtin/checkout.c
@@ -691,16 +691,16 @@ int cmd_checkout(int argc, const char **argv, const char *prefix)
 			   "create and checkout a new branch"),
 		OPT_STRING('B', NULL, &opts.new_branch_force, "branch",
 			   "create/reset and checkout a branch"),
-		OPT_BOOLEAN('l', NULL, &opts.new_branch_log, "log for new branch"),
-		OPT_SET_INT('t', "track",  &opts.track, "track",
+		OPT_BOOLEAN('l', NULL, &opts.new_branch_log, "create reflog for new branch"),
+		OPT_SET_INT('t', "track",  &opts.track, "set upstream info for new branch",
 			BRANCH_TRACK_EXPLICIT),
 		OPT_STRING(0, "orphan", &opts.new_orphan_branch, "new branch", "new unparented branch"),
-		OPT_SET_INT('2', "ours", &opts.writeout_stage, "stage",
+		OPT_SET_INT('2', "ours", &opts.writeout_stage, "checkout our version for unmerged files",
 			    2),
-		OPT_SET_INT('3', "theirs", &opts.writeout_stage, "stage",
+		OPT_SET_INT('3', "theirs", &opts.writeout_stage, "checkout their version for unmerged files",
 			    3),
-		OPT_BOOLEAN('f', "force", &opts.force, "force"),
-		OPT_BOOLEAN('m', "merge", &opts.merge, "merge"),
+		OPT_BOOLEAN('f', "force", &opts.force, "force checkout (throw away local modifications)"),
+		OPT_BOOLEAN('m', "merge", &opts.merge, "perform a 3-way merge with the new branch"),
 		OPT_STRING(0, "conflict", &conflict_style, "style",
 			   "conflict style (merge or diff3)"),
 		OPT_BOOLEAN('p', "patch", &patch_mode, "select hunks interactively"),
-- 
1.7.3.2.g257b5f

```

## Junio C Hamano, 2010-09-27 17:54

Subject: Re: [PATCH] Improvements to `git checkout -h`
Message-ID: <7vy6anysvv.fsf@alter.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vy6anysvv.fsf%40alter.siamese.dyndns.org
In-Reply-To: <1285345319-6109-1-git-send-email-Matthieu.Moy@imag.fr>

```
Matthieu Moy <Matthieu.Moy@imag.fr> writes:

> From: Daniel Knittl-Frank <knittl89+git@googlemail.com>
>
> be a little more verbose about what each option does
>
> Signed-off-by: Daniel Knittl-Frank <knittl89+git@googlemail.com>
> ---
> Daniel seems to have difficulty to send the patch through gmail, here
> it is again, taken from repo.or.cz.
>
> That seems OK for inclusion to me.

Thanks.

```
