* git list files
@ 2013-01-13 12:05 Стойчо Слепцов
2013-01-13 13:28 ` Matthieu Moy
2013-01-13 17:56 ` Jonathan Nieder
0 siblings, 2 replies; 9+ messages in thread
From: Стойчо Слепцов @ 2013-01-13 12:05 UTC (permalink / raw)
To: git
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.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: git list files
2013-01-13 12:05 git list files Стойчо Слепцов
@ 2013-01-13 13:28 ` Matthieu Moy
2013-01-13 19:16 ` Стойчо Слепцов
2013-01-13 17:56 ` Jonathan Nieder
1 sibling, 1 reply; 9+ messages in thread
From: Matthieu Moy @ 2013-01-13 13:28 UTC (permalink / raw)
To: Стойчо Слепцов
Cc: git
Стойчо Слепцов <stoycho.sleptsov@gmail.com> writes:
> 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:
git ls-tree HEAD
?
--
Matthieu Moy
http://www-verimag.imag.fr/~moy/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: git list files
2013-01-13 13:28 ` Matthieu Moy
@ 2013-01-13 19:16 ` Стойчо Слепцов
0 siblings, 0 replies; 9+ messages in thread
From: Стойчо Слепцов @ 2013-01-13 19:16 UTC (permalink / raw)
To: Matthieu Moy; +Cc: git
not really,
ls-tree provides the hash of blobs and trees,
what I am searching for is"the last commit"who introduced the blob or tree.
but, hey, thanks for the answer!
Blind
2013/1/13 Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>:
> Стойчо Слепцов <stoycho.sleptsov@gmail.com> writes:
>
>> 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:
>
> git ls-tree HEAD
>
> ?
>
> --
> Matthieu Moy
> http://www-verimag.imag.fr/~moy/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: git list files
2013-01-13 12:05 git list files Стойчо Слепцов
2013-01-13 13:28 ` Matthieu Moy
@ 2013-01-13 17:56 ` Jonathan Nieder
2013-01-13 19:18 ` Стойчо Слепцов
2013-01-13 20:10 ` Jeff King
1 sibling, 2 replies; 9+ messages in thread
From: Jonathan Nieder @ 2013-01-13 17:56 UTC (permalink / raw)
To: Стойчо Слепцов
Cc: git, Jeff King, Jakub Narębski, Matthieu Moy
Hi,
Стойчо Слепцов wrote:
> 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
You might like Peff's or Jakub's tree blame script. The newest version
I can find is
http://thread.gmane.org/gmane.comp.version-control.git/168323
If you use it, let us know how it goes.
Thanks for some food for thought,
Jonathan
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: git list files
2013-01-13 17:56 ` Jonathan Nieder
@ 2013-01-13 19:18 ` Стойчо Слепцов
2013-01-13 20:10 ` Jeff King
1 sibling, 0 replies; 9+ messages in thread
From: Стойчо Слепцов @ 2013-01-13 19:18 UTC (permalink / raw)
To: Jonathan Nieder; +Cc: git
thanks alot, Jonathan,
I'll try to search through those scripts.
Blind.
2013/1/13 Jonathan Nieder <jrnieder@gmail.com>:
> Hi,
>
> Стойчо Слепцов wrote:
>
>> 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
>
> You might like Peff's or Jakub's tree blame script. The newest version
> I can find is
>
> http://thread.gmane.org/gmane.comp.version-control.git/168323
>
> If you use it, let us know how it goes.
>
> Thanks for some food for thought,
> Jonathan
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: git list files
2013-01-13 17:56 ` Jonathan Nieder
2013-01-13 19:18 ` Стойчо Слепцов
@ 2013-01-13 20:10 ` Jeff King
2013-01-14 7:08 ` Jonathan Nieder
1 sibling, 1 reply; 9+ messages in thread
From: Jeff King @ 2013-01-13 20:10 UTC (permalink / raw)
To: Jonathan Nieder
Cc: Стойчо Слепцов,
git, Jakub Narębski, Matthieu Moy
On Sun, Jan 13, 2013 at 09:56:02AM -0800, Jonathan Nieder wrote:
> > 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
>
> You might like Peff's or Jakub's tree blame script. The newest version
> I can find is
>
> http://thread.gmane.org/gmane.comp.version-control.git/168323
As far as I recall, that script works. However, I have a pure-C
blame-tree implementation that is much faster, which may also be of
interest. I need to clean up and put a few finishing touches on it to
send it to the list, but it has been in production at GitHub for a few
months. You can find it here:
git://github.com/peff/git jk/blame-tree
It's built on the regular diff traversal, just like the perl script you
linked, but doing it all in-process makes things fast. I also added a
"--max-depth" parameter for diff, so you can do:
git blame-tree --max-depth=1 -- Documentation
to recurse into the Documentation subdir, but not go into its
subdirectories. One of the things I need to clean up is that my counting
of --max-depth is different from that used by "git grep", and we would
probably want reconcile that.
-Peff
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: git list files
2013-01-13 20:10 ` Jeff King
@ 2013-01-14 7:08 ` Jonathan Nieder
2013-01-14 15:28 ` Jeff King
0 siblings, 1 reply; 9+ messages in thread
From: Jonathan Nieder @ 2013-01-14 7:08 UTC (permalink / raw)
To: Jeff King
Cc: Стойчо Слепцов,
git, Jakub Narębski, Matthieu Moy
Jeff King wrote:
> As far as I recall, that script works. However, I have a pure-C
> blame-tree implementation that is much faster, which may also be of
> interest. I need to clean up and put a few finishing touches on it to
> send it to the list, but it has been in production at GitHub for a few
> months. You can find it here:
>
> git://github.com/peff/git jk/blame-tree
Oh, neat. Would that make sense as an item in
<https://git.wiki.kernel.org/index.php/Interfaces,_frontends,_and_tools>?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: git list files
2013-01-14 7:08 ` Jonathan Nieder
@ 2013-01-14 15:28 ` Jeff King
2013-01-14 17:20 ` Стойчо Слепцов
0 siblings, 1 reply; 9+ messages in thread
From: Jeff King @ 2013-01-14 15:28 UTC (permalink / raw)
To: Jonathan Nieder
Cc: Стойчо Слепцов,
git, Jakub Narębski, Matthieu Moy
On Sun, Jan 13, 2013 at 11:08:32PM -0800, Jonathan Nieder wrote:
> Jeff King wrote:
>
> > As far as I recall, that script works. However, I have a pure-C
> > blame-tree implementation that is much faster, which may also be of
> > interest. I need to clean up and put a few finishing touches on it to
> > send it to the list, but it has been in production at GitHub for a few
> > months. You can find it here:
> >
> > git://github.com/peff/git jk/blame-tree
>
> Oh, neat. Would that make sense as an item in
> <https://git.wiki.kernel.org/index.php/Interfaces,_frontends,_and_tools>?
I'd rather finish cleaning it up and actually get it merged. It's on my
todo list.
-Peff
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: git list files
2013-01-14 15:28 ` Jeff King
@ 2013-01-14 17:20 ` Стойчо Слепцов
0 siblings, 0 replies; 9+ messages in thread
From: Стойчо Слепцов @ 2013-01-14 17:20 UTC (permalink / raw)
To: Jeff King; +Cc: Jonathan Nieder, git
I went through your initial thread about blame-tree,
and it is really very very (+very) close to answer my question.
Thanks for writing it,
if it comes one day to git, I will use it.
As for:
'I guess people's eyes and brains are trained by the old school "file
boundaries matter" way of thinking'
-- Junio C Hamano
at http://thread.gmane.org/gmane.comp.version-control.git/168323;
http://article.gmane.org/gmane.comp.version-control.git/168333
I think it's not the case, Mr. Hamano.
>From my point of view, it is just to have a quick picture of "what
came from where in this current directory",
which is a normal reaction of human beings, I think.
Speaking of which I can't help thinking that this feature could be
provided by $git rev-list (HEAD) --no-walk -- <paths>, just don't stop
at first commit,
but at first commit for each of the paths.
Or maybe diff could have an option to not compare against a specific point,
but actually do his job and go downstears and find where the
_diff_erence for _each_ path happened finally.
(... applicable for $git status -l (--list) --porcelain ... but thats
a whim, sorry.)
Anyway,
thank you all for your time, it was a real pleasure for me,
Blind.
2013/1/14 Jeff King <peff@peff.net>:
> On Sun, Jan 13, 2013 at 11:08:32PM -0800, Jonathan Nieder wrote:
>
>> Jeff King wrote:
>>
>> > As far as I recall, that script works. However, I have a pure-C
>> > blame-tree implementation that is much faster, which may also be of
>> > interest. I need to clean up and put a few finishing touches on it to
>> > send it to the list, but it has been in production at GitHub for a few
>> > months. You can find it here:
>> >
>> > git://github.com/peff/git jk/blame-tree
>>
>> Oh, neat. Would that make sense as an item in
>> <https://git.wiki.kernel.org/index.php/Interfaces,_frontends,_and_tools>?
>
> I'd rather finish cleaning it up and actually get it merged. It's on my
> todo list.
>
> -Peff
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2013-01-14 17:20 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-13 12:05 git list files Стойчо Слепцов
2013-01-13 13:28 ` Matthieu Moy
2013-01-13 19:16 ` Стойчо Слепцов
2013-01-13 17:56 ` Jonathan Nieder
2013-01-13 19:18 ` Стойчо Слепцов
2013-01-13 20:10 ` Jeff King
2013-01-14 7:08 ` Jonathan Nieder
2013-01-14 15:28 ` Jeff King
2013-01-14 17:20 ` Стойчо Слепцов
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).