wikiblame
hajika opened this issue · 3 comments
Wikiblame is a tool that searches for the first occurence of a string. That could be easily implemented with this git Wiki, because there is a command git log -S 'string' --reverse
that searches for strings that are mentioned in commits. First returned commit (with --reverse) should be the first occurence. But there might be others because it has been deleted or changed in the meantime, so there would still be some fiddling to find and present the result.
Hey @hajika, I don't quite understand the use case and what I/we should do to Jingo? Mind expanding a little bit? What problem does it solve?
ok Iam sorry, that was probably somehow confusing. The problem is, that you sometimes need to search for the first occurence of a specific text snippet within the wiki. Or more precisely, you want to know who the hell was responsible for that stupid sentence on that wikipage. That is, where Wikiblame can help you with for Wikipedia for example.
In the Jingo Git Repo you can simply search for git log -S 'string' --reverse
to get the first occurence of a string (and the author), that would be a nice build in function for jingo.
It looks like a 2-step effort: first you git log -S...
, then you get the commit id (and author) and then you git show <commit id> | grep <string>
to finally get the snippet of text, if I understand correctly