summaryrefslogtreecommitdiff
path: root/Documentation/pull-fetch-param.txt
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2013-05-11 16:16:52 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-05-12 22:23:48 (GMT)
commitf269048754f3b835f4f7287c5a132714a059efce (patch)
tree12b7debaf9d79eae12a9aedb44762a7484508b33 /Documentation/pull-fetch-param.txt
parent900f2814b8da951a450f5762dabb1b248dd77abc (diff)
downloadgit-f269048754f3b835f4f7287c5a132714a059efce.zip
git-f269048754f3b835f4f7287c5a132714a059efce.tar.gz
git-f269048754f3b835f4f7287c5a132714a059efce.tar.bz2
fetch: opportunistically update tracking refs
When we run a regular "git fetch" without arguments, we update the tracking refs according to the configured refspec. However, when we run "git fetch origin master" (or "git pull origin master"), we do not look at the configured refspecs at all, and just update FETCH_HEAD. We miss an opportunity to update "refs/remotes/origin/master" (or whatever the user has configured). Some users find this confusing, because they would want to do further comparisons against the old state of the remote master, like: $ git pull origin master $ git log HEAD...origin/master In the currnet code, they are comparing against whatever commit happened to be in origin/master from the last time they did a complete "git fetch". This patch will update a ref from the RHS of a configured refspec whenever we happen to be fetching its LHS. That makes the case above work. The downside is that any users who really care about whether and when their tracking branches are updated may be surprised. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/pull-fetch-param.txt')
-rw-r--r--Documentation/pull-fetch-param.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/Documentation/pull-fetch-param.txt b/Documentation/pull-fetch-param.txt
index 6f5ca21..18cffc2 100644
--- a/Documentation/pull-fetch-param.txt
+++ b/Documentation/pull-fetch-param.txt
@@ -75,4 +75,4 @@ ifdef::git-pull[]
* A parameter <ref> without a colon merges <ref> into the current
branch,
endif::git-pull[]
- while not storing the branch anywhere locally.
+ and updates the remote-tracking branches (if any).