I’m browsing a git repository.
Say I have a data structure in a file cache.h:
struct cache_entry {
struct cache_time ctime;
struct cache_time mtime;
unsigned int st_dev;
unsigned int st_ino;
unsigned int st_mode;
unsigned int st_uid;
unsigned int st_gid;
unsigned int st_size;
unsigned char sha1[20];
unsigned short namelen;
unsigned char name[0];
};
How can I find all subsequent versions which contain changes on this particular data structure ?
For example, after 20 commits, the author added a new entry in the above data structure.
So basically I want to see the evolution of code on a particular data structure.
Is this possible in Git ?
Git pickaxe may do want you want – for example if you wanted to find every change related to
st_modeBasically it is a grep string as git returns any commit it finds that contains that string.
git blame may also help. This will show last commits for lines 100 to 125 in filename