mirror of
https://github.com/git-chglog/git-chglog.git
synced 2026-08-04 16:53:14 +00:00
* Argument: --path filtering - refs #35 * Minor documentation additions for Paths option
This commit is contained in:
parent
a1c84d7a0d
commit
9d62af2943
6 changed files with 28 additions and 5 deletions
|
|
@ -86,12 +86,20 @@ func newCommitParser(logger *Logger, client gitcmd.Client, jiraClient JiraClient
|
|||
}
|
||||
|
||||
func (p *commitParser) Parse(rev string) ([]*Commit, error) {
|
||||
out, err := p.client.Exec(
|
||||
"log",
|
||||
paths := p.config.Options.Paths
|
||||
|
||||
args := []string{
|
||||
rev,
|
||||
"--no-decorate",
|
||||
"--pretty="+logFormat,
|
||||
)
|
||||
"--pretty=" + logFormat,
|
||||
}
|
||||
|
||||
if len(paths) > 0 {
|
||||
args = append(args, "--")
|
||||
args = append(args, paths...)
|
||||
}
|
||||
|
||||
out, err := p.client.Exec("log", args...)
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue