{"thread":{"id":"32612","subject":"git list files","startedAt":"2013-01-13T12:05:45Z","lastAt":"2013-01-14T17:20:04Z","messageCount":9,"participants":["Стойчо Слепцов","Matthieu Moy","Jonathan Nieder","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"206649","messageId":"CAGL0X-rfrwtbtdN7O0=iMhVRYv1m0_czW8zmgT5QA3irkaeu5Q@mail.gmail.com","threadId":"32612","inReplyTo":null,"subject":"git list files","fromName":"Стойчо Слепцов","fromEmail":"stoycho.sleptsov@gmail.com","sentAt":"2013-01-13T12:05:45Z","receivedAt":"2013-01-13T12:05:45Z","isPatch":false,"sender":{"key":"stoycho.sleptsov@gmail.com","avatar":null},"body":"Hi,\n\nI was searching for some git- command to provide me a list of files\n(in a git directory), same as ls,\nbut showing information from the last commit of the file instead.\n\nlets, say the equivalent of the $ls -d b* within git.git root directory\nwould look like:\n\n----------------\n98746061 jrnieder 2010-08-12 17:11 Standardize-do-.-while-0-style   base85.c\nc43cb386 pclouds  2012-10-26 22:53 Move-estimate_bisect_steps-to-li bisect.c\nefc7df45 pclouds  2012-10-26 22:53 Move-print_commit_list-to-libgit bisect.h\n837d395a barkalow 2010-01-18 13:06 Replace-parse_blob-with-an-expla blob.c\n837d395a barkalow 2010-01-18 13:06 Replace-parse_blob-with-an-expla blob.h\nebcfa444 gitster  2012-07-23 20:56 Merge-branch-jn-block-sha1       block-sha1\nd53a3503 pclouds  2012-06-07 19:05 Remove-i18n-legos-in-notifying-n branch.c\nf9a482e6 peff     2012-03-26 19:51 checkout-suppress-tracking-messa branch.h\nc566ea13 gitster  2013-01-11 18:34 Merge-branch-jc-merge-blobs      builtin\ncf6c52fc gitster  2013-01-10 13:46 Merge-branch-jc-maint-fmt-merge- builtin.h\n568508e7 gitster  2011-10-28 14:48 bulk-checkin-replace-fast-import\nbulk-checkin.c\n568508e7 gitster  2011-10-28 14:48 bulk-checkin-replace-fast-import\nbulk-checkin.h\n8c3710fd gitster  2012-06-04 11:51 tweak-bundle-verify-of-a-complet bundle.c\nb76c561a gitster  2011-10-21 16:04 Merge-branch-jc-unseekable-bundl bundle.h\n----------------\n\n(pretty the same idea as what we see in github when reviewing a\nrepository under the \"Files\" tab.)\n\nUnfortunately I couldn't find any suitable.\n\nAs suggested at http://git-scm.com/community I asked my question at\nthe \"Git user mailing list on Google Groups which is a nice place for\nbeginners to ask about anything\",\nand one of the valuable answers was:\n\n\"Also I wouldn't hesitate to ask this question on the main Git list as\nthis question appears to be hard-core enough to warrant assisting of\nsomeone knowledgeable about Git internals.\"\n\nSo here I am...\n\nSo is there such a command, or I have to build my own script, starting\nfrom, lets say git-rev-list in addition with some diff?\n\nAt the beginning I was hoping that $git rev-list HEAD --no-walk\n--all-match -- <paths> + some git status --porcelain could do the job\nfor me,\nbut seems git rev-list, same as git log stops at the first found\nmatching commit, without to take care that there are still more files\nunsatisfied in the list...\n\nisn't it supposed to satisfy all the files in the list when\n--all-match -- <paths> are given?\n\nThank you in advance,\nBlind.\n"},{"id":"206695","messageId":"vpqhaml9pr3.fsf@grenoble-inp.fr","threadId":"32612","inReplyTo":"CAGL0X-rfrwtbtdN7O0=iMhVRYv1m0_czW8zmgT5QA3irkaeu5Q@mail.gmail.com","subject":"Re: git list files","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2013-01-13T13:28:00Z","receivedAt":"2013-01-13T13:28:00Z","isPatch":false,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Стойчо Слепцов <stoycho.sleptsov@gmail.com> writes:\n\n> Hi,\n>\n> I was searching for some git- command to provide me a list of files\n> (in a git directory), same as ls,\n> but showing information from the last commit of the file instead.\n>\n> lets, say the equivalent of the $ls -d b* within git.git root directory\n> would look like:\n\ngit ls-tree HEAD\n\n?\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"206706","messageId":"20130113175602.GD5973@elie.Belkin","threadId":"32612","inReplyTo":"CAGL0X-rfrwtbtdN7O0=iMhVRYv1m0_czW8zmgT5QA3irkaeu5Q@mail.gmail.com","subject":"Re: git list files","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2013-01-13T17:56:02Z","receivedAt":"2013-01-13T17:56:02Z","isPatch":false,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Hi,\n\nСтойчо Слепцов wrote:\n\n> lets, say the equivalent of the $ls -d b* within git.git root directory\n> would look like:\n>\n> ----------------\n> 98746061 jrnieder 2010-08-12 17:11 Standardize-do-.-while-0-style   base85.c\n> c43cb386 pclouds  2012-10-26 22:53 Move-estimate_bisect_steps-to-li bisect.c\n> efc7df45 pclouds  2012-10-26 22:53 Move-print_commit_list-to-libgit bisect.h\n> 837d395a barkalow 2010-01-18 13:06 Replace-parse_blob-with-an-expla blob.c\n> 837d395a barkalow 2010-01-18 13:06 Replace-parse_blob-with-an-expla blob.h\n> ebcfa444 gitster  2012-07-23 20:56 Merge-branch-jn-block-sha1       block-sha1\n\nYou might like Peff's or Jakub's tree blame script.  The newest version\nI can find is\n\n http://thread.gmane.org/gmane.comp.version-control.git/168323\n\nIf you use it, let us know how it goes.\n\nThanks for some food for thought,\nJonathan\n"},{"id":"206708","messageId":"CAGL0X-pvarMepj6px74zcuwPxcF288-LnBE0bG-Wapzx4fQ1ZQ@mail.gmail.com","threadId":"32612","inReplyTo":"vpqhaml9pr3.fsf@grenoble-inp.fr","subject":"Re: git list files","fromName":"Стойчо Слепцов","fromEmail":"stoycho.sleptsov@gmail.com","sentAt":"2013-01-13T19:16:14Z","receivedAt":"2013-01-13T19:16:14Z","isPatch":false,"sender":{"key":"stoycho.sleptsov@gmail.com","avatar":null},"body":"not really,\nls-tree provides the hash of blobs and trees,\nwhat I am searching for is\"the last commit\"who introduced the blob or tree.\n\nbut, hey, thanks for the answer!\nBlind\n\n2013/1/13 Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>:\n> Стойчо Слепцов <stoycho.sleptsov@gmail.com> writes:\n>\n>> Hi,\n>>\n>> I was searching for some git- command to provide me a list of files\n>> (in a git directory), same as ls,\n>> but showing information from the last commit of the file instead.\n>>\n>> lets, say the equivalent of the $ls -d b* within git.git root directory\n>> would look like:\n>\n> git ls-tree HEAD\n>\n> ?\n>\n> --\n> Matthieu Moy\n> http://www-verimag.imag.fr/~moy/\n"},{"id":"206709","messageId":"CAGL0X-rD7DF8ddCUYvBfb5-YZuKx8cDBQo_xR1e7F2+WqmNeYw@mail.gmail.com","threadId":"32612","inReplyTo":"20130113175602.GD5973@elie.Belkin","subject":"Re: git list files","fromName":"Стойчо Слепцов","fromEmail":"stoycho.sleptsov@gmail.com","sentAt":"2013-01-13T19:18:22Z","receivedAt":"2013-01-13T19:18:22Z","isPatch":false,"sender":{"key":"stoycho.sleptsov@gmail.com","avatar":null},"body":"thanks alot, Jonathan,\nI'll try to search through those scripts.\n\nBlind.\n\n2013/1/13 Jonathan Nieder <jrnieder@gmail.com>:\n> Hi,\n>\n> Стойчо Слепцов wrote:\n>\n>> lets, say the equivalent of the $ls -d b* within git.git root directory\n>> would look like:\n>>\n>> ----------------\n>> 98746061 jrnieder 2010-08-12 17:11 Standardize-do-.-while-0-style   base85.c\n>> c43cb386 pclouds  2012-10-26 22:53 Move-estimate_bisect_steps-to-li bisect.c\n>> efc7df45 pclouds  2012-10-26 22:53 Move-print_commit_list-to-libgit bisect.h\n>> 837d395a barkalow 2010-01-18 13:06 Replace-parse_blob-with-an-expla blob.c\n>> 837d395a barkalow 2010-01-18 13:06 Replace-parse_blob-with-an-expla blob.h\n>> ebcfa444 gitster  2012-07-23 20:56 Merge-branch-jn-block-sha1       block-sha1\n>\n> You might like Peff's or Jakub's tree blame script.  The newest version\n> I can find is\n>\n>  http://thread.gmane.org/gmane.comp.version-control.git/168323\n>\n> If you use it, let us know how it goes.\n>\n> Thanks for some food for thought,\n> Jonathan\n"},{"id":"206711","messageId":"20130113201027.GA4436@sigill.intra.peff.net","threadId":"32612","inReplyTo":"20130113175602.GD5973@elie.Belkin","subject":"Re: git list files","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2013-01-13T20:10:29Z","receivedAt":"2013-01-13T20:10:29Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sun, Jan 13, 2013 at 09:56:02AM -0800, Jonathan Nieder wrote:\n\n> > lets, say the equivalent of the $ls -d b* within git.git root directory\n> > would look like:\n> >\n> > ----------------\n> > 98746061 jrnieder 2010-08-12 17:11 Standardize-do-.-while-0-style   base85.c\n> > c43cb386 pclouds  2012-10-26 22:53 Move-estimate_bisect_steps-to-li bisect.c\n> > efc7df45 pclouds  2012-10-26 22:53 Move-print_commit_list-to-libgit bisect.h\n> > 837d395a barkalow 2010-01-18 13:06 Replace-parse_blob-with-an-expla blob.c\n> > 837d395a barkalow 2010-01-18 13:06 Replace-parse_blob-with-an-expla blob.h\n> > ebcfa444 gitster  2012-07-23 20:56 Merge-branch-jn-block-sha1       block-sha1\n> \n> You might like Peff's or Jakub's tree blame script.  The newest version\n> I can find is\n> \n>  http://thread.gmane.org/gmane.comp.version-control.git/168323\n\nAs far as I recall, that script works. However, I have a pure-C\nblame-tree implementation that is much faster, which may also be of\ninterest. I need to clean up and put a few finishing touches on it to\nsend it to the list, but it has been in production at GitHub for a few\nmonths. You can find it here:\n\n  git://github.com/peff/git jk/blame-tree\n\nIt's built on the regular diff traversal, just like the perl script you\nlinked, but doing it all in-process makes things fast.  I also added a\n\"--max-depth\" parameter for diff, so you can do:\n\n  git blame-tree --max-depth=1 -- Documentation\n\nto recurse into the Documentation subdir, but not go into its\nsubdirectories. One of the things I need to clean up is that my counting\nof --max-depth is different from that used by \"git grep\", and we would\nprobably want reconcile that.\n\n-Peff\n"},{"id":"206769","messageId":"20130114070832.GA4820@elie.Belkin","threadId":"32612","inReplyTo":"20130113201027.GA4436@sigill.intra.peff.net","subject":"Re: git list files","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2013-01-14T07:08:32Z","receivedAt":"2013-01-14T07:08:32Z","isPatch":false,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Jeff King wrote:\n\n> As far as I recall, that script works. However, I have a pure-C\n> blame-tree implementation that is much faster, which may also be of\n> interest. I need to clean up and put a few finishing touches on it to\n> send it to the list, but it has been in production at GitHub for a few\n> months. You can find it here:\n>\n>   git://github.com/peff/git jk/blame-tree\n\nOh, neat.  Would that make sense as an item in\n<https://git.wiki.kernel.org/index.php/Interfaces,_frontends,_and_tools>?\n"},{"id":"206806","messageId":"20130114152836.GA18370@sigill.intra.peff.net","threadId":"32612","inReplyTo":"20130114070832.GA4820@elie.Belkin","subject":"Re: git list files","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2013-01-14T15:28:36Z","receivedAt":"2013-01-14T15:28:36Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sun, Jan 13, 2013 at 11:08:32PM -0800, Jonathan Nieder wrote:\n\n> Jeff King wrote:\n> \n> > As far as I recall, that script works. However, I have a pure-C\n> > blame-tree implementation that is much faster, which may also be of\n> > interest. I need to clean up and put a few finishing touches on it to\n> > send it to the list, but it has been in production at GitHub for a few\n> > months. You can find it here:\n> >\n> >   git://github.com/peff/git jk/blame-tree\n> \n> Oh, neat.  Would that make sense as an item in\n> <https://git.wiki.kernel.org/index.php/Interfaces,_frontends,_and_tools>?\n\nI'd rather finish cleaning it up and actually get it merged. It's on my\ntodo list.\n\n-Peff\n"},{"id":"206812","messageId":"CAGL0X-p2D90aNTzAHLoz0xnU3AAR-vUEPDAoRkyd9k+8_Kc0Vg@mail.gmail.com","threadId":"32612","inReplyTo":"20130114152836.GA18370@sigill.intra.peff.net","subject":"Re: git list files","fromName":"Стойчо Слепцов","fromEmail":"stoycho.sleptsov@gmail.com","sentAt":"2013-01-14T17:20:04Z","receivedAt":"2013-01-14T17:20:04Z","isPatch":false,"sender":{"key":"stoycho.sleptsov@gmail.com","avatar":null},"body":"I went through your initial thread about blame-tree,\nand it is really very very (+very) close to answer my question.\n\nThanks for writing it,\nif it comes one day to git, I will use it.\n\nAs for:\n'I guess people's eyes and brains are trained by the old school \"file\nboundaries matter\" way of thinking'\n-- Junio C Hamano\nat http://thread.gmane.org/gmane.comp.version-control.git/168323;\nhttp://article.gmane.org/gmane.comp.version-control.git/168333\n\nI think it's not the case, Mr. Hamano.\n\n>From my point of view, it is just to have a quick picture of \"what\ncame from where in this current directory\",\nwhich is a normal reaction of human beings, I think.\n\nSpeaking of which I can't help thinking that this feature could be\nprovided by $git rev-list (HEAD) --no-walk -- <paths>, just don't stop\nat first commit,\nbut at first commit for each of the paths.\n\nOr maybe diff could have an option to not compare against a specific point,\nbut actually do his job and go downstears and find where the\n_diff_erence for _each_ path happened finally.\n\n(... applicable for $git status -l (--list) --porcelain ... but thats\na whim, sorry.)\n\nAnyway,\nthank you all for your time, it was a real pleasure for me,\nBlind.\n\n2013/1/14 Jeff King <peff@peff.net>:\n> On Sun, Jan 13, 2013 at 11:08:32PM -0800, Jonathan Nieder wrote:\n>\n>> Jeff King wrote:\n>>\n>> > As far as I recall, that script works. However, I have a pure-C\n>> > blame-tree implementation that is much faster, which may also be of\n>> > interest. I need to clean up and put a few finishing touches on it to\n>> > send it to the list, but it has been in production at GitHub for a few\n>> > months. You can find it here:\n>> >\n>> >   git://github.com/peff/git jk/blame-tree\n>>\n>> Oh, neat.  Would that make sense as an item in\n>> <https://git.wiki.kernel.org/index.php/Interfaces,_frontends,_and_tools>?\n>\n> I'd rather finish cleaning it up and actually get it merged. It's on my\n> todo list.\n>\n> -Peff\n"}]}