Defect #44354 ยป git-2.55-diff-path-filtering.patch
| lib/redmine/scm/adapters/git_adapter.rb | ||
|---|---|---|
| 357 | 357 |
diff << line |
| 358 | 358 |
end |
| 359 | 359 |
end |
| 360 |
# "git show" of Git 2.55.0 prints the commit header even when the |
|
| 361 |
# given path is not modified by the commit. Discard such output so |
|
| 362 |
# that an empty diff is returned as with the other versions. |
|
| 363 |
return [] if !path.empty? && diff.none? {|line| line.start_with?('diff --')}
|
|
| 364 | ||
| 360 | 365 |
diff |
| 361 | 366 |
rescue ScmCommandAborted |
| 362 | 367 |
nil |