Re: [PATCH 1/2] Documentation/git-checkout.txt: clarify usage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Chris Rorvick <chris@xxxxxxxxxxx> writes:

> I like Johannes' suggestion of using "<branch>" in the --detach case
> instead of "<commit>" as I think it makes the reason for the
> separation more obvious at a glance.

Sounds sensible; even though the option does not require its
argument to be a branch name, the user does not have a reason to use
the option if it is not giving a branch name, either, so it all
balances out ;-).

>
> --->8---
> diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt
> index dcf1a32..4fdf41a 100644
> --- a/Documentation/git-checkout.txt
> +++ b/Documentation/git-checkout.txt
> @@ -61,8 +61,8 @@ $ git checkout <branch>
>  that is to say, the branch is not reset/created unless "git checkout" is
>  successful.
>
> -'git checkout' --detach [<commit>]::
>  'git checkout' <commit>::
> +'git checkout' --detach [<branch>]::
>
>         Prepare to work on top of <commit>, by detaching HEAD at it
>         (see "DETACHED HEAD" section), and updating the index and the
> @@ -71,7 +71,8 @@ successful.
>         tree will be the state recorded in the commit plus the local
>         modifications.
>  +
> -Passing `--detach` forces this behavior even if <commit> is a branch.
> +Passing `--detach` forces this behavior in the case of a <branch>, or
> +the current branch if one is not specified.
>
>  'git checkout' [-p|--patch] [<tree-ish>] [--] <pathspec>...::
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]