Mercurial > hg-stable
comparison tests/test-diffstat.t @ 41397:f1b0d9988825
diffstat: make --git work properly on renames (issue6025)
`$ hg diff --stat --git` shows only the new filename on renames.
I added the old filename also to the output to make it identical
with the output of `$ git diff --stat`.
Differential Revision: https://phab.mercurial-scm.org/D5628
author | Navaneeth Suresh <navaneeths1998@gmail.com> |
---|---|
date | Thu, 17 Jan 2019 18:05:54 +0530 |
parents | 87c4253bebdb |
children | 4a33a6bf2b52 |
comparison
equal
deleted
inserted
replaced
41396:d75fde22de91 | 41397:f1b0d9988825 |
---|---|
234 line 3 | 234 line 3 |
235 | 235 |
236 $ hg diff --root . --stat | 236 $ hg diff --root . --stat |
237 file | 2 +- | 237 file | 2 +- |
238 1 files changed, 1 insertions(+), 1 deletions(-) | 238 1 files changed, 1 insertions(+), 1 deletions(-) |
239 | |
240 When a file is renamed, --git shouldn't loss the info about old file | |
241 $ hg init issue6025 | |
242 $ cd issue6025 | |
243 $ echo > a | |
244 $ hg ci -Am 'add a' | |
245 adding a | |
246 $ hg mv a b | |
247 $ hg diff --git | |
248 diff --git a/a b/b | |
249 rename from a | |
250 rename to b | |
251 $ hg diff --stat | |
252 a | 1 - | |
253 b | 1 + | |
254 2 files changed, 1 insertions(+), 1 deletions(-) | |
255 $ hg diff --stat --git | |
256 a => b | 0 | |
257 1 files changed, 0 insertions(+), 0 deletions(-) |