diff options
| author | Shulhan <ms@kilabit.info> | 2026-01-14 06:01:04 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2026-01-14 06:01:04 +0700 |
| commit | 3a5a19786171b7db01b490f68c791fcfc89647f5 (patch) | |
| tree | eaf4fff139107fa6e95f91fbfc243f32dff40e93 /lib/git/git.go | |
| parent | d18ec5d8635bf3dc02b23acdbf861ce518e54058 (diff) | |
| download | pakakeh.go-3a5a19786171b7db01b490f68c791fcfc89647f5.tar.xz | |
lib/git: pass "--" when running LogFollow command
The "--" prevent ambiguous argument, to separate a path from revision.
While at it, add more test case for LogFollow.
Diffstat (limited to 'lib/git/git.go')
| -rw-r--r-- | lib/git/git.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/git/git.go b/lib/git/git.go index 3ee5c376..3e41f16d 100644 --- a/lib/git/git.go +++ b/lib/git/git.go @@ -284,7 +284,7 @@ func (git *Git) LogFollow(path, format string) (logs []string, err error) { var cmd *exec.Cmd cmd = exec.Command(`git`) - cmd.Args = append(cmd.Args, `--no-pager`, `log`, `--follow`, `--format=`+format, path) + cmd.Args = append(cmd.Args, `--no-pager`, `log`, `--follow`, `--format=`+format, `--`, path) cmd.Dir = git.absDir cmd.Stderr = _stderr |
