{"thread":{"id":"41772","subject":"When does git check for branch-X being uptodate with origin/branch-X?","startedAt":"2016-03-21T20:21:46Z","lastAt":"2016-03-22T19:23:10Z","messageCount":16,"participants":["Thomas Adam","Jeff King","Stefan Beller","Junio C Hamano","Philip Oakley"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"281378","messageId":"CA+39Oz4izkhtxbUH8cQoD5-DLKAtv9KnC9OkG_ZhFw6Ysg0+gw@mail.gmail.com","threadId":"41772","inReplyTo":null,"subject":"When does git check for branch-X being uptodate with origin/branch-X?","fromName":"Thomas Adam","fromEmail":"thomas.adam22@gmail.com","sentAt":"2016-03-21T20:21:46Z","receivedAt":"2016-03-21T20:21:46Z","isPatch":false,"sender":{"key":"thomas.adam22@gmail.com","avatar":"https://gravatar.com/avatar/137f9858bc6bfd5b2f743aefd988c81ce0cbd306248889df80e269519cfc8741?d=mp&s=160"},"body":"Hi all,\n\nSomething I've seen a few times of late (although I doubt that's any\nindication that the code has changed in Git) is the reporting of\nbranch-X being uptodate with origin/branch-X when it isn't.\n\nWhen does git check to see if branch-X has a remote tracking branch\nand that it has changes on it?  Only, the output below is misleading:\n\n% git checkout master\nSwitched to branch 'master'\nYour branch is up-to-date with 'fvwmorg/master'.\n\n[fvwm-cvs-to-git/docs]{10345}[0][master] % git pull\nremote: Counting objects: 26, done.\nremote: Compressing objects: 100% (12/12), done.\nremote: Total 26 (delta 18), reused 22 (delta 14), pack-reused 0\nUnpacking objects: 100% (26/26), done.\nFrom github.com:fvwmorg/fvwm\n   c029868..36cc898  master     -> fvwmorg/master\n   4f0c7ec..36cc898  ta/git-docs -> fvwmorg/ta/git-docs\nUpdating c029868..36cc898\nFast-forward\n[...]\n\nClearly, it's obvious that \"Your branch is up-to-date with\n'fvwmorg/master'.\" is misleading.  Note that in this case, there's no\npasswords or other hindrances to Git being able to work out that a\nbranch is behind another.\n\nAny light that can be shed on this, is much appreciated!\n\nKindly,\nThomas Adam\n"},{"id":"281379","messageId":"20160321202810.GD32071@sigill.intra.peff.net","threadId":"41772","inReplyTo":"CA+39Oz4izkhtxbUH8cQoD5-DLKAtv9KnC9OkG_ZhFw6Ysg0+gw@mail.gmail.com","subject":"Re: When does git check for branch-X being uptodate with origin/branch-X?","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2016-03-21T20:28:10Z","receivedAt":"2016-03-21T20:28:10Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Mar 21, 2016 at 08:21:46PM +0000, Thomas Adam wrote:\n\n> Something I've seen a few times of late (although I doubt that's any\n> indication that the code has changed in Git) is the reporting of\n> branch-X being uptodate with origin/branch-X when it isn't.\n> \n> When does git check to see if branch-X has a remote tracking branch\n> and that it has changes on it?  Only, the output below is misleading:\n> \n> % git checkout master\n> Switched to branch 'master'\n> Your branch is up-to-date with 'fvwmorg/master'.\n> \n> [fvwm-cvs-to-git/docs]{10345}[0][master] % git pull\n> remote: Counting objects: 26, done.\n> remote: Compressing objects: 100% (12/12), done.\n> remote: Total 26 (delta 18), reused 22 (delta 14), pack-reused 0\n> Unpacking objects: 100% (26/26), done.\n> From github.com:fvwmorg/fvwm\n>    c029868..36cc898  master     -> fvwmorg/master\n>    4f0c7ec..36cc898  ta/git-docs -> fvwmorg/ta/git-docs\n> Updating c029868..36cc898\n> Fast-forward\n> [...]\n> \n> Clearly, it's obvious that \"Your branch is up-to-date with\n> 'fvwmorg/master'.\" is misleading.  Note that in this case, there's no\n> passwords or other hindrances to Git being able to work out that a\n> branch is behind another.\n\nThe message from checking is looking only at your local\nrefs/remotes/fvwmorg/master branch, which is essentially a cache of what\nis in the actual remote repository.\n\nWe never contact other repositories unless explicitly asked to by\nfetch, pull, push, etc. If you want to have the most up-to-date value\nwithout merging, you can just \"git fetch\" to update the tracking\nbranches.\n\n-Peff\n"},{"id":"281380","messageId":"CA+39Oz4Atuv3N0QNj8o1SYgHzMUyES1QHUsWh-MdNiNr-xPM_w@mail.gmail.com","threadId":"41772","inReplyTo":"20160321202810.GD32071@sigill.intra.peff.net","subject":"Re: When does git check for branch-X being uptodate with origin/branch-X?","fromName":"Thomas Adam","fromEmail":"thomas.adam22@gmail.com","sentAt":"2016-03-21T20:43:17Z","receivedAt":"2016-03-21T20:43:17Z","isPatch":false,"sender":{"key":"thomas.adam22@gmail.com","avatar":"https://gravatar.com/avatar/137f9858bc6bfd5b2f743aefd988c81ce0cbd306248889df80e269519cfc8741?d=mp&s=160"},"body":"On 21 March 2016 at 20:28, Jeff King <peff@peff.net> wrote:\n> We never contact other repositories unless explicitly asked to by\n> fetch, pull, push, etc. If you want to have the most up-to-date value\n> without merging, you can just \"git fetch\" to update the tracking\n> branches.\n\nThanks.  I understand how to use git-fetch, it's more a case of\nwhether even printing that message is useful?  I appreciate it can\nonly go on the cached value, but it is still misleading to print that\nin the case where the cache might not be up to date.  Of course,\ndetermining that is a different problem.\n\n-- Thomas Adam\n"},{"id":"281382","messageId":"xmqqk2kvlfr5.fsf@gitster.mtv.corp.google.com","threadId":"41772","inReplyTo":"CA+39Oz4Atuv3N0QNj8o1SYgHzMUyES1QHUsWh-MdNiNr-xPM_w@mail.gmail.com","subject":"Re: When does git check for branch-X being uptodate with origin/branch-X?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-03-21T20:47:58Z","receivedAt":"2016-03-21T20:47:58Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Thomas Adam <thomas.adam22@gmail.com> writes:\n\n> On 21 March 2016 at 20:28, Jeff King <peff@peff.net> wrote:\n>> We never contact other repositories unless explicitly asked to by\n>> fetch, pull, push, etc. If you want to have the most up-to-date value\n>> without merging, you can just \"git fetch\" to update the tracking\n>> branches.\n>\n> Thanks.  I understand how to use git-fetch, it's more a case of\n> whether even printing that message is useful?  I appreciate it can\n> only go on the cached value, but it is still misleading to print that\n> in the case where the cache might not be up to date.\n\nThe real value of that message is \"you haven't done anything on top\nof what you last fetched from there\", so \"you are up-to-date\" may\nindeed be confusing, but I do not think of a better phrasing (other\nthan spelling out \"last fetched from there\" part explicitly, which\nis quite a mouthful).\n"},{"id":"281381","messageId":"CAGZ79kbD6hHSnjoQa5Ls0Zo35XLCVQA=XoS9xynfhJrR4qXFWg@mail.gmail.com","threadId":"41772","inReplyTo":"20160321202810.GD32071@sigill.intra.peff.net","subject":"Re: When does git check for branch-X being uptodate with origin/branch-X?","fromName":"Stefan Beller","fromEmail":"sbeller@google.com","sentAt":"2016-03-21T20:48:16Z","receivedAt":"2016-03-21T20:48:16Z","isPatch":false,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"On Mon, Mar 21, 2016 at 1:28 PM, Jeff King <peff@peff.net> wrote:\n> On Mon, Mar 21, 2016 at 08:21:46PM +0000, Thomas Adam wrote:\n>\n>> Something I've seen a few times of late (although I doubt that's any\n>> indication that the code has changed in Git) is the reporting of\n>> branch-X being uptodate with origin/branch-X when it isn't.\n>>\n>> When does git check to see if branch-X has a remote tracking branch\n>> and that it has changes on it?  Only, the output below is misleading:\n>>\n>> % git checkout master\n>> Switched to branch 'master'\n>> Your branch is up-to-date with 'fvwmorg/master'.\n>>\n>> [fvwm-cvs-to-git/docs]{10345}[0][master] % git pull\n>> remote: Counting objects: 26, done.\n>> remote: Compressing objects: 100% (12/12), done.\n>> remote: Total 26 (delta 18), reused 22 (delta 14), pack-reused 0\n>> Unpacking objects: 100% (26/26), done.\n>> From github.com:fvwmorg/fvwm\n>>    c029868..36cc898  master     -> fvwmorg/master\n>>    4f0c7ec..36cc898  ta/git-docs -> fvwmorg/ta/git-docs\n>> Updating c029868..36cc898\n>> Fast-forward\n>> [...]\n>>\n>> Clearly, it's obvious that \"Your branch is up-to-date with\n>> 'fvwmorg/master'.\" is misleading.  Note that in this case, there's no\n>> passwords or other hindrances to Git being able to work out that a\n>> branch is behind another.\n>\n> The message from checking is looking only at your local\n> refs/remotes/fvwmorg/master branch, which is essentially a cache of what\n> is in the actual remote repository.\n>\n> We never contact other repositories unless explicitly asked to by\n> fetch, pull, push, etc. If you want to have the most up-to-date value\n> without merging, you can just \"git fetch\" to update the tracking\n> branches.\n\nTo elaborate on that:\n\nIf you do \"git fetch\" instead of \"git pull\" and then followed by\n\"git status\" it should tell you something like:\n\n    Your branch is behind 'origin/master' by 73 commits, and can be\nfast-forwarded.\n\nThe origin/ (or in your case fvwmorg/) is a local \"cache\" on what\nwe think the remote is at. the remote may change of course.\n\nStefan\n\n>\n> -Peff\n> --\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n"},{"id":"281384","messageId":"20160321205043.GA436@sigill.intra.peff.net","threadId":"41772","inReplyTo":"CA+39Oz4Atuv3N0QNj8o1SYgHzMUyES1QHUsWh-MdNiNr-xPM_w@mail.gmail.com","subject":"Re: When does git check for branch-X being uptodate with origin/branch-X?","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2016-03-21T20:50:44Z","receivedAt":"2016-03-21T20:50:44Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Mar 21, 2016 at 08:43:17PM +0000, Thomas Adam wrote:\n\n> On 21 March 2016 at 20:28, Jeff King <peff@peff.net> wrote:\n> > We never contact other repositories unless explicitly asked to by\n> > fetch, pull, push, etc. If you want to have the most up-to-date value\n> > without merging, you can just \"git fetch\" to update the tracking\n> > branches.\n> \n> Thanks.  I understand how to use git-fetch, it's more a case of\n> whether even printing that message is useful?  I appreciate it can\n> only go on the cached value, but it is still misleading to print that\n> in the case where the cache might not be up to date.  Of course,\n> determining that is a different problem.\n\nI don't think it is limited to this particular message. _Any_ operation\nthat uses the tracking branches is going to potentially be out of date\nwith respect to what has happened on a remote server (so any time you\nlook at @{upstream}, or do a \"rebase\" without an arguments, etc).\n\nThose things are useful, even if your local tracking branch may not\nreflect the latest value on the server. If there is anything to fix,\nIMHO, it is for the documentation to make more clear the mental model\nof the workflow of \"fetch separately, then all other operations are\ndisconnected\".\n\nBut that's just my opinion. Did you have some specific change you're\ninterested in? I don't think removing that message is productive; it\n_is_ useful information. Perhaps it could be more clear that we are\ntalking about the tracking branch?\n\n-Peff\n"},{"id":"281385","messageId":"xmqqfuvjlfjz.fsf@gitster.mtv.corp.google.com","threadId":"41772","inReplyTo":"20160321202810.GD32071@sigill.intra.peff.net","subject":"Re: When does git check for branch-X being uptodate with origin/branch-X?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-03-21T20:52:16Z","receivedAt":"2016-03-21T20:52:16Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> The message from checking is looking only at your local\n> refs/remotes/fvwmorg/master branch, which is essentially a cache of what\n> is in the actual remote repository.\n\nSaying \"cache of what is ...\" would further confuse people, I am\nafraid.  We just keep a record of what we last observed and we do\nnot actively go out and update the remote tracking branch without\nbeing told by the end user.  \"cache of what we saw there when we\ncontacted them the last time\" is OK ;-).\n\n>\n> We never contact other repositories unless explicitly asked to by\n> fetch, pull, push, etc. If you want to have the most up-to-date value\n> without merging, you can just \"git fetch\" to update the tracking\n> branches.\n>\n> -Peff\n"},{"id":"281386","messageId":"CA+39Oz51SaKAWsJ027fzhR3CRDfqmy1Dp7qcpx-k9-HrzGKcwg@mail.gmail.com","threadId":"41772","inReplyTo":"20160321205043.GA436@sigill.intra.peff.net","subject":"Re: When does git check for branch-X being uptodate with origin/branch-X?","fromName":"Thomas Adam","fromEmail":"thomas.adam22@gmail.com","sentAt":"2016-03-21T21:12:18Z","receivedAt":"2016-03-21T21:12:18Z","isPatch":false,"sender":{"key":"thomas.adam22@gmail.com","avatar":"https://gravatar.com/avatar/137f9858bc6bfd5b2f743aefd988c81ce0cbd306248889df80e269519cfc8741?d=mp&s=160"},"body":"On 21 March 2016 at 20:50, Jeff King <peff@peff.net> wrote:\n> But that's just my opinion. Did you have some specific change you're\n> interested in? I don't think removing that message is productive; it\n> _is_ useful information. Perhaps it could be more clear that we are\n> talking about the tracking branch?\n\nI don't have a specific change in mind per-se, rather than to discuss\nhow we might be able to improve the error message, or document\nsomewhere that it's referring to the tracking branch.  Maybe that's\nthe point--is it worth mentioning the time/date of when the cache was\nlast updated?  That is:\n\n\"branch-X is uptodate with origin/branch-X (as of DD-MM-YY HH:MM:SS)\"\n\nNo one's suggesting that this message is removed, I'm not sure where\nyou got that from?\n\n-- Thomas Adam\n"},{"id":"281387","messageId":"20160321211834.GA1068@sigill.intra.peff.net","threadId":"41772","inReplyTo":"CA+39Oz51SaKAWsJ027fzhR3CRDfqmy1Dp7qcpx-k9-HrzGKcwg@mail.gmail.com","subject":"Re: When does git check for branch-X being uptodate with origin/branch-X?","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2016-03-21T21:18:34Z","receivedAt":"2016-03-21T21:18:34Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Mar 21, 2016 at 09:12:18PM +0000, Thomas Adam wrote:\n\n> On 21 March 2016 at 20:50, Jeff King <peff@peff.net> wrote:\n> > But that's just my opinion. Did you have some specific change you're\n> > interested in? I don't think removing that message is productive; it\n> > _is_ useful information. Perhaps it could be more clear that we are\n> > talking about the tracking branch?\n> \n> I don't have a specific change in mind per-se, rather than to discuss\n> how we might be able to improve the error message, or document\n> somewhere that it's referring to the tracking branch.  Maybe that's\n> the point--is it worth mentioning the time/date of when the cache was\n> last updated?  That is:\n> \n> \"branch-X is uptodate with origin/branch-X (as of DD-MM-YY HH:MM:SS)\"\n\nAgain, just my opinion, but that looks awfully clunky. And it doesn't\naddress the other messages (you might be behind origin/branch-X by N\ncommits, or ahead by N, but only as of that particular date). Do we want\nto annotate every message whose value was computed based on a tracking\nbranch?\n\n> No one's suggesting that this message is removed, I'm not sure where\n> you got that from?\n\nYou said earlier:\n\n> [...]it's more a case of whether even printing that message is useful?\n\nI didn't know quite what you had in mind, which is why I asked. If we\nall agree that removing it is a bad idea, then good, we don't have to\nbother discussing that option. :)\n\n-Peff\n"},{"id":"281388","messageId":"CA+39Oz6A8WSFcXa4oALtuQK-uYJ+y43ZnFgqn3MRxQ4KSePWAw@mail.gmail.com","threadId":"41772","inReplyTo":"20160321211834.GA1068@sigill.intra.peff.net","subject":"Re: When does git check for branch-X being uptodate with origin/branch-X?","fromName":"Thomas Adam","fromEmail":"thomas.adam22@gmail.com","sentAt":"2016-03-21T21:22:50Z","receivedAt":"2016-03-21T21:22:50Z","isPatch":false,"sender":{"key":"thomas.adam22@gmail.com","avatar":"https://gravatar.com/avatar/137f9858bc6bfd5b2f743aefd988c81ce0cbd306248889df80e269519cfc8741?d=mp&s=160"},"body":"On 21 March 2016 at 21:18, Jeff King <peff@peff.net> wrote:\n> Again, just my opinion, but that looks awfully clunky. And it doesn't\n> address the other messages (you might be behind origin/branch-X by N\n> commits, or ahead by N, but only as of that particular date). Do we want\n> to annotate every message whose value was computed based on a tracking\n> branch?\n\nHmm.  I would hope not.  I'll wait for others to make a call on this,\nbut it's about all I can suggest without significantly bloating the\nmessage which isn't desirable either.\n\n>> No one's suggesting that this message is removed, I'm not sure where\n>> you got that from?\n>\n> You said earlier:\n>\n>> [...]it's more a case of whether even printing that message is useful?\n>\n> I didn't know quite what you had in mind, which is why I asked. If we\n> all agree that removing it is a bad idea, then good, we don't have to\n> bother discussing that option. :)\n\nAh, oops!  I was meaning more, whether to print the message in the\ncase where the branch was uptodate, but now I appreciate it's cached.\nApologies for the confusion.\n\n-- Thomas Adam\n"},{"id":"281391","messageId":"CAGZ79kabn+pA4Fs2Y4E6Mwy-dKW6SZZ+LZK7_LjhqagcVc-xDg@mail.gmail.com","threadId":"41772","inReplyTo":"CA+39Oz51SaKAWsJ027fzhR3CRDfqmy1Dp7qcpx-k9-HrzGKcwg@mail.gmail.com","subject":"Re: When does git check for branch-X being uptodate with origin/branch-X?","fromName":"Stefan Beller","fromEmail":"sbeller@google.com","sentAt":"2016-03-21T21:50:13Z","receivedAt":"2016-03-21T21:50:13Z","isPatch":false,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"On Mon, Mar 21, 2016 at 2:12 PM, Thomas Adam <thomas.adam22@gmail.com> wrote:\n> On 21 March 2016 at 20:50, Jeff King <peff@peff.net> wrote:\n>> But that's just my opinion. Did you have some specific change you're\n>> interested in? I don't think removing that message is productive; it\n>> _is_ useful information. Perhaps it could be more clear that we are\n>> talking about the tracking branch?\n>\n> I don't have a specific change in mind per-se, rather than to discuss\n> how we might be able to improve the error message, or document\n> somewhere that it's referring to the tracking branch.  Maybe that's\n> the point--is it worth mentioning the time/date of when the cache was\n> last updated?  That is:\n>\n> \"branch-X is uptodate with origin/branch-X (as of DD-MM-YY HH:MM:SS)\"\n\nActually I like that feature of recording the last known time we fetched,\nI would have found that information useful in the past a few times. (unrelated\nto this exact message, but if we were to make this change, we would\nneed to record\nthe time somewhere, and that's what I would have wanted)\n\nI would think putting the date in this exact spot is a similar level of advice\nwhat Eric was proposing earlier today in $gmane/289438\n(was: [PATCH][Outreachy] branch -D: allow - as abbreviation of @{-1},\ngive advice when force deleting a branch on how to recover that branch)\nSo people (specially beginners as this points out more of the inner workings)\nmay find it useful, but some would find it too noisy and rather turn it off.\n\nStefan\n\n>\n> No one's suggesting that this message is removed, I'm not sure where\n> you got that from?\n>\n> -- Thomas Adam\n> --\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n"},{"id":"281392","messageId":"xmqq1t73lciw.fsf@gitster.mtv.corp.google.com","threadId":"41772","inReplyTo":"CAGZ79kabn+pA4Fs2Y4E6Mwy-dKW6SZZ+LZK7_LjhqagcVc-xDg@mail.gmail.com","subject":"Re: When does git check for branch-X being uptodate with origin/branch-X?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-03-21T21:57:43Z","receivedAt":"2016-03-21T21:57:43Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Stefan Beller <sbeller@google.com> writes:\n\n>> \"branch-X is uptodate with origin/branch-X (as of DD-MM-YY HH:MM:SS)\"\n>\n> Actually I like that feature of recording the last known time we fetched,\n> I would have found that information useful in the past a few times. (unrelated\n> to this exact message, but if we were to make this change, we would\n> need to record\n> the time somewhere, and that's what I would have wanted)\n\nLike in reflog for refs/remotes/origin/branch-X?\n"},{"id":"281394","messageId":"CAGZ79kaUY86nUiG9urgDhVGZ5yc1=63nvJGufw7K8TAc3ytmdA@mail.gmail.com","threadId":"41772","inReplyTo":"xmqq1t73lciw.fsf@gitster.mtv.corp.google.com","subject":"Re: When does git check for branch-X being uptodate with origin/branch-X?","fromName":"Stefan Beller","fromEmail":"sbeller@google.com","sentAt":"2016-03-21T22:11:16Z","receivedAt":"2016-03-21T22:11:16Z","isPatch":false,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"On Mon, Mar 21, 2016 at 2:57 PM, Junio C Hamano <gitster@pobox.com> wrote:\n> Stefan Beller <sbeller@google.com> writes:\n>\n>>> \"branch-X is uptodate with origin/branch-X (as of DD-MM-YY HH:MM:SS)\"\n>>\n>> Actually I like that feature of recording the last known time we fetched,\n>> I would have found that information useful in the past a few times. (unrelated\n>> to this exact message, but if we were to make this change, we would\n>> need to record\n>> the time somewhere, and that's what I would have wanted)\n>\n> Like in reflog for refs/remotes/origin/branch-X?\n>\n\nHeh, exactly that. Though the git-reflog tool is missing the time\nas it appears on the reflog file.\n\nJust quoting from my reflog file\n\n$ cat .git/logs/refs/remotes/origin/master\nf3adf457e046f92f039353762a78dcb3afb2cb13\n754884255bb580df159e58defa81cdd30b5c430c Stefan Beller\n<sbeller@google.com> 1452529563 -0800 fetch --append origin:\nfast-forward\n754884255bb580df159e58defa81cdd30b5c430c\nfc10eb5b87a75af2cb93a3932897572f2c544915 Stefan Beller\n<sbeller@google.com> 1452709338 -0800 fetch --append origin:\nfast-forward\nfc10eb5b87a75af2cb93a3932897572f2c544915\n3ee1e0fe11e2eb617170d0487fccfffc67f2b82b Stefan Beller\n<sbeller@google.com> 1453411906 -0800 fetch --append origin:\nfast-forward\n3ee1e0fe11e2eb617170d0487fccfffc67f2b82b\ne572fef9d459497de2bd719747d5625a27c9b41d Stefan Beller\n<sbeller@google.com> 1453508448 -0800 fetch --append origin:\nfast-forward\ne572fef9d459497de2bd719747d5625a27c9b41d\nd10e2cb9d0299a26f43d57dd5bdcf2b3f86a30b3 Stefan Beller\n<sbeller@google.com> 1453939673 -0800 fetch --append origin:\nfast-forward\nd10e2cb9d0299a26f43d57dd5bdcf2b3f86a30b3\n701fa7fe35768fd6e291b667566ac4b434f6e1c9 Stefan Beller\n<sbeller@google.com> 1454364624 -0800 fetch --append origin:\nfast-forward\n701fa7fe35768fd6e291b667566ac4b434f6e1c9\n07c314d22dc8b0a982e76e7498a3f4d384062491 Stefan Beller\n<sbeller@google.com> 1454445124 -0800 fetch --append origin:\nfast-forward\n07c314d22dc8b0a982e76e7498a3f4d384062491\n563e38491eaee6e02643a22c9503d4f774d6c5be Stefan Beller\n<sbeller@google.com> 1454610734 -0800 fetch --append origin:\nfast-forward\n563e38491eaee6e02643a22c9503d4f774d6c5be\nff4ea6004fb48146330d663d64a71e7774f059f9 Stefan Beller\n<sbeller@google.com> 1455040507 -0800 fetch --append origin:\nfast-forward\nff4ea6004fb48146330d663d64a71e7774f059f9\n494398473714dcbedb38b1ac79b531c7384b3bc4 Stefan Beller\n<sbeller@google.com> 1455150849 -0800 rebase -i (start): checkout\norigin/master: fast-forward\n494398473714dcbedb38b1ac79b531c7384b3bc4\n0233b800c838ddda41db318ee396320b3c21a560 Stefan Beller\n<sbeller@google.com> 1455824915 -0800 fetch --append origin:\nfast-forward\n0233b800c838ddda41db318ee396320b3c21a560\n70bd996071bf724a7b151c81a165e8837179d6d7 Stefan Beller\n<sbeller@google.com> 1456250296 -0800 fetch --append origin:\nfast-forward\n70bd996071bf724a7b151c81a165e8837179d6d7\n7c0da37d7b0e09c199788191b322bf45fd003e3c Stefan Beller\n<sbeller@google.com> 1456337953 -0800 fetch --append origin:\nfast-forward\n7c0da37d7b0e09c199788191b322bf45fd003e3c\n56f37fda511e1615dc6df86c68f3b841711a7828 Stefan Beller\n<sbeller@google.com> 1456358750 -0800 fetch --append origin:\nfast-forward\n56f37fda511e1615dc6df86c68f3b841711a7828\nf02fbc4f9433937ee0463d0342d6d7d97e1f6f1e Stefan Beller\n<sbeller@google.com> 1456530630 -0800 fetch --append origin:\nfast-forward\nf02fbc4f9433937ee0463d0342d6d7d97e1f6f1e\nd285ab0a41c5c04222cf356066d1df1e6096c5a7 Stefan Beller\n<sbeller@google.com> 1457045695 -0800 fetch --append origin:\nfast-forward\nd285ab0a41c5c04222cf356066d1df1e6096c5a7\nab5d01a29eb7380ceab070f0807c2939849c44bc Stefan Beller\n<sbeller@google.com> 1457133708 -0800 fetch --append origin:\nfast-forward\nab5d01a29eb7380ceab070f0807c2939849c44bc\ned9067f705aa51819c7dfff7e4190dd267beaf5d Stefan Beller\n<sbeller@google.com> 1457652712 -0800 fetch --append origin:\nfast-forward\ned9067f705aa51819c7dfff7e4190dd267beaf5d\ndb6696f653b917509dac1ac13b922e12773a84ff Stefan Beller\n<sbeller@google.com> 1458061695 -0700 fetch --append origin:\nfast-forward\ndb6696f653b917509dac1ac13b922e12773a84ff\nc2c5f6b1e479f2c38e0e01345350620944e3527f Stefan Beller\n<sbeller@google.com> 1458083837 -0700 fetch --append origin:\nfast-forward\nc2c5f6b1e479f2c38e0e01345350620944e3527f\nd9c691a759d62cef53a6cc11864a2ef4b0829244 Stefan Beller\n<sbeller@google.com> 1458167761 -0700 fetch --append origin:\nfast-forward\nd9c691a759d62cef53a6cc11864a2ef4b0829244\n44915db9358936fbad21221fed3abf86166696fd Stefan Beller\n<sbeller@google.com> 1458255346 -0700 fetch --append origin:\nfast-forward\n44915db9358936fbad21221fed3abf86166696fd\nb552ff8c67d1b1c60d7d1fcf25a0603a37649b4f Stefan Beller\n<sbeller@google.com> 1458580955 -0700 fetch --append origin:\nfast-forward\n\nI do understand the \"fetch --append origin fast-forward\", (I assume\nthey are coming from regular fetches). But the \"rebase -i (start):\ncheckout origin/master: fast-forward\" seems to have recorded there in\nerror as I never rebased origin/master itself, but only other stuff on\ntop of origin/master.\nWhy would we have such an entry in there?\n\nThanks,\nStefan\n"},{"id":"281398","messageId":"xmqqlh5bjvvf.fsf@gitster.mtv.corp.google.com","threadId":"41772","inReplyTo":"CAGZ79kaUY86nUiG9urgDhVGZ5yc1=63nvJGufw7K8TAc3ytmdA@mail.gmail.com","subject":"Re: When does git check for branch-X being uptodate with origin/branch-X?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-03-21T22:42:44Z","receivedAt":"2016-03-21T22:42:44Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Stefan Beller <sbeller@google.com> writes:\n\n> On> 494398473714dcbedb38b1ac79b531c7384b3bc4 Stefan Beller\n> <sbeller@google.com> 1455150849 -0800 rebase -i (start): checkout\n> origin/master: fast-forward\n>\n> I do understand the \"fetch --append origin fast-forward\", (I assume\n> they are coming from regular fetches). But the \"rebase -i (start):\n> checkout origin/master: fast-forward\" seems to have recorded there in\n> error as I never rebased origin/master itself, but only other stuff on\n> top of origin/master.\n> Why would we have such an entry in there?\n\nYou tell us--what did you do back then?  ;-)\n\nIt indeed looks strange.  You shouldn't be able to check out a\nremote-tracking branch, so any log for local operation would be in\nHEAD's reflog, but not in remotes' reflog.\n\nI was curious to see what kind of entries I have and I do not seem\nto have anything strange.\n\n$ find .git/logs/refs/remotes/ -type f -print0 |\n  xargs -0 sed -Ee '\n    s/^[0-9a-f]{40} [0-9a-f]{40} [^>]*> [0-9]* [-+][0-9]{4}       //\n  ' |\n  sort -u\nfetch --append l10n: fast-forward\nfetch git-gui: fast-forward\nfetch -v git-svn: fast-forward\nfetch -v paulus: fast-forward\npull git-svn: fast-forward\npull git-svn: forced-update\npull -s subtree paulus: fast-forward\npull -v git-svn ks/svn-pathnameencoding-4: storing head\nupdate by push\n\nPuzzled...\n"},{"id":"281399","messageId":"CAGZ79kYWPjRLHsG=mfA6Z7pjoYLxGtiGCvXCBcdyL5yyikS=1Q@mail.gmail.com","threadId":"41772","inReplyTo":"xmqqlh5bjvvf.fsf@gitster.mtv.corp.google.com","subject":"Re: When does git check for branch-X being uptodate with origin/branch-X?","fromName":"Stefan Beller","fromEmail":"sbeller@google.com","sentAt":"2016-03-21T23:18:40Z","receivedAt":"2016-03-21T23:18:40Z","isPatch":false,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"On Mon, Mar 21, 2016 at 3:42 PM, Junio C Hamano <gitster@pobox.com> wrote:\n> Stefan Beller <sbeller@google.com> writes:\n>\n>> On> 494398473714dcbedb38b1ac79b531c7384b3bc4 Stefan Beller\n>> <sbeller@google.com> 1455150849 -0800 rebase -i (start): checkout\n>> origin/master: fast-forward\n>>\n>> I do understand the \"fetch --append origin fast-forward\", (I assume\n>> they are coming from regular fetches). But the \"rebase -i (start):\n>> checkout origin/master: fast-forward\" seems to have recorded there in\n>> error as I never rebased origin/master itself, but only other stuff on\n>> top of origin/master.\n>> Why would we have such an entry in there?\n>\n> You tell us--what did you do back then?  ;-)\n\nI wish I knew, my memories are not as good as a disk.\nIt was Thursday 11th 2016, around 4:30 pm local time.\nI would assume I exercised Git the \"usual\" way as always.\n\nThis entry doesn't appear in .git/logs/HEAD.\n\nHowever\n    grep -r \"rebase -i (start): checkout origin/master: fast-forward\"\n-- .git/logs\nyields\n.git/logs/refs/remotes/origin/master\n.git/logs/refs/remotes/origin/nd/exclusion-regression-fix\n.git/logs/refs/remotes/origin/ew/connect-verbose\n.git/logs/refs/remotes/origin/next\n.git/logs/refs/remotes/kernelorg/todo\n.git/logs/refs/remotes/kernelorg/master\n.git/logs/refs/remotes/kernelorg/next\n.git/logs/refs/remotes/kernelorg/next\n\nFor example I am pretty sure I never touched\norigin/nd/exclusion-regression-fix and\norigin/ew/connect-verbose\ndirectly myself (i.e. checking them out or anything. The only way I\ngot in contact with\nthem is via \"git fetch --all\" and the remote side merging these\nbranches into various\nother branches.\n\n>\n> It indeed looks strange.  You shouldn't be able to check out a\n> remote-tracking branch, so any log for local operation would be in\n> HEAD's reflog, but not in remotes' reflog.\n>\n> I was curious to see what kind of entries I have and I do not seem\n> to have anything strange.\n>\n> $ find .git/logs/refs/remotes/ -type f -print0 |\n>   xargs -0 sed -Ee '\n>     s/^[0-9a-f]{40} [0-9a-f]{40} [^>]*> [0-9]* [-+][0-9]{4}       //\n>   ' |\n>   sort -u\n> fetch --append l10n: fast-forward\n> fetch git-gui: fast-forward\n> fetch -v git-svn: fast-forward\n> fetch -v paulus: fast-forward\n> pull git-svn: fast-forward\n> pull git-svn: forced-update\n> pull -s subtree paulus: fast-forward\n> pull -v git-svn ks/svn-pathnameencoding-4: storing head\n> update by push\n>\n> Puzzled...\n\ndoing a similar thing here:\n$ find .git/logs/refs/remotes/ -type f -print0 |   xargs -0 cat  |cut\n-c134-|sort -u\nfetch --append origin: fast-forward\nfetch --append origin: forced-update\nfetch --append origin: storing head\n[omitting lots of other remotes which also have \"fetch --append\" lines]\nrebase -i (start): checkout origin/master: fast-forward\nrebase -i (start): checkout origin/master: storing head\nupdate by push\n\nAs I have lots of terminals open, I suspect my confusing workflow doesn't\nhelp either, i.e. a normal thing for me is:\nterm1: git rebase -i origin/master\nterm1: <resolve merge conflict, edit patches, etc>\nterm2: git fetch --all\nterm1: continue on <resolve merge conflict, edit patches, etc>\nterm1: actually finish the rebase\n\nI tried reproducing this quickly, but I did not succeed. I'll try to\nkeep an eye on this.\n\nThanks,\nStefan\n"},{"id":"281470","messageId":"F2B253E6836D4C948D85BADEAE2527C0@PhilipOakley","threadId":"41772","inReplyTo":"CA+39Oz4Atuv3N0QNj8o1SYgHzMUyES1QHUsWh-MdNiNr-xPM_w@mail.gmail.com","subject":"Re: When does git check for branch-X being uptodate with origin/branch-X?","fromName":"Philip Oakley","fromEmail":"philipoakley@iee.org","sentAt":null,"receivedAt":"2016-03-22T19:23:10Z","isPatch":false,"sender":{"key":"philipoakley@iee.email","avatar":"https://avatars.githubusercontent.com/u/914343?v=4"},"body":"From: \"Thomas Adam\" <thomas.adam22@gmail.com>\nSent: Monday, March 21, 2016 8:43 PM\n> On 21 March 2016 at 20:28, Jeff King <peff@peff.net> wrote:\n>> We never contact other repositories unless explicitly asked to by\n>> fetch, pull, push, etc. If you want to have the most up-to-date value\n>> without merging, you can just \"git fetch\" to update the tracking\n>> branches.\n>\n> Thanks.  I understand how to use git-fetch, it's more a case of\n> whether even printing that message is useful?  I appreciate it can\n> only go on the cached value, but it is still misleading to print that\n> in the case where the cache might not be up to date.  Of course,\n> determining that is a different problem.\n>\n> -- Thomas Adam\n\nThis issue (that the tracking is passive, not 'active') may also be \nsomething for the 'Beginner mode' discussion.\n\nThe rtb (remote tracking branch) was something I'd noted earlier in the \ninitial 'Beginner mode', discussion, $gmane/288727/focus=288812 (GSoC \nIntroduction; 14 Mar '16, 22:08)\n\n\"The Git data model is very powerful and it does take a lot of 'unlearning'\nof old expectations (which is very hard) before the capabilities of the git\nmodel become well established in the users mind. For example, remote\ntracking branches are not remote but local, and are a reverse polish\ndescription (a local branch which keeps track of a remote's branch, from the\nlast time you looked).\n\nDifferent people get different parts of the model in different orders and\ndifferent rates. Identifying the many issues (in model understanding) may be\na start for identifying which command/options should be targeted.\"\n\n--\nPhilip \n"}]}