git ä¸ã§åé¤ãããã¡ã¤ã«ãã³ã¼ãå ã§å©ç¨ããã¦ãããã©ãã調ã¹ãããã®ã¯ã³ã©ã¤ãã¼
åé¤ãããã¡ã¤ã«ã 1 㤠2 ã¤ã ã£ãã使ããã¦ãããã©ããã調ã¹ãããã«ç´ æ´ã« grep ããã°ãããã ãã©ã大éã«ããã¨ãã¤ããã®ã§æ軽ã«èª¿ã¹ãããã¯ã³ã©ã¤ãã¼ãæ¸ãã¦ã¿ãã
git log <commit_hash>...<commit_hash> --diff-filter=D --name-only --oneline | grep -Eo '[^/]+$' | xargs -I arg git grep arg
ç´°ãã解説ããã¨ä»¥ä¸ã®ãããªåã
git log <commit_hash>...<commit_hash> --diff-filter=D --name-only --oneline
ã§ã³ãããéã§åé¤ããããã¡ã¤ã«ã®ä¸è¦§ãåºã- âã ã¨ãã«ãã¹ãåºã¦ãããã©ãã³ã¼ãå
ã§ç¸å¯¾ãã¹ã§åç
§ããããã¨ãããã®ã§
grep -Eo '[^/]+$'
ã§ãã¡ã¤ã«åã®ã¿ãåãåºã xargs -I arg git grep arg
ã§ãã¡ã¤ã«åãã¨ã« git grep
git grep ãã¾ããã®ã§ãã¡ã¤ã«æ°ãå¢ããã¨ãããæéãææ°é¢æ°çã«å¢å ãã¦ãããã©ãæå ã§è©¦ãããããã¯300ãã¡ã¤ã«ããããªãã¾ããã¡ããã¡ãæéããããã¨ããæãã§ããªãã£ãã(ã³ã¼ãã®è¦æ¨¡ã«ããããã©â¦)