diff --git a/CHANGELOG.mkd b/CHANGELOG.mkd index 174e5b74a..0da500081 100644 --- a/CHANGELOG.mkd +++ b/CHANGELOG.mkd @@ -4,6 +4,7 @@ CHANGELOG Unreleased ---------- +- shellgit: Ensure the passed filepath to diff-index is interpreted as filepath [#1367](https://github.com/puppetlabs/r10k/pull/1367) 4.0.0 ----- diff --git a/lib/r10k/git/shellgit/working_repository.rb b/lib/r10k/git/shellgit/working_repository.rb index 58a259294..e4ad915c5 100644 --- a/lib/r10k/git/shellgit/working_repository.rb +++ b/lib/r10k/git/shellgit/working_repository.rb @@ -101,7 +101,7 @@ def dirty?(exclude_spec=true) logger.debug(_("Found local modifications in %{file_path}" % {file_path: File.join(@path, file)})) # Do this in a block so that the extra subprocess only gets invoked when needed. - logger.debug1 { git(['diff-index', '-p', 'HEAD', file], :path => @path.to_s, :raise_on_fail => false).stdout } + logger.debug1 { git(['diff-index', '-p', 'HEAD', '--', file], :path => @path.to_s, :raise_on_fail => false).stdout } end return dirty_files.size > 0