{"thread":{"id":"14754","subject":"cvs diff -l equivalent?","startedAt":"2008-07-30T08:20:30Z","lastAt":"2008-07-30T21:25:22Z","messageCount":8,"participants":["Stephen R. van den Berg","Johannes Schindelin","Thomas Rast","Mikael Magnusson","Linus Torvalds"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"85590","messageId":"20080730082030.GA12555@cuci.nl","threadId":"14754","inReplyTo":null,"subject":"cvs diff -l equivalent?","fromName":"Stephen R. van den Berg","fromEmail":"srb@cuci.nl","sentAt":"2008-07-30T08:20:30Z","receivedAt":"2008-07-30T08:20:30Z","isPatch":false,"sender":{"key":"srb@cuci.nl","avatar":"https://gravatar.com/avatar/f75389059e827634d38e9df2a9b6ecbd50028b5a454442efa1c7205b7ff29c6a?d=mp&s=160"},"body":"Someone popped this question on me.  The closest I got was:\n\n   git diff .\n\nBut that still recurses.  Any solutions without patching?\n-- \nSincerely,\n           Stephen R. van den Berg.\n\nHow many weeks are there in a lightyear?\n"},{"id":"85621","messageId":"alpine.LSU.1.00.0807301553030.3486@wbgn129.biozentrum.uni-wuerzburg.de","threadId":"14754","inReplyTo":"20080730082030.GA12555@cuci.nl","subject":"Re: cvs diff -l equivalent?","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-07-30T13:53:45Z","receivedAt":"2008-07-30T13:53:45Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Wed, 30 Jul 2008, Stephen R. van den Berg wrote:\n\n> Someone popped this question on me.\n\nI do not know cvs that well anymore.  So I do not know what -l does.  Care \nto explain?\n\n> How many weeks are there in a lightyear?\n\nThat is easy.  52 light ones.\n\nCiao,\nDscho\n"},{"id":"85623","messageId":"200807301600.44205.trast@student.ethz.ch","threadId":"14754","inReplyTo":"20080730082030.GA12555@cuci.nl","subject":"Re: cvs diff -l equivalent?","fromName":"Thomas Rast","fromEmail":"trast@student.ethz.ch","sentAt":"2008-07-30T14:00:41Z","receivedAt":"2008-07-30T14:00:41Z","isPatch":false,"sender":{"key":"tr@thomasrast.ch","avatar":"https://avatars.githubusercontent.com/u/153510?v=4"},"body":"Stephen R. van den Berg wrote:\n> Someone popped this question on me.  The closest I got was:\n> \n>    git diff .\n> \n> But that still recurses.  Any solutions without patching?\n\nMaybe a scripted version?  For just 'git diff .', this should work:\n\n  git diff $(git ls-files . | grep -v /)\n\nThat will still do the wrong thing if you diff against an older commit\nwith a different list of files.  In that case you need the list of\nfiles in the other side of the diff too:\n\n  git diff HEAD^..  -- $(git ls-files . | grep -v /; git ls-tree HEAD^ | cut -f2)\n\n\n- Thomas\n\n"},{"id":"85643","messageId":"20080730155853.GA27166@cuci.nl","threadId":"14754","inReplyTo":"alpine.LSU.1.00.0807301553030.3486@wbgn129.biozentrum.uni-wuerzburg.de","subject":"Re: cvs diff -l equivalent?","fromName":"Stephen R. van den Berg","fromEmail":"srb@cuci.nl","sentAt":"2008-07-30T15:58:53Z","receivedAt":"2008-07-30T15:58:53Z","isPatch":false,"sender":{"key":"srb@cuci.nl","avatar":"https://gravatar.com/avatar/f75389059e827634d38e9df2a9b6ecbd50028b5a454442efa1c7205b7ff29c6a?d=mp&s=160"},"body":"Johannes Schindelin wrote:\n>On Wed, 30 Jul 2008, Stephen R. van den Berg wrote:\n>> Someone popped this question on me.\n\n>I do not know cvs that well anymore.  So I do not know what -l does.  Care \n>to explain?\n\nUsage: cvs diff [-lR] [-k kopt] [format_options]\n    [[-r rev1 | -D date1] [-r rev2 | -D date2]] [files...]\n        -l      Local directory only, not recursive\n\nIt shows the diff for all files in the current directory, nothing\ndeeper, nothing higher.\n\n>> How many weeks are there in a lightyear?\n>That is easy.  52 light ones.\n\nI presume you mean \"lightweeks\", and yes, that would probably fit the bill :-).\n-- \nSincerely,\n           Stephen R. van den Berg.\n"},{"id":"85648","messageId":"20080730161714.GC27166@cuci.nl","threadId":"14754","inReplyTo":"200807301600.44205.trast@student.ethz.ch","subject":"Re: cvs diff -l equivalent?","fromName":"Stephen R. van den Berg","fromEmail":"srb@cuci.nl","sentAt":"2008-07-30T16:17:14Z","receivedAt":"2008-07-30T16:17:14Z","isPatch":false,"sender":{"key":"srb@cuci.nl","avatar":"https://gravatar.com/avatar/f75389059e827634d38e9df2a9b6ecbd50028b5a454442efa1c7205b7ff29c6a?d=mp&s=160"},"body":"Thomas Rast wrote:\n>Stephen R. van den Berg wrote:\n>> Someone popped this question on me.  The closest I got was:\n\n>>    git diff .\n\n>> But that still recurses.  Any solutions without patching?\n\n>Maybe a scripted version?  For just 'git diff .', this should work:\n\n>  git diff $(git ls-files . | grep -v /)\n\ngit diff $(git ls-files --exclude-standard . | fgrep -v /)\n\ncomes the closest, so it seems.\n\n>That will still do the wrong thing if you diff against an older commit\n>with a different list of files.  In that case you need the list of\n>files in the other side of the diff too:\n\n>  git diff HEAD^..  -- $(git ls-files . | grep -v /; git ls-tree HEAD^ | cut -f2)\n\nThis doesn't seem to do the right thing, it messes up with which commit we\ndiff.\n-- \nSincerely,\n           Stephen R. van den Berg.\n\nHow many weeks are there in a lightyear?\n"},{"id":"85657","messageId":"alpine.LSU.1.00.0807302016160.3486@wbgn129.biozentrum.uni-wuerzburg.de","threadId":"14754","inReplyTo":"20080730155853.GA27166@cuci.nl","subject":"Re: cvs diff -l equivalent?","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-07-30T18:18:27Z","receivedAt":"2008-07-30T18:18:27Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Wed, 30 Jul 2008, Stephen R. van den Berg wrote:\n\n> Johannes Schindelin wrote:\n> >On Wed, 30 Jul 2008, Stephen R. van den Berg wrote:\n> >> Someone popped this question on me.\n> \n> >I do not know cvs that well anymore.  So I do not know what -l does.  Care \n> >to explain?\n> \n> Usage: cvs diff [-lR] [-k kopt] [format_options]\n>     [[-r rev1 | -D date1] [-r rev2 | -D date2]] [files...]\n>         -l      Local directory only, not recursive\n> \n> It shows the diff for all files in the current directory, nothing\n> deeper, nothing higher.\n\nOkay.  This is my version of a solution:\n\n\t$ find . -maxdepth 1 -type f -print0 | xargs -0 git diff\n\nAnd no, there is not an easier way.  Probably since Git has a snapshot \nbased idea of the contents, i.e. it does not think that the files in a \nrevision are decoupled.  Not even the ones in different directories.\n\nCiao,\nDscho\n"},{"id":"85687","messageId":"237967ef0807301357l60dfb5b7y63a357c4b5c2c23@mail.gmail.com","threadId":"14754","inReplyTo":"20080730082030.GA12555@cuci.nl","subject":"Re: cvs diff -l equivalent?","fromName":"Mikael Magnusson","fromEmail":"mikachu@gmail.com","sentAt":"2008-07-30T20:57:55Z","receivedAt":"2008-07-30T20:57:55Z","isPatch":false,"sender":{"key":"mikachu@gmail.com","avatar":null},"body":"2008/7/30 Stephen R. van den Berg <srb@cuci.nl>:\n> Someone popped this question on me.  The closest I got was:\n>\n>   git diff .\n>\n> But that still recurses.  Any solutions without patching?\n\nAnother option than the ones suggested:\ngit diff|filterdiff -x '*/*/*'\n\nfilterdiff is available from the \"patchutils\" package.\n\n-- \nMikael Magnusson\n"},{"id":"85692","messageId":"alpine.LFD.1.10.0807301424271.3277@nehalem.linux-foundation.org","threadId":"14754","inReplyTo":"20080730082030.GA12555@cuci.nl","subject":"Re: cvs diff -l equivalent?","fromName":"Linus Torvalds","fromEmail":"torvalds@linux-foundation.org","sentAt":"2008-07-30T21:25:22Z","receivedAt":"2008-07-30T21:25:22Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Wed, 30 Jul 2008, Stephen R. van den Berg wrote:\n\n> Someone popped this question on me.  The closest I got was:\n> \n>    git diff .\n> \n> But that still recurses.  Any solutions without patching?\n\nNot without patching, no. When generating a patch, git diff always \nrecurses.\n\nI suspect adding some kind of \"-l\" flag would be about five lines of code, \nthough, so if you really need it... Hint, hint.\n\n\t\tLinus\n"}]}