From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: Obscure error/warning/information message from git pull Date: Sat, 15 Nov 2014 19:17:36 +0100 Message-ID: <871tp4mipr.fsf@fencepost.gnu.org> References: <20141114120604.GA3859@acm.acm> <87389mkjwo.fsf@thinkpad-t440p.tsdh.org> <20141114141434.GM3565@embecosm.com> <20141114180521.GA3168@acm.acm> <20141114230235.GF3168@acm.acm> <87lhncoqrp.fsf@fencepost.gnu.org> <83389khn1g.fsf@gnu.org> <87h9y0omii.fsf@fencepost.gnu.org> <83vbmgg57x.fsf@gnu.org> <878ujcoj0k.fsf@fencepost.gnu.org> <83ppcog1if.fsf@gnu.org> <87vbmgmt88.fsf@fencepost.gnu.org> <83wq6we49t.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1416075471 30006 80.91.229.3 (15 Nov 2014 18:17:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 15 Nov 2014 18:17:51 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Nov 15 19:17:44 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Xphup-0001gi-Iz for ged-emacs-devel@m.gmane.org; Sat, 15 Nov 2014 19:17:43 +0100 Original-Received: from localhost ([::1]:41513 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xphup-0003Qd-3F for ged-emacs-devel@m.gmane.org; Sat, 15 Nov 2014 13:17:43 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60978) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xphuk-0003Oy-OO for emacs-devel@gnu.org; Sat, 15 Nov 2014 13:17:39 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xphuj-0004CA-MP for emacs-devel@gnu.org; Sat, 15 Nov 2014 13:17:38 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:53197) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xphuj-0004C6-Jp for emacs-devel@gnu.org; Sat, 15 Nov 2014 13:17:37 -0500 Original-Received: from localhost ([127.0.0.1]:60373 helo=lola) by fencepost.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xphuj-0005P4-0a; Sat, 15 Nov 2014 13:17:37 -0500 Original-Received: by lola (Postfix, from userid 1000) id 98E9EE0B2B; Sat, 15 Nov 2014 19:17:36 +0100 (CET) In-Reply-To: <83wq6we49t.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 15 Nov 2014 19:56:46 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:177221 Archived-At: Eli Zaretskii writes: >> Take a look in your .git/config file. You'll find a section >> [remote "origin"] containing, among other things, a fetch specification. > > That says "fetch = +refs/heads/*:refs/remotes/origin/*", which I guess > means everything, and is probably the default (since I never said > anything about that). Apparently. Good thing they got rid of the old default. It was a nuisance. > So I guess I can now forget everything about partial DAG being > fetched, because in my case, as in every default case, the entire DAG > will be updated by "git pull". Is that correct? Yes. I actually don't ever use "git pull" myself as I don't like the automatic merging action: if I want a merge, I do it myself. "git fetch" is sufficient for the update and does not involve the current branch or checkout or work directory at all, and git pull does it as its first step anyway. I often want to see what happened upstream _without_ having it automatically integrated into what I am currently working on. >> For a typical repository containing all branches (whether that is the >> case depends on the fetch specification), the complete DAG is >> available. git pull updates _all_ fetched remote-tracking branches. >> But it only merges the currently checked-out _local_ branch with the >> remote-tracking branch for the corresponding remote branch. > > So the suggestion to pull, displayed by Git when I checkout another > branch immediately after a pull, actually boils down to do the merge > for that other branch? If so, why does it suggest a pull? Because it has no notion of "immediately after a pull" would be one reason. Another reason might be that the branch might be set to rebase on pull rather than merge, and the default suggestion does not want to differentiate the two cases. Also it might be that when you specify arguments, indeed only _some_ references are fetched rather than all. The man page says: SYNOPSIS git pull [options] [ [...]] DESCRIPTION Incorporates changes from a remote repository into the current branch. In its default mode, git pull is shorthand for git fetch followed by git merge FETCH_HEAD. More precisely, git pull runs git fetch with the given parameters and calls git merge to merge the retrieved branch heads into the current branch. With --rebase, it runs git rebase instead of git merge. So you can pull in other branches as well. -- David Kastrup