git2consul
git2consul copied to clipboard
'git mv ...' doesn't remove old file from kv
I run the command 'git move filename1 filename2' after git2consul picks up changes both filename1 and filename2 are in the KV.
We will need to add test coverage for this case as well as the one mentioned in #80 regarding branch switching.
Ok I can take a look later tonight and report back. I will look into #80 also.
I wonder if passing --no-renames
in https://github.com/Cimpress-MCP/git2consul/blob/master/lib/git/commands.js#L86 would solve this, since it should show filename1 being removed and filename2 being added. I don't know how to write node, or I'd submit a PR.
I just added the --no-renames
flag to that line to resolve the fact that the test suite was now failing on Travis CI since they'd upgraded to git 2.13.0 from 1.9.1 where it was before. I suspect that @calvn's test was catching the root cause of this. @robottaway can you verify which version of git you were using git2consul with and possibly retest with the code in the master branch?
As a workaround until this fix is released, you can add
[diff]
renames = false
to .git/config
in the repo that git2consul monitors.