From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Welsh Duggan Newsgroups: gmane.emacs.devel Subject: Re: Obscure error/warning/information message from git pull Date: Sat, 15 Nov 2014 10:57:27 -0500 Message-ID: <87a93s8niw.fsf@maru2.md5i.com> References: <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> <20141115120506.GA3581@acm.acm> <87r3x4mszs.fsf@fencepost.gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1416067151 1879 80.91.229.3 (15 Nov 2014 15:59:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 15 Nov 2014 15:59:11 +0000 (UTC) Cc: Alan Mackenzie , Eli Zaretskii , emacs-devel@gnu.org To: David Kastrup Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Nov 15 16:59:04 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 1XpfjZ-0005Nb-N9 for ged-emacs-devel@m.gmane.org; Sat, 15 Nov 2014 16:57:57 +0100 Original-Received: from localhost ([::1]:40935 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XpfjZ-0006nA-CP for ged-emacs-devel@m.gmane.org; Sat, 15 Nov 2014 10:57:57 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57454) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XpfjK-0006n4-PO for emacs-devel@gnu.org; Sat, 15 Nov 2014 10:57:46 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XpfjG-0002e2-Le for emacs-devel@gnu.org; Sat, 15 Nov 2014 10:57:42 -0500 Original-Received: from md5i.com ([75.151.244.229]:54415 helo=maru2) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xpfj7-0002YC-Gr; Sat, 15 Nov 2014 10:57:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=md5i.com; s=dkim; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:References:Subject:Cc:To:From; bh=/IR0gkJKVtwMx33R6ZOz6lUSFi4j3BZAHQXNItwcMyM=; b=yquFpKju2S+gD881TgnphtwXMPrTk56Xm9hHnoyEx+/7fNvDPZEWmj76V1q/CzkCi0ODnln0gCvR3D0t0twmHy2rqx14+07k7lH63oQH4434hpCA787M3zqgG7ntLl8S; Original-Received: from md5i by maru2 with local (Exim 4.84) (envelope-from ) id 1Xpfj5-0007Vp-Tp; Sat, 15 Nov 2014 10:57:27 -0500 In-Reply-To: <87r3x4mszs.fsf@fencepost.gnu.org> (David Kastrup's message of "Sat, 15 Nov 2014 15:35:35 +0100") User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 75.151.244.229 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:177190 Archived-At: David Kastrup writes: > Alan Mackenzie writes: > >> So "git clone" is defined in terms of "clone". Looks like a recursive >> "definition" to me - part of what "git clone" does is to "clone[s] a >> repository". There then follows an incoherent list of the form "does >> A, then does B, then does C, ...". >> >> What is missing is a definition of "clone". It would appear to mean >> "make a partial copy of". > > No. Your copy is a complete copy of everything you ask for. If you > don't clone a particular branch, for example, by using a single-branch > clone, that branch will not magically be in your repository. I think I may understand the disconnect here, but I am a git novice, so Dave, please jump in and correct any inaccuracies. I honestly think the term that is causing the most difficulty right now is the word "local." Read on. >> Please correct me if I'm mistaken here, but I think my "git clone"ing >> of the repository at savannah only partially copied that repository, >> thus I have an incomplete copy of it. > > It depends on what you cloned. It will clone exactly what you asked it > to clone. If you chose not to clone some branches, they will not be in > your repository. When you clone a repo without giving it any special arguments (i.e., just the location of the remote repository and possible the name of the directory you wish to clone into) you get a copy of the whole remote repository; all branches, the whole DAG, and all blobs referenced by the DAG. Each branch in your on-disk copy of the clone is called a "remote branch", since it is a branch from a remote source. (That last sentence is shaky, and perhaps incorrect, but bear with me.) Now, you do not normally check-out these "remote branches", and by check-out I mean specifically generate a working directory from them. Rather you work with a "local branch" which is usually "linked" to the "remote branch". (The "link" is what the --track option to the branch command handles, I believe.) When you initially clone a repo, you (by default) get a "local branch" named "master" which is linked to (tracks) the remote master branch. One of the fundamental confusing bits is that the word "local" in local branch does not mean "on local disk". It is on local disk. But so are the repositories copies of the "remote branches". When you do a "git fetch --all", it will sync up the on-disk representation of the "remote branches" with an actual remote repository. When you do a "git merge" from a working directory (local branch), you merge the differences from the linked (tracked) "remote branch" (on your local disk!) into your local branch. "git pull" does both the fetch, updating your on-disk representation of the "remote branch", and the merge (updating your "local branch"). I apologize if any of this is incorrect, but I agree with Alan and Eli that much of this is confusing. I'm not entirely certain I have a correct understanding of this myself. -- Michael Welsh Duggan (md5i@md5i.com)