From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Pitre Subject: Re: git fetch: where are the downloaded objects stored? Date: Mon, 03 Mar 2008 13:14:57 -0500 (EST) Message-ID: References: <4d8e3fd30803030440s7239c83cj8bf69401dd76bad@mail.gmail.com> <4d8e3fd30803030633nf6266d5qab0df4ba4c539e0b@mail.gmail.com> <4d8e3fd30803030740i18ca8db1y681b4f10797f8c83@mail.gmail.com> <4d8e3fd30803030851n498953c4u7e7a109b91b9da11@mail.gmail.com> <87hcfnu3nu.fsf@osv.gnss.ru> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Content-Transfer-Encoding: 7BIT Cc: Paolo Ciarrocchi , Matthieu Moy , Git Mailing List To: Sergei Organov X-From: git-owner@vger.kernel.org Mon Mar 03 19:15:39 2008 Return-path: Envelope-to: gcvg-git-2@gmane.org Received: from vger.kernel.org ([209.132.176.167]) by lo.gmane.org with esmtp (Exim 4.50) id 1JWFCM-0001B0-2T for gcvg-git-2@gmane.org; Mon, 03 Mar 2008 19:15:38 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751101AbYCCSO7 (ORCPT ); Mon, 3 Mar 2008 13:14:59 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751480AbYCCSO7 (ORCPT ); Mon, 3 Mar 2008 13:14:59 -0500 Received: from relais.videotron.ca ([24.201.245.36]:44089 "EHLO relais.videotron.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751065AbYCCSO6 (ORCPT ); Mon, 3 Mar 2008 13:14:58 -0500 Received: from xanadu.home ([66.131.194.97]) by VL-MH-MR002.ip.videotron.ca (Sun Java(tm) System Messaging Server 6.3-4.01 (built Aug 3 2007; 32bit)) with ESMTP id <0JX6003PF2OXQ260@VL-MH-MR002.ip.videotron.ca> for git@vger.kernel.org; Mon, 03 Mar 2008 13:14:57 -0500 (EST) X-X-Sender: nico@xanadu.home In-reply-to: <87hcfnu3nu.fsf@osv.gnss.ru> User-Agent: Alpine 1.00 (LFD 882 2007-12-20) Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: On Mon, 3 Mar 2008, Sergei Organov wrote: > "Paolo Ciarrocchi" writes: > > On Mon, Mar 3, 2008 at 5:29 PM, Nicolas Pitre wrote: > >> If you have reflog enabled (it should be by default) then a good thing > >> to remember is the @{1} notation. For example, if the fetch updated the > >> origin/master branch, then origin/master@{1} is what your origin/master > >> was before being updated. To see the difference between the previous > >> and the current state of origin/master, you can do: > >> > >> git diff origin/master@{1}..origin/master > >> > >> Or to see the list of new commits: > >> > >> git log origin/master@{1}..origin/master > >> > >> git log -p origin/master@{1}..origin/master > >> > >> Etc. > > > > Very nice, I didn't find in the documentation. > > I'll read again the documents and if needed, I'll propose some new text. > > > >> This notation is a bit obnoxious and the re were suggestions about > >> addind the equivalent origin/master@{1..} but that didn't materialize > >> yet. > > > > Mybe it's just me but wouldn't be very nice to have a simple command > > to look at what data have been used for updating the currente branch? > > i.e. > > git fetch > > git diff -- fetch (which is an alias of git diff > > origin/master@{1}..origin/master) > > > > And how about a repository which have reflogs disabled? > > I'm also a newbie, and I think you are on a wrong road. Usually it's not > that interesting what was downloaded. What is interesting is what is on > 'origin/master' that is still missing from 'master'. For this I think > you have: > > $ git log master..origin Yes, this is indeed what most people should be doing. But if you're tracking some remote repository with no intention of merging them in your master branch by default, then it is often a nice thing to be able to see what has changed in those tracked branches since the last time you fetched them. This is where the reflog is really handy as it records all fetch points you did. Nicolas