1

Now I get the commit hashs are "366062a075ea62b5874564c5b7216d1f5af58607" and "900c273cea298bebcacc077ad4439964b985168d".

I want to query the committed files and every committed file's size with a commit hash.

Otherwise, I want to query the committed files and every committed file's size with these two commit hash by using just a command.

Are these two needs can be realized?

terra
  • 75
  • 7

1 Answers1

2

I want to query the commited files and every commited file's size with these two commit hash by using just a command.

A single command would give you only the list of files (git show commit_id --name-only)

For the size, you need at least a second command, although you can try and extract from it both (name and size)

 git ls-tree -r -l <aCommitID>

 git ls-tree -r -l <aCommitID> | awk '{print $4 " " $5}'
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250