git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Correct git-pull documentation
@ 2008-02-19 19:24 Jay Soffian
  0 siblings, 0 replies; 5+ messages in thread
From: Jay Soffian @ 2008-02-19 19:24 UTC (permalink / raw)
  To: git; +Cc: Jay Soffian, Junio C Hamano

The --rebase option was documented in the wrong place (under MERGE
STRATEGIES instead of OPTIONS). Noted the branch.<name>.rebase
option.

Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
---
 Documentation/git-pull.txt |   20 ++++++++++++--------
 1 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/Documentation/git-pull.txt b/Documentation/git-pull.txt
index 179bdfc..7378943 100644
--- a/Documentation/git-pull.txt
+++ b/Documentation/git-pull.txt
@@ -15,6 +15,7 @@ DESCRIPTION
 -----------
 Runs `git-fetch` with the given parameters, and calls `git-merge`
 to merge the retrieved head(s) into the current branch.
+With `--rebase`, calls `git-rebase` instead of `git-merge`.
 
 Note that you can use `.` (current directory) as the
 <repository> to pull from the local repository -- this is useful
@@ -26,19 +27,14 @@ OPTIONS
 include::merge-options.txt[]
 
 :git-pull: 1
-include::fetch-options.txt[]
-
-include::pull-fetch-param.txt[]
-
-include::urls-remotes.txt[]
-
-include::merge-strategies.txt[]
 
 \--rebase::
 	Instead of a merge, perform a rebase after fetching.  If
 	there is a remote ref for the upstream branch, and this branch
 	was rebased since last fetched, the rebase uses that information
-	to avoid rebasing non-local changes.
+	to avoid rebasing non-local changes. To make this the default
+	for branch `<name>`, set configuration `branch.<name>.rebase`
+	to `true`.
 +
 *NOTE:* This is a potentially _dangerous_ mode of operation.
 It rewrites history, which does not bode well when you
@@ -48,6 +44,14 @@ unless you have read linkgit:git-rebase[1] carefully.
 \--no-rebase::
 	Override earlier \--rebase.
 
+include::fetch-options.txt[]
+
+include::pull-fetch-param.txt[]
+
+include::urls-remotes.txt[]
+
+include::merge-strategies.txt[]
+
 DEFAULT BEHAVIOUR
 -----------------
 
-- 
1.5.4.2.204.gbea87

^ permalink raw reply related	[flat|nested] 5+ messages in thread
* [PATCH] Correct git-pull documentation
@ 2008-02-16  4:50 Jay Soffian
  2008-02-16  8:20 ` Nagy Balázs
  2008-02-16  9:31 ` Junio C Hamano
  0 siblings, 2 replies; 5+ messages in thread
From: Jay Soffian @ 2008-02-16  4:50 UTC (permalink / raw)
  To: git; +Cc: Jay Soffian

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

Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
---
 Documentation/git-pull.txt |   38 ++++++++++++++++++++++----------------
 1 files changed, 22 insertions(+), 16 deletions(-)

diff --git a/Documentation/git-pull.txt b/Documentation/git-pull.txt
index 179bdfc..f734f18 100644
--- a/Documentation/git-pull.txt
+++ b/Documentation/git-pull.txt
@@ -8,13 +8,14 @@ git-pull - Fetch from and merge with another repository or a local branch
 
 SYNOPSIS
 --------
-'git-pull' <options> <repository> <refspec>...
+'git-pull' [<options>] [<repository>] [<refspec>...]
 
 
 DESCRIPTION
 -----------
-Runs `git-fetch` with the given parameters, and calls `git-merge`
-to merge the retrieved head(s) into the current branch.
+Runs `git fetch` with the given parameters, and calls `git merge` or
+`git rebase` to merge or rebase the retrieved head(s) into the
+current branch.
 
 Note that you can use `.` (current directory) as the
 <repository> to pull from the local repository -- this is useful
@@ -28,17 +29,12 @@ include::merge-options.txt[]
 :git-pull: 1
 include::fetch-options.txt[]
 
-include::pull-fetch-param.txt[]
-
-include::urls-remotes.txt[]
-
-include::merge-strategies.txt[]
-
 \--rebase::
 	Instead of a merge, perform a rebase after fetching.  If
 	there is a remote ref for the upstream branch, and this branch
 	was rebased since last fetched, the rebase uses that information
-	to avoid rebasing non-local changes.
+	to avoid rebasing non-local changes. This if the default if
+	`branch.<name>.rebase` is set.
 +
 *NOTE:* This is a potentially _dangerous_ mode of operation.
 It rewrites history, which does not bode well when you
@@ -48,6 +44,12 @@ unless you have read linkgit:git-rebase[1] carefully.
 \--no-rebase::
 	Override earlier \--rebase.
 
+include::pull-fetch-param.txt[]
+
+include::urls-remotes.txt[]
+
+include::merge-strategies.txt[]
+
 DEFAULT BEHAVIOUR
 -----------------
 
@@ -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.)
 
-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.
 
 In order to determine what remote branches to fetch (and
 optionally store in the tracking branches) when the command is
@@ -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.
 Command line pull of multiple branches from one repository::
 +
 ------------------------------------------------
@@ -163,7 +169,7 @@ linkgit:git-reset[1].
 
 SEE ALSO
 --------
-linkgit:git-fetch[1], linkgit:git-merge[1], linkgit:git-config[1]
+linkgit:git-fetch[1], linkgit:git-merge[1], linkgit:git-config[1], linkgit:git-rebase[1]
 
 
 Author
-- 
1.5.4.1.1281.g75df

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

end of thread, other threads:[~2008-02-19 19:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-19 19:24 [PATCH] Correct git-pull documentation Jay Soffian
  -- strict thread matches above, loose matches on Subject: below --
2008-02-16  4:50 Jay Soffian
2008-02-16  8:20 ` Nagy Balázs
2008-02-16  9:31 ` Junio C Hamano
2008-02-16 10:04   ` Jay Soffian

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