git log - How can I make git list all changed files of a certain type in a specific path for a specific bug? -


i know how make git list changed files

  • of type (e.g. php files)
  • filed under bug no. or still uncommitted
  • and in specific path

i'll start laying out example situation question.

say have changed following files:

uncommitted changes

/site/main.php /site/main.html /site/includes/lib.php 

commit 3
commit message: "bug xyz: made changes"

/site/main.php /site/main.html /site/main.js /test/test.php /test/test.html 

commit 2
commit message: "bug xyz: made more changes"

/site/main.php /site/main.html /site/includes/include.php 

commit 1
commit message: "bug abc: note bug"

/site/login.php 

say i'm still working on bug xyz. need list of php files have been changed far in site directory bug. need following list output:

/site/main.php /site/includes/lib.php /site/includes/include.php 

what command can this?

this close:

git log --grep=xyz -- '*.php' 

the --grep argument applied commit messages. single quotes on files argument ensures git expansion.

a test:

ebg@ebg(328)$ git log --oneline f687708 bar x, y, not dfb4b96 foo d, e, f df18118 foo a, b, c ebg@ebg(329)$ git log --oneline --grep=a f687708 bar x, y, not df18118 foo a, b, c ebg@ebg(330)$ git log --oneline --grep=a -- 'a.*' df18118 foo a, b, c 

the file expansion might need handle subdirectories. sort of:

git log --oneline --grep=a -- '*/a.*' 'a.*' 

Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -