Reputation: 1
How can I get a count of all commits that modified a file? This does not have to include moves/renames, but if it does that is ok.
Upvotes: 0
Views: 86
Reputation: 42
in the log file or HEAD file, every time you see commit, it adds "commit:"
such as; I have 3 commits here,
60b09150ac190a26de5ae185046bf518ad35e6f8 eaee963404432be926c6e9bc77d40be3d9e9ed65 burak <[email protected]> 1353615257 -0500 commit: I added batch loader method for the emages This method helps me load a bunch of images and ensure they are * fully loaded when we want to use them. imageFile The path and name of the image file to load. * tracker This will help ensure all the images are loaded. * id A unique identifier for each image in the tracker. It * will only wait for ids it knows about. * A constructed image that has been registered with the tracker. * Note that the image's data has not necessarily been fully loaded when * this method ends.
eaee963404432be926c6e9bc77d40be3d9e9ed65 0499e1e64cc904591020e2c79dcd64827b1015ba burak <burak@burak-THINK> 1353808160 -0500 commit: AnimatedSpriteViewer added open sprite feature by chosing a file from file choser, after user picks up the file, user should be able to load the entire state and name of the pose. Tested and fully functionally works
0499e1e64cc904591020e2c79dcd64827b1015ba 181bc7ab293a8710cb14664433043a4ebbe4b377 burak <[email protected]> 1354006011 -0500 commit: Ideally, the hash function should map each possible key to a unique slot index, but this ideal is rarely achievable in practice (unless the hash keys are fixed; i.e. new entries are never added to the table after it is created). Instead, most hash table designs assume that hash collisions—different keys that map to the same hash value—will occur and must be accommodated in some way.
so in the HEAD file or log file, you can print and search for number of commit: word;
cat git.log | grep commit: > number_of_line.txt
then count the number of commit: in the file
wc -ls number_of_lines.txt
Upvotes: 0