jeudi 5 avril 2018

Regex for grep in git command

Currently, I am working on mining software repository in github. I use the git log command to get the commit logs. But when I only need to find the commit logs contain a specific word, some unexpected logs also have shown. For example, I need the commit log contains word HBASE-792. I used command git log --grep='HBASE-792' --oneline. But these logs have shown:

HBASE-7921. TestHFileBlock.testGzipCompression should ignore the block checksum
HBASE-7923 force unassign can confirm region online on any RS to get rid of double assignments
HBASE-7928 Scanning .META. with startRow and/or stopRow is not giving proper results; REVERT.  NEEDS SOME MORE WORK
Fix overlogging; part of HBASE-792 patch
Patches to alleviate HBASE-790 and HBASE-792

What I need are only the last 2 commit logs which exactly contain HBASE-792. What pattern should I write in grep?

Aucun commentaire:

Enregistrer un commentaire