{"thread":{"id":"13831","subject":"How to compare different files in different branches","startedAt":"2008-06-06T12:24:21Z","lastAt":"2008-06-16T16:09:35Z","messageCount":10,"participants":["Nico -telmich- Schottelius","Jonathan del Strother","Jakub Narebski","Teemu Likonen","Junio C Hamano","Ask Bjørn Hansen","Frederik Dohr"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"78895","messageId":"20080606122421.GA1521@denkbrett.schottelius.org","threadId":"13831","inReplyTo":null,"subject":"How to compare different files in different branches","fromName":"Nico -telmich- Schottelius","fromEmail":"nico-git-20080606@schottelius.org","sentAt":"2008-06-06T12:24:21Z","receivedAt":"2008-06-06T12:24:21Z","isPatch":false,"sender":{"key":"nico-git-20080606@schottelius.org","avatar":null},"body":"Hello!\n\nI want to compare 'configure.in' from the master branch with\n'configure.ac' from the gpm-2-dev branch.\n\nWhat I tried:\n\n% git-diff master..gpm-2-dev configure.ac                \nfatal: ambiguous argument 'configure.ac': unknown revision or path not\nin the working tree.\nUse '--' to separate paths from revisions\n\n# ok, correct, there is no configure.ac in master\n# But not what I want.\n\n% git-diff master..gpm-2-dev configure.in\n\n# shows that the file does not exist in gpm-2-dev. Correct.\n# But not what I want.\n\nStrange ist: \n% git-diff --summary master...gpm-2-dev\nand\n% git-diff --stat master...gpm-2-dev\ndo not show the rename.\n\nBut using\n\n% git log -Sconfigure gpm-2-dev\n\nI find the rename in commit 5fe49d36d775af47c08bb9a0c0beabef609bba20.\n\nNow I could do \n\n% git-checkout master configure.in\n\nin the gpm-2-dev branch and manually compare it with diff.\nBut - you guessed it - is not what I want.\n\nI really think git can do that, but currently I do not see the right\nway. So any idea on how to do that?\n\nSincerly\n\nNico\n\nP.S.: Please cc on reply.\n\n-- \nThink about Free and Open Source Software (FOSS).\nhttp://nico.schottelius.org/documentations/foss/the-term-foss/\n\nPGP: BFE4 C736 ABE5 406F 8F42  F7CF B8BE F92A 9885 188C\n"},{"id":"78897","messageId":"57518fd10806060530k7a15f79fh1823afef2a747233@mail.gmail.com","threadId":"13831","inReplyTo":"20080606122421.GA1521@denkbrett.schottelius.org","subject":"Re: How to compare different files in different branches","fromName":"Jonathan del Strother","fromEmail":"maillist@steelskies.com","sentAt":"2008-06-06T12:30:44Z","receivedAt":"2008-06-06T12:30:44Z","isPatch":false,"sender":{"key":"jon.delstrother@bestbefore.tv","avatar":"https://gravatar.com/avatar/754e21ab701c00e2d21fc261187254c34b2a1c0b959d9ee5be1a295990be3081?d=mp&s=160"},"body":"On Fri, Jun 6, 2008 at 1:24 PM, Nico -telmich- Schottelius\n<nico-git-20080606@schottelius.org> wrote:\n> Hello!\n>\n> I want to compare 'configure.in' from the master branch with\n> 'configure.ac' from the gpm-2-dev branch.\n>\n> What I tried:\n>\n> % git-diff master..gpm-2-dev configure.ac\n> fatal: ambiguous argument 'configure.ac': unknown revision or path not\n> in the working tree.\n> Use '--' to separate paths from revisions\n>\n> # ok, correct, there is no configure.ac in master\n> # But not what I want.\n>\n> % git-diff master..gpm-2-dev configure.in\n>\n> # shows that the file does not exist in gpm-2-dev. Correct.\n> # But not what I want.\n>\n\n\n\nHow about git diff master:configure.in gm-2-dev:configure.ac ?\n"},{"id":"78899","messageId":"m3skvqyc78.fsf@localhost.localdomain","threadId":"13831","inReplyTo":"20080606122421.GA1521@denkbrett.schottelius.org","subject":"Re: How to compare different files in different branches","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2008-06-06T12:34:59Z","receivedAt":"2008-06-06T12:34:59Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Nico -telmich- Schottelius <nico-git-20080606@schottelius.org> writes:\n\n> I want to compare 'configure.in' from the master branch with\n> 'configure.ac' from the gpm-2-dev branch.\n[...]\n> I really think git can do that, but currently I do not see the right\n> way. So any idea on how to do that?\n\n $ git diff master:configure.in gpm-2-dev:configure.ac\n\nSee \"Specifying revisions\" in git-rev-list(1); I think it can be also\nfound in other places, but I'm not sure.  git-show(1) refers to this\nsection when describing <object> option.\n\n-- \nJakub Narebski\nPoland\nShadeHawk on #git\n"},{"id":"78900","messageId":"20080606123539.GA3119@mithlond.arda.local","threadId":"13831","inReplyTo":"20080606122421.GA1521@denkbrett.schottelius.org","subject":"Re: How to compare different files in different branches","fromName":"Teemu Likonen","fromEmail":"tlikonen@iki.fi","sentAt":"2008-06-06T12:35:39Z","receivedAt":"2008-06-06T12:35:39Z","isPatch":false,"sender":{"key":"tlikonen@iki.fi","avatar":null},"body":"Nico -telmich- Schottelius wrote (2008-06-06 14:24 +0200):\n\n> I want to compare 'configure.in' from the master branch with\n> 'configure.ac' from the gpm-2-dev branch.\n\nYou could do:\n\n  $ git diff master:configure.in gpm-2-dev:configure.ac\n\nIn general form it means:\n\n  $ git diff <commit1>:<path1> <commit2>:<path2>\n\nYou can also view directories and files similar way:\n\n  $ git show <commit>:<path>\n\n\nAnd <commit> can be anything that refers to a commit, e.g. a branch\nname, a tag, SHA1 or a relative pointer like master^2~5.\n"},{"id":"78902","messageId":"m3od6eyc0s.fsf@localhost.localdomain","threadId":"13831","inReplyTo":"m3skvqyc78.fsf@localhost.localdomain","subject":"Re: How to compare different files in different branches","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2008-06-06T12:38:37Z","receivedAt":"2008-06-06T12:38:37Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Jakub Narebski <jnareb@gmail.com> writes:\n\n> Nico -telmich- Schottelius <nico-git-20080606@schottelius.org> writes:\n> \n> > I want to compare 'configure.in' from the master branch with\n> > 'configure.ac' from the gpm-2-dev branch.\n> [...]\n> > I really think git can do that, but currently I do not see the right\n> > way. So any idea on how to do that?\n> \n>  $ git diff master:configure.in gpm-2-dev:configure.ac\n\n $ git diff -M master gpm-2-dev -- configure.in configure.ac\n\nshould also work.\n-- \nJakub Narebski\nPoland\nShadeHawk on #git\n"},{"id":"79100","messageId":"20080608094754.GB1521@denkbrett.schottelius.org","threadId":"13831","inReplyTo":"20080606123539.GA3119@mithlond.arda.local","subject":"Re: How to compare different files in different branches","fromName":"Nico -telmich- Schottelius","fromEmail":"nico-git-20080606@schottelius.org","sentAt":"2008-06-08T09:47:54Z","receivedAt":"2008-06-08T09:47:54Z","isPatch":false,"sender":{"key":"nico-git-20080606@schottelius.org","avatar":null},"body":"Thank you all for your fast answers!\n\nI must confess I've overseen -M, as I saw --no-renames and searched\nfor --renames.\n\nTeemu Likonen [Fri, Jun 06, 2008 at 03:35:39PM +0300]:\n> Nico -telmich- Schottelius wrote (2008-06-06 14:24 +0200):\n> [...]\n> In general form it means:\n> \n>   $ git diff <commit1>:<path1> <commit2>:<path2>\n> [...]\n\nVery nice syntax, somehow guessed that this is available, but didn't\ntry... my fault. \n\nPerhaps we should reference git-rev-list(1) from git-diff(1), too?\n\nSincerly\n\nNico\n\n\n-- \nThink about Free and Open Source Software (FOSS).\nhttp://nico.schottelius.org/documentations/foss/the-term-foss/\n\nPGP: BFE4 C736 ABE5 406F 8F42  F7CF B8BE F92A 9885 188C\n"},{"id":"79102","messageId":"7v1w38l0el.fsf@gitster.siamese.dyndns.org","threadId":"13831","inReplyTo":"20080608094754.GB1521@denkbrett.schottelius.org","subject":"Re: How to compare different files in different branches","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-06-08T09:51:46Z","receivedAt":"2008-06-08T09:51:46Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Nico -telmich- Schottelius <nico-git-20080606@schottelius.org> writes:\n\n> Very nice syntax, somehow guessed that this is available, but didn't\n> try... my fault. \n>\n> Perhaps we should reference git-rev-list(1) from git-diff(1), too?\n\nThis is just the standard syntax to name blob _anywhere_, so we should not\nhide it in git-rev-list(1) but somewhere people would read before reading\nany \"technical manual\" material, perhaps in the tutorial and git(1).\n"},{"id":"79898","messageId":"3E23E92E-37E7-4076-9277-0E1002EC196F@develooper.com","threadId":"13831","inReplyTo":"7v1w38l0el.fsf@gitster.siamese.dyndns.org","subject":"Re: How to compare different files in different branches","fromName":"Ask Bjørn Hansen","fromEmail":"ask@develooper.com","sentAt":"2008-06-15T01:49:43Z","receivedAt":"2008-06-15T01:49:43Z","isPatch":false,"sender":{"key":"ask@develooper.com","avatar":"https://gravatar.com/avatar/05ce68433216df7d04bb0d82b7d93b11957e2137e6ed23c4b5bc061d78635f2f?d=mp&s=160"},"body":"\nOn Jun 8, 2008, at 2:51, Junio C Hamano wrote:\n\n>> Perhaps we should reference git-rev-list(1) from git-diff(1), too?\n>\n> This is just the standard syntax to name blob _anywhere_, so we  \n> should not\n> hide it in git-rev-list(1) but somewhere people would read before  \n> reading\n> any \"technical manual\" material, perhaps in the tutorial and git(1).\n\n+1!   A \"how to specify files and revisions\" tutorial with tips,  \ntricks and examples would be great.\n\nSince it's much more powerful in git than in other SCMs, this is one  \nof the larger bits of things to learn.\n\n\n  - ask\n\n-- \nhttp://develooper.com/ - http://askask.com/\n"},{"id":"80025","messageId":"20080616122117.GA14292@denkbrett.schottelius.org","threadId":"13831","inReplyTo":"7v1w38l0el.fsf@gitster.siamese.dyndns.org","subject":"git-svn breaks svn when adding .svn","fromName":"Nico -telmich- Schottelius","fromEmail":"nico-git-svn-20080616@schottelius.org","sentAt":"2008-06-16T12:21:17Z","receivedAt":"2008-06-16T12:21:17Z","isPatch":false,"sender":{"key":"nico-git-svn-20080616@schottelius.org","avatar":null},"body":"Hello dear git list!\n\nThe following information was submitted to me by Frederik and is forwarded to\nthe list, because he's no mail access right now:\n\n- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \nUsing \"git-svn dcommit\", files or folders named \".svn\" can be committed to the Subversion repository.\nThis breaks the SVN repo - e.g. \"svn update\" results in the following error:\n    svn: Failed to add directory '.svn': object of the same name already exists\n\nIdeally, the SVN server would reject such a commit.\nHowever, if I interpret the following issues correctly, Subversion doesn't want to handle this server-side:\n    http://subversion.tigris.org/issues/show_bug.cgi?id=1068\n    (also: http://subversion.tigris.org/issues/show_bug.cgi?id=1065)\n\nSince this is potentially a very critical issue, I suggest git-svn dcommit check and filter for such occurrences.\nAlternatively, a prominent warning could be added to the relevant git-svn commands.\n\n\nDetails:\n    git version 1.5.4.3\n    svn version 1.4.6 (r28521)\n    Plattform: Ubuntu 8.04 Hardy Heron\n- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \n\nSincerly\n\nNico\n\nPS: Please CC him and me on reply.\n\n-- \nThink about Free and Open Source Software (FOSS).\nhttp://nico.schottelius.org/documentations/foss/the-term-foss/\n\nPGP: BFE4 C736 ABE5 406F 8F42  F7CF B8BE F92A 9885 188C\n"},{"id":"80041","messageId":"af6c748e0806160909t1e6dd22exf8e6d6c47215ec80@mail.gmail.com","threadId":"13831","inReplyTo":"200806161603.05166.thomas@koch.ro","subject":"Re: git-svn breaks svn when adding .svn","fromName":"Frederik Dohr","fromEmail":"f.n.dohr@gmail.com","sentAt":"2008-06-16T16:09:35Z","receivedAt":"2008-06-16T16:09:35Z","isPatch":false,"sender":{"key":"f.n.dohr@gmail.com","avatar":null},"body":"> I've reported the exact same problem on 18.04.08 under the subject: \"git svn\n> should refuse to checkin .svn directories\"\n\nSorry about that - I did search the archives before having this\nposted, but that didn't come up with anything (the search\nfunctionality is quite limited though).\n\n>> [...] Add this as the\n>> pre-commit hook in .git/hooks (make sure to make it executable).\n\nNot a bad idea - but this still requires manual intervention (and thus\nawareness), which doesn't solve the potential destructiveness of this\nissue.\n\n> The Git website seems to be currently down, but one of us should search, if\n> there is a Bugtracker for GIT and then open an issue for this.\n\nThe website is up again.\nHowever, there doesn't seem to be a dedicated bug tracking tool.\n\n\n-- F.\n"}]}