Re:How do I find all the modifications of a given string usi...
by temporallobe on Friday April 17, 2020 @03:57PM
(#22902406)
Could you not just use git log and pipe to grep or egrep? Heck, I’ve even piped git log to a file and then I can use my favorite text editor (VS Code) and use all kinds of fancy regexes.
Re:How do I find all the modifications of a given string usi...
by temporallobe on Friday April 17, 2020 @10:37PM
(#22904895)
You’re right, I probably didn’t (and don’t) understand. I thought that the problem you’re trying to solve is that you wanted to find a particular string that changed over time (past commits). So let’s say I wanted to look for isPizzaDelivered; Could I not do a git log |grep “isPizzaDelivered”? to find all occurrences of that string among all of the previous commits? I read your blog post thoroughly and maybe I’m just not getting it. Perhaps I need to try out the commands myself to see what the output would be so I can get a full picture of what you’re explaining.
I'm not sure if you really understand how pickaxe described in the blog post works. Let me clarify it for you again:
You could use git log: git log will return you git commit title and body.
With the command that I've described in my blog post you can investigate the whole lifecyle of the changes.
Try doing the same with your technique. I'm curious to see how I can do things in a better way.
Thanks!
git pickaxe is super handy because it will search for the selected string in all the commit changes instead.
Give it a go in one of your projects, it's super useful.
I should include some examples in the blog post to convey my message a little bit clearer.