From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Obscure error/warning/information message from git pull Date: Sat, 15 Nov 2014 19:56:46 +0200 Message-ID: <83wq6we49t.fsf@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> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1416074253 11676 80.91.229.3 (15 Nov 2014 17:57:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 15 Nov 2014 17:57:33 +0000 (UTC) Cc: emacs-devel@gnu.org To: David Kastrup Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Nov 15 18:57:24 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 1Xphb9-000498-FQ for ged-emacs-devel@m.gmane.org; Sat, 15 Nov 2014 18:57:23 +0100 Original-Received: from localhost ([::1]:41453 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xphb8-0005wq-US for ged-emacs-devel@m.gmane.org; Sat, 15 Nov 2014 12:57:22 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56116) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xphb1-0005wc-74 for emacs-devel@gnu.org; Sat, 15 Nov 2014 12:57:21 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xphav-0006QG-8M for emacs-devel@gnu.org; Sat, 15 Nov 2014 12:57:15 -0500 Original-Received: from mtaout21.012.net.il ([80.179.55.169]:54055) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xphao-0006Ov-Ou; Sat, 15 Nov 2014 12:57:02 -0500 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0NF300G00DI4LL00@a-mtaout21.012.net.il>; Sat, 15 Nov 2014 19:57:01 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NF300G7TDV0M100@a-mtaout21.012.net.il>; Sat, 15 Nov 2014 19:57:01 +0200 (IST) In-reply-to: <87vbmgmt88.fsf@fencepost.gnu.org> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.169 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:177216 Archived-At: > From: David Kastrup > Cc: emacs-devel@gnu.org > Date: Sat, 15 Nov 2014 15:30:31 +0100 > > Eli Zaretskii writes: > > >> From: David Kastrup > >> Cc: emacs-devel@gnu.org > >> Date: Sat, 15 Nov 2014 11:28:11 +0100 > >> > >> >> git cannot magically show anything that isn't in the repo. > >> > > >> > It is unclear to me, at my current level of knowledge, what exactly > >> > "is in the repo". > >> > >> All the references you fetched/cloned and everything they point to. > > > > Thanks, but that explains nothing. > [...] Thanks, that's a lot to digest. A couple of questions: > >> > Furthermore, even if you have other branches tracked, "git pull" > >> > evidently won't update them as it does with the current branch, since > >> > switching to another branch after a pull will cheerfully tell you that > >> > you are behind the branch tip and need another "git pull" to fix that. > >> > Then what exactly does "branch tracking" mean, by default? > >> > >> It means that Git tracks the remote branches: it knows what's there and > >> can show you even when offline (of course, it shows the state since the > >> last fetch). > > > > Does that include updating their parts of the DAG? > > Yes. > [...] > >> > It is all the more perplexing, since (AFAIU) the repo met-data is (or > >> > includes) the history DAG, where (AFAIK) branches are all interwoven > >> > in a single graph. So how come a 'pull' doesn't update the whole DAG, > >> > and if it does, why do I need to do something in addition to have all > >> > my branches updated? > >> > >> A pull updates those parts of the DAG that can be reached from the > >> references you have in your "fetch" specification. > > > > What is my "fetch specification", and how did I specify that? > > 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). 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? > 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? Thanks.