git/list[1] front-page[2] threads[3] people[4] search[5] about
 

git list files

From
СССтойчо Слепцов <stoycho.sleptsov@gmail.com>
Date
Jan 13, 2013, 12:05 UTC
Message-ID
<CAGL0X-rfrwtbtdN7O0=iMhVRYv1m0_czW8zmgT5QA3irkaeu5Q@mail.gmail.com>
Hi,

I was searching for some git- command to provide me a list of files (in a git directory), same as ls, but showing information from the last commit of the file instead.

lets, say the equivalent of the $ls -d b* within git.git root directory would look like:

---------------- 98746061 jrnieder 2010-08-12 17:11 Standardize-do-.-while-0-style base85.c c43cb386 pclouds 2012-10-26 22:53 Move-estimate_bisect_steps-to-li bisect.c efc7df45 pclouds 2012-10-26 22:53 Move-print_commit_list-to-libgit bisect.h 837d395a barkalow 2010-01-18 13:06 Replace-parse_blob-with-an-expla blob.c 837d395a barkalow 2010-01-18 13:06 Replace-parse_blob-with-an-expla blob.h ebcfa444 gitster 2012-07-23 20:56 Merge-branch-jn-block-sha1 block-sha1 d53a3503 pclouds 2012-06-07 19:05 Remove-i18n-legos-in-notifying-n branch.c f9a482e6 peff 2012-03-26 19:51 checkout-suppress-tracking-messa branch.h c566ea13 gitster 2013-01-11 18:34 Merge-branch-jc-merge-blobs builtin cf6c52fc gitster 2013-01-10 13:46 Merge-branch-jc-maint-fmt-merge- builtin.h 568508e7 gitster 2011-10-28 14:48 bulk-checkin-replace-fast-import bulk-checkin.c 568508e7 gitster 2011-10-28 14:48 bulk-checkin-replace-fast-import bulk-checkin.h 8c3710fd gitster 2012-06-04 11:51 tweak-bundle-verify-of-a-complet bundle.c b76c561a gitster 2011-10-21 16:04 Merge-branch-jc-unseekable-bundl bundle.h ----------------

(pretty the same idea as what we see in github when reviewing a repository under the "Files" tab.)

Unfortunately I couldn't find any suitable.

As suggested at http://git-scm.com/community I asked my question at the "Git user mailing list on Google Groups which is a nice place for beginners to ask about anything", and one of the valuable answers was:

"Also I wouldn't hesitate to ask this question on the main Git list as this question appears to be hard-core enough to warrant assisting of someone knowledgeable about Git internals."

So here I am...

So is there such a command, or I have to build my own script, starting from, lets say git-rev-list in addition with some diff?

At the beginning I was hoping that $git rev-list HEAD --no-walk --all-match -- <paths> + some git status --porcelain could do the job for me, but seems git rev-list, same as git log stops at the first found matching commit, without to take care that there are still more files unsatisfied in the list...

isn't it supposed to satisfy all the files in the list when --all-match -- <paths> are given?

Thank you in advance, Blind.

Next: Matthieu Moy
Message 1 of 9 in “git list files”
  1. Стойчо СлепцовJan 13, 2013
  2. Matthieu MoyJan 13, 2013
  3. Стойчо СлепцовJan 13, 2013
  4. Jonathan NiederJan 13, 2013
  5. Стойчо СлепцовJan 13, 2013
  6. Jeff KingJan 13, 2013
  7. Jonathan NiederJan 14, 2013
  8. Jeff KingJan 14, 2013
  9. Стойчо СлепцовJan 14, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.