# Documentation/git-checkout.txt: Inconsistent naming of paths arguments

3 messages from 2013-07-19 to 2013-07-19. Participants: Adam Brengesjö, Duy Nguyen, Junio C Hamano.
Thread: https://gitlist.dev/t/34486

## Adam Brengesjö, 2013-07-19 07:16

Subject: Documentation/git-checkout.txt: Inconsistent naming of paths arguments
Message-ID: <CAJTcR-1RxLEaUe+c5yXEuKeC5Ert4FGm0=kUi7H-M-a+-Cp9-g@mail.gmail.com>
URL: https://gitlist.dev/e/CAJTcR-1RxLEaUe%2Bc5yXEuKeC5Ert4FGm0%3DkUi7H-M-a%2B-Cp9-g%40mail.gmail.com

```
From SYNOPSIS:

git checkout [-p|--patch] [<tree-ish>] [--] [<paths>…]


From DESCRIPTION

git checkout [-p|--patch] [<tree-ish>] [--] <pathspec>…



1. Named <paths> in SYNOPSIS, but <pathspec> in DESCRIPTION. (It's
referred to as <path> in the body text).

2. <paths> is marked as optional in SYNOPSIS, but <pathspec> is not.

I'm not submitting a patch now, as I'm not sure which is correct.

```

## Duy Nguyen, 2013-07-19 07:40

Subject: Re: Documentation/git-checkout.txt: Inconsistent naming of paths arguments
Message-ID: <CACsJy8DdVxwsf5xyDSDCe97kTPGdjvwQcMEPRNCCGXjF1z4eyw@mail.gmail.com>
URL: https://gitlist.dev/e/CACsJy8DdVxwsf5xyDSDCe97kTPGdjvwQcMEPRNCCGXjF1z4eyw%40mail.gmail.com
In-Reply-To: <CAJTcR-1RxLEaUe+c5yXEuKeC5Ert4FGm0=kUi7H-M-a+-Cp9-g@mail.gmail.com>

```
On Fri, Jul 19, 2013 at 2:16 PM, Adam Brengesjö <ca.brengesjo@gmail.com> wrote:
> From SYNOPSIS:
>
> git checkout [-p|--patch] [<tree-ish>] [--] [<paths>…]
>
>
> From DESCRIPTION
>
> git checkout [-p|--patch] [<tree-ish>] [--] <pathspec>…
>
>
>
> 1. Named <paths> in SYNOPSIS, but <pathspec> in DESCRIPTION. (It's
> referred to as <path> in the body text).
>
> 2. <paths> is marked as optional in SYNOPSIS, but <pathspec> is not.
>
> I'm not submitting a patch now, as I'm not sure which is correct.

If I'm not mistaken, "git checkout" takes pathspec in all cases.
--
Duy

```

## Junio C Hamano, 2013-07-19 14:36

Subject: Re: Documentation/git-checkout.txt: Inconsistent naming of paths arguments
Message-ID: <7va9lizkf3.fsf@alter.siamese.dyndns.org>
URL: https://gitlist.dev/e/7va9lizkf3.fsf%40alter.siamese.dyndns.org
In-Reply-To: <CACsJy8DdVxwsf5xyDSDCe97kTPGdjvwQcMEPRNCCGXjF1z4eyw@mail.gmail.com>

```
Duy Nguyen <pclouds@gmail.com> writes:

> On Fri, Jul 19, 2013 at 2:16 PM, Adam Brengesjö <ca.brengesjo@gmail.com> wrote:
>> From SYNOPSIS:
>>
>> git checkout [-p|--patch] [<tree-ish>] [--] [<paths>…]
>>
>>
>> From DESCRIPTION
>>
>> git checkout [-p|--patch] [<tree-ish>] [--] <pathspec>…
>>
>>
>>
>> 1. Named <paths> in SYNOPSIS, but <pathspec> in DESCRIPTION. (It's
>> referred to as <path> in the body text).
>>
>> 2. <paths> is marked as optional in SYNOPSIS, but <pathspec> is not.
>>
>> I'm not submitting a patch now, as I'm not sure which is correct.
>
> If I'm not mistaken, "git checkout" takes pathspec in all cases.

Correct.

And I think -p form (which I do not use myself so please double
check) can be run with an empty pathspec.

It looks somewhat idiotic that

	git checkout master
        git checout -p next

will finish on the 'master' branch, with random selected bits of
differences for 'master' to go to 'next' applied to the index and
the working tree, but that seems to be how it works.

```
