Thread (2 messages) flat view 2 messages, 2 authors, 2016-06-15

Re: git fetch: where are the downloaded objects stored?

From: Sergei Organov <hidden>
Date: 2016-06-15 22:44:19

"Paolo Ciarrocchi" [off-list ref] writes:
On Mon, Mar 3, 2008 at 5:29 PM, Nicolas Pitre [off-list ref] wrote:
quoted
On Mon, 3 Mar 2008, Paolo Ciarrocchi wrote:
quoted
On Mon, Mar 3, 2008 at 4:21 PM, Matthieu Moy [off-list ref] wrote:
[...]
quoted
quoted
How can I look to what I just downloaded?
Should I simply do a git diff?
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.
quoted
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

-- Sergei.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help