{"thread":{"id":"23449","subject":"git log of remote repositories.","startedAt":"2010-04-13T23:25:17Z","lastAt":"2010-04-14T20:39:29Z","messageCount":12,"participants":["Aghiles","Shawn O. Pearce","Dave Olszewski","Johannes Gilger","Tomas Carnecky","Sverre Rabbelier"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"139440","messageId":"u2n3abd05a91004131625k500e79bbsc8ffa6455a85332d@mail.gmail.com","threadId":"23449","inReplyTo":null,"subject":"git log of remote repositories.","fromName":"Aghiles","fromEmail":"aghilesk@gmail.com","sentAt":"2010-04-13T23:25:17Z","receivedAt":"2010-04-13T23:25:17Z","isPatch":false,"sender":{"key":"aghilesk@gmail.com","avatar":null},"body":"Hello,\n\nI have a local branch that is a tracking a remote branch. I want to see\nwhat are the modifications upstream, _before_ I pull. I tried\n'git log origin' but that's only the point from where I pulled last.\n\nIs there a way to do that?\n\nI see a --remote option in recent git versions, does it have something\nto do with I want to achieve?\n\nThank you,\n\n  -- aghiles\n"},{"id":"139441","messageId":"20100413232747.GD17484@spearce.org","threadId":"23449","inReplyTo":"u2n3abd05a91004131625k500e79bbsc8ffa6455a85332d@mail.gmail.com","subject":"Re: git log of remote repositories.","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2010-04-13T23:27:47Z","receivedAt":"2010-04-13T23:27:47Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Aghiles <aghilesk@gmail.com> wrote:\n> I have a local branch that is a tracking a remote branch. I want to see\n> what are the modifications upstream, _before_ I pull. I tried\n> 'git log origin' but that's only the point from where I pulled last.\n> \n> Is there a way to do that?\n\ngit fetch\ngit log ..origin\n \n-- \nShawn.\n"},{"id":"139444","messageId":"alpine.DEB.2.00.1004131903190.25327@narbuckle.genericorp.net","threadId":"23449","inReplyTo":"20100413232747.GD17484@spearce.org","subject":"Re: Re: git log of remote repositories.","fromName":"Dave Olszewski","fromEmail":"cxreg@pobox.com","sentAt":"2010-04-14T02:15:01Z","receivedAt":"2010-04-14T02:15:01Z","isPatch":false,"sender":{"key":"cxreg@pobox.com","avatar":"https://avatars.githubusercontent.com/u/55474?v=4"},"body":"On Tue, 13 Apr 2010, Shawn O. Pearce wrote:\n\n> Aghiles <aghilesk@gmail.com> wrote:\n>> I have a local branch that is a tracking a remote branch. I want to see\n>> what are the modifications upstream, _before_ I pull. I tried\n>> 'git log origin' but that's only the point from where I pulled last.\n>>\n>> Is there a way to do that?\n>\n> git fetch\n> git log ..origin\n\nOr the more portable and concise, since 1.7.0:\n\ngit log ..@{u}\n"},{"id":"139468","messageId":"slrnhsba0k.h9q.heipei@dualtron.heipei.net","threadId":"23449","inReplyTo":"u2n3abd05a91004131625k500e79bbsc8ffa6455a85332d@mail.gmail.com","subject":"Re: git log of remote repositories.","fromName":"Johannes Gilger","fromEmail":"heipei@hackvalue.de","sentAt":"2010-04-14T11:33:02Z","receivedAt":"2010-04-14T11:33:02Z","isPatch":false,"sender":{"key":"heipei@hackvalue.de","avatar":"https://avatars.githubusercontent.com/u/6072?v=4"},"body":"On 2010-04-13, Aghiles <aghilesk@gmail.com> wrote:\n> I have a local branch that is a tracking a remote branch. I want to see\n> what are the modifications upstream, _before_ I pull. I tried\n> 'git log origin' but that's only the point from where I pulled last.\n>\n> Is there a way to do that?\nAFAIK no, the operations have to be local.\n\nIn order to see if there are any new changes to be pulled you could do\nthis: git fetch --dry-run\n\nGreetings,\nJojo\n\n-- \nJohannes Gilger <heipei@hackvalue.de>\nhttp://heipei.net\nGPG-Key: 0xD47A7FFC\nGPG-Fingerprint: 5441 D425 6D4A BD33 B580  618C 3CDC C4D0 D47A 7FFC\n"},{"id":"139494","messageId":"x2q3abd05a91004141208x6e154385l8b7ce6488d65f21b@mail.gmail.com","threadId":"23449","inReplyTo":"slrnhsba0k.h9q.heipei@dualtron.heipei.net","subject":"Re: git log of remote repositories.","fromName":"Aghiles","fromEmail":"aghilesk@gmail.com","sentAt":"2010-04-14T19:08:25Z","receivedAt":"2010-04-14T19:08:25Z","isPatch":false,"sender":{"key":"aghilesk@gmail.com","avatar":null},"body":"On Wed, Apr 14, 2010, Johannes Gilger  wrote:\n> AFAIK no, the operations have to be local.\n>\n> In order to see if there are any new changes to be pulled you could do\n> this: git fetch --dry-run\n\nIt seems to me like a major restriction! Especially that I am tracking\na remote branch ... No possibilities to do a diff or a log without fetching?\nVery sad. :(\n\n  -- aghiles\n"},{"id":"139500","messageId":"4BC61AC6.3050700@dbservice.com","threadId":"23449","inReplyTo":"x2q3abd05a91004141208x6e154385l8b7ce6488d65f21b@mail.gmail.com","subject":"Re: git log of remote repositories.","fromName":"Tomas Carnecky","fromEmail":"tom@dbservice.com","sentAt":"2010-04-14T19:43:02Z","receivedAt":"2010-04-14T19:43:02Z","isPatch":false,"sender":{"key":"tom@dbservice.com","avatar":"https://gravatar.com/avatar/900a300bdd1a8bbe086008ad78210bbee2ad2803b7d50a5cba04c1e9404bd6d2?d=mp&s=160"},"body":"On 4/14/10 9:08 PM, Aghiles wrote:\n> On Wed, Apr 14, 2010, Johannes Gilger  wrote:\n>> AFAIK no, the operations have to be local.\n>>\n>> In order to see if there are any new changes to be pulled you could do\n>> this: git fetch --dry-run\n>\n> It seems to me like a major restriction! Especially that I am tracking\n> a remote branch ... No possibilities to do a diff or a log without fetching?\n> Very sad. :(\n\nIf you are interested in the actual commits (say, you want to merge \nthem), you need to fetch them anyway. And if you just want to look at \nthe history, most repos provide a web interface which you can use.\n\ntom\n"},{"id":"139501","messageId":"20100414194552.GA5178@dualtron.lan","threadId":"23449","inReplyTo":"x2q3abd05a91004141208x6e154385l8b7ce6488d65f21b@mail.gmail.com","subject":"Re: git log of remote repositories.","fromName":"Johannes Gilger","fromEmail":"heipei@hackvalue.de","sentAt":"2010-04-14T19:45:52Z","receivedAt":"2010-04-14T19:45:52Z","isPatch":false,"sender":{"key":"heipei@hackvalue.de","avatar":"https://avatars.githubusercontent.com/u/6072?v=4"},"body":"On 14/04/10 15:08, Aghiles wrote:\n> It seems to me like a major restriction! Especially that I am tracking\n> a remote branch ... No possibilities to do a diff or a log without fetching?\n> Very sad. :(\n\nMajor restriction? Have you understood how git works, internally? The\nfirst thing you'd have to do is to get the data (i.e. your version or\ntheir version) on one of the sides then do the diff there. Now, that\neither means you have to upload your non-matching objects or they have\nto upload their non-matching objects. Next up, you might not even have\nthe authority (or technical possibility) to put data on that server\n(think http), so obviously the diff will have to be done at your side.\n\nSo, what will be transmitted? Data the server already has but you don't.\ngit determines this data and then packs it into an efficient format and\nsends it to you. Which is what? A diff of your version vs. theirs.\nExcept we don't transmit plain diffs but pack them up nicely so the data\nis smaller and (because you now effectively fetched it) can be reused\nany time after that initial diff.\n\nIf you're worried you might be downloading GBs of data in the process\nyou can always interrupt a running fetch.\n\nNow, one might think of some very limited form of log. Like \"git\nremote-log master..master@origin\" (syntax made up). This would be\nsomething which could only be used with smart protocols and would\ndisplay a log (which you couldn't trust because you can't verify the\nintegrity and still has not much metadata). And it would be a heap of\nnew functionality to implement for something that doesn't fit into the\nworkflow of a git user. For the user it would probably take the same\namount of time as simply fetching everything new in most cases.\n\nOr you can use SVN and have real online-diffs with real speed ;)\n\nGreetings,\nJojo\n\n-- \nJohannes Gilger <heipei@hackvalue.de>\nhttp://heipei.net\nGPG-Key: 0xD47A7FFC\nGPG-Fingerprint: 5441 D425 6D4A BD33 B580  618C 3CDC C4D0 D47A 7FFC\n"},{"id":"139503","messageId":"w2s3abd05a91004141305h28d69d44g2fcb69abe578dbcc@mail.gmail.com","threadId":"23449","inReplyTo":"20100414194552.GA5178@dualtron.lan","subject":"Re: git log of remote repositories.","fromName":"Aghiles","fromEmail":"aghilesk@gmail.com","sentAt":"2010-04-14T20:05:39Z","receivedAt":"2010-04-14T20:05:39Z","isPatch":false,"sender":{"key":"aghilesk@gmail.com","avatar":null},"body":"Hello Johannes,\n\nOn Wed, Apr 14, 2010, Johannes Gilger wrote:\n> Major restriction? Have you understood how git works, internally?\n\nI don't need to understand how gits works _internally_ to know what\nis a restriction to _me_. ;)\n\nHaving a sneak peek on what's going upstream seems like a natural\nthing to do, no ?\n\nFor example, I want to write a script to say to the user what are files\nthat could be potentially in conflict from upstream. As I understand it\nnow, I have to fetch and then check. No biggie but I am must say\nI am surprised.\n\n\n> The\n> first thing you'd have to do is to get the data (i.e. your version or\n> their version) on one of the sides then do the diff there. Now, that\n> either means you have to upload your non-matching objects or they have\n> to upload their non-matching objects. Next up, you might not even have\n> the authority (or technical possibility) to put data on that server\n> (think http), so obviously the diff will have to be done at your side.\n>\n\nUnderstood.\n\n> So, what will be transmitted? Data the server already has but you don't.\n> git determines this data and then packs it into an efficient format and\n> sends it to you. Which is what? A diff of your version vs. theirs.\n> Except we don't transmit plain diffs but pack them up nicely so the data\n> is smaller and (because you now effectively fetched it) can be reused\n> any time after that initial diff.\n\nUnderstood.\n\n>\n> Now, one might think of some very limited form of log.\n\nIn my case, just a list of modified files would be fine actually. Maybe this\nis something I can do already ?\n\nThanks for the insight.\n\n  -- aghiles\n"},{"id":"139504","messageId":"r2rfabb9a1e1004141311sa27dedf2h8bfff789a6ef1200@mail.gmail.com","threadId":"23449","inReplyTo":"w2s3abd05a91004141305h28d69d44g2fcb69abe578dbcc@mail.gmail.com","subject":"Re: git log of remote repositories.","fromName":"Sverre Rabbelier","fromEmail":"srabbelier@gmail.com","sentAt":"2010-04-14T20:11:22Z","receivedAt":"2010-04-14T20:11:22Z","isPatch":false,"sender":{"key":"srabbelier@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3098?v=4"},"body":"Heya,\n\nOn Wed, Apr 14, 2010 at 22:05, Aghiles <aghilesk@gmail.com> wrote:\n> Having a sneak peek on what's going upstream seems like a natural\n> thing to do, no ?\n\nThis can be done as said before, by fetching (which does not touch\nyour working copy, it only adds some objects to your store). Can you\nexplain what your hesitation to doing the fetch is? Are the objects\nstored on the server (potentially) very large?\n\n-- \nCheers,\n\nSverre Rabbelier\n"},{"id":"139507","messageId":"z2m3abd05a91004141318mdf91a7aapf66b742192fc44a3@mail.gmail.com","threadId":"23449","inReplyTo":"r2rfabb9a1e1004141311sa27dedf2h8bfff789a6ef1200@mail.gmail.com","subject":"Re: git log of remote repositories.","fromName":"Aghiles","fromEmail":"aghilesk@gmail.com","sentAt":"2010-04-14T20:18:37Z","receivedAt":"2010-04-14T20:18:37Z","isPatch":false,"sender":{"key":"aghilesk@gmail.com","avatar":null},"body":"On Wed, Apr 14, 2010, Sverre Rabbelier wrote:\n> This can be done as said before, by fetching (which does not touch\n> your working copy, it only adds some objects to your store). Can you\n> explain what your hesitation to doing the fetch is? Are the objects\n> stored on the server (potentially) very large?\n\nYes, size can be an issue. Additionally, git fetch will probably update\nsome references, like FETCH_HEAD, no ? I might want these\nuntouched, if possible.\n\n  -- aghiles\n"},{"id":"139508","messageId":"o2qfabb9a1e1004141325uaf06d8d0r7b4211c055eb5042@mail.gmail.com","threadId":"23449","inReplyTo":"z2m3abd05a91004141318mdf91a7aapf66b742192fc44a3@mail.gmail.com","subject":"Re: git log of remote repositories.","fromName":"Sverre Rabbelier","fromEmail":"srabbelier@gmail.com","sentAt":"2010-04-14T20:25:42Z","receivedAt":"2010-04-14T20:25:42Z","isPatch":false,"sender":{"key":"srabbelier@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3098?v=4"},"body":"Heya,\n\nOn Wed, Apr 14, 2010 at 22:18, Aghiles <aghilesk@gmail.com> wrote:\n> Yes, size can be an issue. Additionally, git fetch will probably update\n> some references, like FETCH_HEAD, no ? I might want these\n> untouched, if possible.\n\nI don't think it's a good idea to rely on FETCH_HEAD; if it contains\nanything you care about you should make a branch or tag for it. Other\nthan FETCH_HEAD 'git fetch' will only update refs in the\n'refs/remotes/<remote>/' namespace.\n\n-- \nCheers,\n\nSverre Rabbelier\n"},{"id":"139513","messageId":"20100414203929.GA10201@dualtron.lan","threadId":"23449","inReplyTo":"z2m3abd05a91004141318mdf91a7aapf66b742192fc44a3@mail.gmail.com","subject":"Re: git log of remote repositories.","fromName":"Johannes Gilger","fromEmail":"heipei@hackvalue.de","sentAt":"2010-04-14T20:39:29Z","receivedAt":"2010-04-14T20:39:29Z","isPatch":false,"sender":{"key":"heipei@hackvalue.de","avatar":"https://avatars.githubusercontent.com/u/6072?v=4"},"body":"On 14/04/10 16:18, Aghiles wrote:\n> Yes, size can be an issue. Additionally, git fetch will probably update\n> some references, like FETCH_HEAD, no ? I might want these\n> untouched, if possible.\n\nBesides the space-problem: If you worry about losing already-fetched\nhistory (because the guy upstream forgot to take his meds and has\ndeleted all the history and your remote is configured to accept non-ff\nrefs) you still have the reflog to get back.\n\nGreetings,\nJojo\n\n-- \nJohannes Gilger <heipei@hackvalue.de>\nhttp://heipei.net\nGPG-Key: 0xD47A7FFC\nGPG-Fingerprint: 5441 D425 6D4A BD33 B580  618C 3CDC C4D0 D47A 7FFC\n"}]}