Re: [PATCH] Correct git-pull documentation

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

 



Jay Soffian <jaysoffian@xxxxxxxxx> writes:

> The --rebase option was documented in the wrong place (under MERGE
> STRATEGIES instead of OPTIONS). Noted the branch.<name>.rebase
> option and clarified the use '.' in a few places. Switched
> "git-<command>" to "git command".

Clarifying that --rebase is not a strategy is a good
improvement.  Thanks.

> @@ -55,12 +57,13 @@ Often people use `git pull` without giving any parameter.
>  Traditionally, this has been equivalent to saying `git pull
>  origin`.  However, when configuration `branch.<name>.remote` is
>  present while on branch `<name>`, that value is used instead of
> -`origin`.
> +`origin`. (`branch.<name>.remote` may be set to `.` to pull from 
> +the local repository by default.)

I am not sure if this special case deserves mentioning here.

> -In order to determine what URL to use to fetch from, the value
> -of the configuration `remote.<origin>.url` is consulted
> -and if there is not any such variable, the value on `URL: ` line
> -in `$GIT_DIR/remotes/<origin>` file is used.
> +Unless pulling from the local repository, a URL must be determined
> +for the origin. This is done by first consulting
> +`remote.<origin>.url`. If there is not any such variable, the value
> +on `URL: ` line in `$GIT_DIR/remotes/<origin>` file is used.

Likewise.

> @@ -138,6 +141,9 @@ You should refrain from abusing this option to sneak substantial
>  changes into a merge commit.  Small fixups like bumping
>  release/version name would be acceptable.
>  
> +git pull --rebase . master::
> +	This syntax is equivalent to calling `git rebase master`; see
> +	linkgit:git-rebase[1] for details.

Likewise.  That is a very roundabout way to say "git rebase
master".  It happens to work as a logical consequence of two
facts (1) that you can pull from any remote and (2) that "." is
a valid remote that names local.  I am personally happy that the
command works consistently, but I think we should rather teach
people the more natural way to do their rebase in our
documentation.

The fact that we earlier talked about "git pull ." does not
justify this addition.  Even though "git pull ." is also a
roundabout way, it used to be the only way (we did not have the
"git merge" callable as the top-level command) and there are
existing documents that show the "git pull ." form out there on
the web, and that is the primary reason we mention this ancient
form, so that people who saw such an ancient notation can find
out what it is about in our documentation.  Some people still
prefer it from pure inertia, and we have no reason to deprecate
it, but I do not think it is something we should advertise as
the first class interface.
-
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]

  Powered by Linux