{"thread":{"id":"25552","subject":"history missing","startedAt":"2010-10-26T19:47:39Z","lastAt":"2010-11-08T18:28:02Z","messageCount":10,"participants":["Vitaliy Semochkin","Sverre Rabbelier","Jonathan Nieder","Alex Riesen","Martin von Zweigbergk","Jakub Narebski","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"154459","messageId":"AANLkTikFB5HNOmg0iTdjHxtrhU9vdua5O8btgFzpg-2F@mail.gmail.com","threadId":"25552","inReplyTo":null,"subject":"history missing","fromName":"Vitaliy Semochkin","fromEmail":"vitaliy.se@gmail.com","sentAt":"2010-10-26T19:47:39Z","receivedAt":"2010-10-26T19:47:39Z","isPatch":false,"sender":{"key":"vitaliy.se@gmail.com","avatar":null},"body":"Hi,\n\nI cloned a remote repository\nto check recent changes in origin/master I do:\ngit fetch origin master\ngit log origin master\n\nrecently I found out that log doesn't show recent commits\nI know that on server there were several commits let's say on the 19th\nbut log shows that recent commit was done on the 17th\nthe most strange thing I'm sure I have seen those commits fetched already\nI did git fetch origin master several times but it didn't help\nthe log says that recent commit was done on 17th\nafter I performed git remote update\nlog again shows recent commits on 19th\nHas anyone faced such behaviour?\nI'm relatively new git user, what do I do wrong?\n\nThanks in advance,\nVitaliy S\n"},{"id":"154461","messageId":"AANLkTi=wbC5F6RFeP2K5J3R2+eMrj0H0i9RnGfS9ALq7@mail.gmail.com","threadId":"25552","inReplyTo":"AANLkTikFB5HNOmg0iTdjHxtrhU9vdua5O8btgFzpg-2F@mail.gmail.com","subject":"Re: history missing","fromName":"Sverre Rabbelier","fromEmail":"srabbelier@gmail.com","sentAt":"2010-10-26T20:04:58Z","receivedAt":"2010-10-26T20:04:58Z","isPatch":false,"sender":{"key":"srabbelier@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3098?v=4"},"body":"Heya,\n\nOn Tue, Oct 26, 2010 at 12:47, Vitaliy Semochkin <vitaliy.se@gmail.com> wrote:\n> I cloned a remote repository\n> to check recent changes in origin/master I do:\n> git fetch origin master\n> git log origin master\n\nSo, you can either of:\n\n$ git pull origin master # fetches and merges\n$ git log origin/master # looks at what upstream has but that you have\nnot merged yet\n$ git rebase origin/master # rebase your changes on top of upstream\n$ git merge origin/master # merge with upstream\n\n-- \nCheers,\n\nSverre Rabbelier\n"},{"id":"155361","messageId":"20101108090230.GC2430@burratino","threadId":"25552","inReplyTo":"AANLkTikFB5HNOmg0iTdjHxtrhU9vdua5O8btgFzpg-2F@mail.gmail.com","subject":"Re: history missing","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2010-11-08T09:02:31Z","receivedAt":"2010-11-08T09:02:31Z","isPatch":false,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Hi Vitaliy,\n\nVitaliy Semochkin wrote:\n\n> I cloned a remote repository\n> to check recent changes in origin/master I do:\n> git fetch origin master\n> git log origin master\n> \n> recently I found out that log doesn't show recent commits\n\nYes, this can be confusing.\n\nThe \"git fetch\" command can be used in two ways: to update\nremote-tracking branches and to grab some particular branch (or\nother ref) quickly.\n\nUpdating remote-tracking branches\n---------------------------------\n\nUse \"git fetch <remote>\", or \"git fetch --all\" if you want to update\nall remote-tracking branches.\n\nInspecting a particular branch\n------------------------------\n\nUse \"git fetch <remote> <branch>\"; this will fetch that branch and\nstore it as FETCH_HEAD.  You can \"git log FETCH_HEAD\", \"git merge\nFETCH_HEAD\", etc, to interact with the branch head you just\ndownloaded.\n\nIf you want to fetch a branch to a local branch, you could use\n\n\tgit fetch <remote> <branch>\n\tgit branch <local-branch-name> FETCH_HEAD\n\nbut there is also a shorter way to write that:\n\n\tgit fetch <remote> <branch>:<local-branch-name>\n\nThis form is especially useful for grabbing a subtree of the branch\nhierarchy all at once:\n\n\tgit fetch junio refs/heads/sg/*:gabor/*\n\nThe \"git fetch <remote>\" form is syntactic sugar for this syntax.  The\n'fetch' lines in .git/config describe what remote:local ref specifiers\nwill be implicitly added to the command line after the name of a\nconfigured remote repository.\n\nSee the \"git fetch\" manual for details and examples.\n\nHope that helps,\nJonathan\n"},{"id":"155372","messageId":"AANLkTinzQodqYsy5pdE6wNPGFCD-Y0oj2w_u_U-CtOyz@mail.gmail.com","threadId":"25552","inReplyTo":"AANLkTikFB5HNOmg0iTdjHxtrhU9vdua5O8btgFzpg-2F@mail.gmail.com","subject":"Re: history missing","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2010-11-08T11:29:40Z","receivedAt":"2010-11-08T11:29:40Z","isPatch":false,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"On Tue, Oct 26, 2010 at 21:47, Vitaliy Semochkin <vitaliy.se@gmail.com> wrote:\n> I cloned a remote repository\n> to check recent changes in origin/master I do:\n> git fetch origin master\n> git log origin master\n>\n> recently I found out that log doesn't show recent commits\n\nThe command \"git log origin master\" lists all commits\nof the branch \"origin\" affecting the file \"master\".\nAre you sure that is what you want?\nMaybe you meant:\n\n  $ git log origin/master # the history of upstream (\"origin\") branch \"master\"\n\nor\n\n  $ git log origin/master.. # changes in the active branch not merged\ninto upstream\n"},{"id":"155373","messageId":"AANLkTi=rT0S1H8pFt9d+FYVme4fjNNzY6O6evuBwo-ZB@mail.gmail.com","threadId":"25552","inReplyTo":"20101108090230.GC2430@burratino","subject":"Re: history missing","fromName":"Martin von Zweigbergk","fromEmail":"martin.von.zweigbergk@gmail.com","sentAt":"2010-11-08T11:56:51Z","receivedAt":"2010-11-08T11:56:51Z","isPatch":false,"sender":{"key":"martinvonz@gmail.com","avatar":"https://avatars.githubusercontent.com/u/891642?v=4"},"body":"On Mon, Nov 8, 2010 at 4:02 AM, Jonathan Nieder <jrnieder@gmail.com> wrote:\n> Hi Vitaliy,\n>\n> Vitaliy Semochkin wrote:\n>\n>> I cloned a remote repository\n>> to check recent changes in origin/master I do:\n>> git fetch origin master\n>> git log origin master\n>>\n>> recently I found out that log doesn't show recent commits\n>\n> Yes, this can be confusing.\n\nI agree and I believe this has come up a lot of times before. I talked\nto Jeff and Junio about this at GitTogether and Jeff said he has a patch\nfor it that he would try to get up to date in a while. (Thanks, Jeff!)\n"},{"id":"155379","messageId":"m3mxpkeyh4.fsf@localhost.localdomain","threadId":"25552","inReplyTo":"AANLkTi=rT0S1H8pFt9d+FYVme4fjNNzY6O6evuBwo-ZB@mail.gmail.com","subject":"Re: history missing","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2010-11-08T13:29:20Z","receivedAt":"2010-11-08T13:29:20Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Martin von Zweigbergk <martin.von.zweigbergk@gmail.com> writes:\n> On Mon, Nov 8, 2010 at 4:02 AM, Jonathan Nieder <jrnieder@gmail.com> wrote:\n>> Vitaliy Semochkin wrote:\n>>\n>>> I cloned a remote repository\n>>> to check recent changes in origin/master I do:\n>>> git fetch origin master\n\nThis fetches into FETCH_HEAD _only_ from \"origin\" *remote*.\n\n>>> git log origin master\n\nThis show log of 'origin/HEAD', which probably is 'origin/master'...\nbut which didn't get updated, and local branch 'master'.\n\n>>>\n>>> recently I found out that log doesn't show recent commits\n>>\n>> Yes, this can be confusing.\n> \n> I agree and I believe this has come up a lot of times before. I talked\n> to Jeff and Junio about this at GitTogether and Jeff said he has a patch\n> for it that he would try to get up to date in a while. (Thanks, Jeff!)\n\nHow can this issue be solved?  The meaning of parameters in 'git fetch'\nis different from meaning of parameters in 'git log'.\n\nUnless it is about adding hint / advice for when doing \n'git fetch <remote> <branch>'...\n\n-- \nJakub Narebski\nPoland\nShadeHawk on #git\n"},{"id":"155381","messageId":"AANLkTin2-WAHMjKFKVqq7Wbzvjg-KzMkBh1kCGxDH6Mf@mail.gmail.com","threadId":"25552","inReplyTo":"m3mxpkeyh4.fsf@localhost.localdomain","subject":"Re: history missing","fromName":"Martin von Zweigbergk","fromEmail":"martin.von.zweigbergk@gmail.com","sentAt":"2010-11-08T13:37:27Z","receivedAt":"2010-11-08T13:37:27Z","isPatch":false,"sender":{"key":"martinvonz@gmail.com","avatar":"https://avatars.githubusercontent.com/u/891642?v=4"},"body":"On Mon, Nov 8, 2010 at 8:29 AM, Jakub Narebski <jnareb@gmail.com> wrote:\n> Martin von Zweigbergk <martin.von.zweigbergk@gmail.com> writes:\n>> On Mon, Nov 8, 2010 at 4:02 AM, Jonathan Nieder <jrnieder@gmail.com> wrote:\n>>> Vitaliy Semochkin wrote:\n>>>\n>>>> I cloned a remote repository\n>>>> to check recent changes in origin/master I do:\n>>>> git fetch origin master\n>\n> This fetches into FETCH_HEAD _only_ from \"origin\" *remote*.\n>\n>>>> git log origin master\n>\n> This show log of 'origin/HEAD', which probably is 'origin/master'...\n> but which didn't get updated, and local branch 'master'.\n>\n>>>>\n>>>> recently I found out that log doesn't show recent commits\n>>>\n>>> Yes, this can be confusing.\n>>\n>> I agree and I believe this has come up a lot of times before. I talked\n>> to Jeff and Junio about this at GitTogether and Jeff said he has a patch\n>> for it that he would try to get up to date in a while. (Thanks, Jeff!)\n>\n> How can this issue be solved?  The meaning of parameters in 'git fetch'\n> is different from meaning of parameters in 'git log'.\n>\n\nSorry, maybe I misunderstood what the confusion was about. What I was\nreferring to was the confusion caused by 'git fetch origin master' not\nupdating 'refs/remotes/origin/master'.\n\n/Martin\n"},{"id":"155383","messageId":"201011081448.10723.jnareb@gmail.com","threadId":"25552","inReplyTo":"AANLkTin2-WAHMjKFKVqq7Wbzvjg-KzMkBh1kCGxDH6Mf@mail.gmail.com","subject":"Re: history missing","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2010-11-08T13:48:10Z","receivedAt":"2010-11-08T13:48:10Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"On Mon, 8 Nov 2010, Martin von Zweigbergk wrote:\n> On Mon, Nov 8, 2010 at 8:29 AM, Jakub Narebski <jnareb@gmail.com> wrote:\n>> Martin von Zweigbergk <martin.von.zweigbergk@gmail.com> writes:\n>>> On Mon, Nov 8, 2010 at 4:02 AM, Jonathan Nieder <jrnieder@gmail.com> wrote:\n>>>> Vitaliy Semochkin wrote:\n>>>>\n>>>>> I cloned a remote repository\n>>>>> to check recent changes in origin/master I do:\n>>>>> git fetch origin master\n>>\n>> This fetches into FETCH_HEAD _only_ from \"origin\" *remote*.\n>>\n>>>>> git log origin master\n>>\n>> This show log of 'origin/HEAD', which probably is 'origin/master'...\n>> but which didn't get updated, and local branch 'master'.\n>>\n>>>>>\n>>>>> recently I found out that log doesn't show recent commits\n>>>>\n>>>> Yes, this can be confusing.\n>>>\n>>> I agree and I believe this has come up a lot of times before. I talked\n>>> to Jeff and Junio about this at GitTogether and Jeff said he has a patch\n>>> for it that he would try to get up to date in a while. (Thanks, Jeff!)\n>>\n>> How can this issue be solved?  The meaning of parameters in 'git fetch'\n>> is different from meaning of parameters in 'git log'.\n> \n> Sorry, maybe I misunderstood what the confusion was about. What I was\n> referring to was the confusion caused by 'git fetch origin master' not\n> updating 'refs/remotes/origin/master'.\n\nShould it really do it?  What if it does not exist?  What if <remote>\nis specified via URL?\n\nIf I understand correctly current behavior of 'git fetch <remote> <branch>'\nwrt. FETCH_HEAD was meant for one-off 'git pull <remote> <branch>', or\nrather 'git pull <URL> <branch>'.\n\nSidenote: if original poster used\n\n  $ git fetch origin\n  $ git log origin\n\nI think everything would be all right.\n\n-- \nJakub Narebski\nPoland\n"},{"id":"155386","messageId":"AANLkTi=eFJ5qTWLD-AdczeDtSAtxs9xihuO+QQ8tVLyj@mail.gmail.com","threadId":"25552","inReplyTo":"201011081448.10723.jnareb@gmail.com","subject":"Re: history missing","fromName":"Martin von Zweigbergk","fromEmail":"martin.von.zweigbergk@gmail.com","sentAt":"2010-11-08T14:14:27Z","receivedAt":"2010-11-08T14:14:27Z","isPatch":false,"sender":{"key":"martinvonz@gmail.com","avatar":"https://avatars.githubusercontent.com/u/891642?v=4"},"body":"On Mon, Nov 8, 2010 at 8:48 AM, Jakub Narebski <jnareb@gmail.com> wrote:\n> On Mon, 8 Nov 2010, Martin von Zweigbergk wrote:\n>> Sorry, maybe I misunderstood what the confusion was about. What I was\n>> referring to was the confusion caused by 'git fetch origin master' not\n>> updating 'refs/remotes/origin/master'.\n>\n> Should it really do it?  What if it does not exist?  What if <remote>\n> is specified via URL?\n\nI would probably not expect it to be updated (even if the URL matches a\nconfigured remove). If the reference does not yet exist, I think I would\nexpect it to be created.\n\n> If I understand correctly current behavior of 'git fetch <remote> <branch>'\n> wrt. FETCH_HEAD was meant for one-off 'git pull <remote> <branch>', or\n> rather 'git pull <URL> <branch>'.\n\nAlso see http://thread.gmane.org/gmane.comp.version-control.git/127163/.\nJunio, Jeff and Avery can argue much better for and against this than I\ncan. I read it at some point, but I don't quite remember now if they did\ndiscuss the historical reasons for the current behavior in that thread.\n\n/Martin\n"},{"id":"155408","messageId":"20101108182801.GC30428@sigill.intra.peff.net","threadId":"25552","inReplyTo":"AANLkTi=eFJ5qTWLD-AdczeDtSAtxs9xihuO+QQ8tVLyj@mail.gmail.com","subject":"Re: history missing","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2010-11-08T18:28:02Z","receivedAt":"2010-11-08T18:28:02Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Nov 08, 2010 at 09:14:27AM -0500, Martin von Zweigbergk wrote:\n\n> On Mon, Nov 8, 2010 at 8:48 AM, Jakub Narebski <jnareb@gmail.com> wrote:\n> > On Mon, 8 Nov 2010, Martin von Zweigbergk wrote:\n> >> Sorry, maybe I misunderstood what the confusion was about. What I was\n> >> referring to was the confusion caused by 'git fetch origin master' not\n> >> updating 'refs/remotes/origin/master'.\n> >\n> > Should it really do it?  What if it does not exist?  What if <remote>\n> > is specified via URL?\n> \n> I would probably not expect it to be updated (even if the URL matches a\n> configured remove). If the reference does not yet exist, I think I would\n> expect it to be created.\n\nYeah, the patch I posted a while back (and referenced below) does not\nconvert URLs into remote names (nor do I think it should). But if you\ngive it the name of a configured remote, and it is fetching a ref from\nthe remote that is mentioned on the LHS of a configured fetch refspec,\nit will update the matching RHS of that refspec opportunistically.\n\nSo it should be pretty unsurprising to the user (see the thread below\nfor some discussion of when it could be surprising).\n\n> Also see http://thread.gmane.org/gmane.comp.version-control.git/127163/.\n> Junio, Jeff and Avery can argue much better for and against this than I\n> can. I read it at some point, but I don't quite remember now if they did\n> discuss the historical reasons for the current behavior in that thread.\n\nI took a look at cleaning up the patch from that thread. It causes 4 of\nthe test scripts to fail. Most disturbing is this one:\n\n  $ grep explicit.fetch t/t5510-fetch.sh\n  test_expect_success 'explicit fetch should not update tracking' '\n\nwhich checks for the direct opposite of the behavior we are discussing.\nThe test was added by Junio in late 2007. However, I can't seem to find\nany discussion on the mailing list about it. Junio, do you remember\nanything about this?\n\n-Peff\n"}]}