[Updated] D10000: tests: add a test to demonstrate a bug in `hg diff --git` (issue6486)

khanchi97 (Sushil khanchi) phabricator at mercurial-scm.org
Wed Feb 24 16:07:19 UTC 2021


Closed by commit rHGdf44bac9413d: tests: add a test to demonstrate a bug in `hg diff --git` (issue6486) (authored by khanchi97).
This revision was automatically updated to reflect the committed changes.
This revision was not accepted when it landed; it landed in state "Needs Review".

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D10000?vs=25637&id=25866

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D10000/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D10000

AFFECTED FILES
  tests/test-diff-unified.t

CHANGE DETAILS

diff --git a/tests/test-diff-unified.t b/tests/test-diff-unified.t
--- a/tests/test-diff-unified.t
+++ b/tests/test-diff-unified.t
@@ -456,3 +456,26 @@
     .
 
   $ cd ..
+
+Make sure `hg diff --git` differentiate "file did not exists" and "file is empty"
+for git blob oids
+
+  $ hg init bloboids
+  $ cd bloboids
+
+  $ touch a
+  $ hg ci -Am "empty a"
+  adding a
+  $ hg diff -c 0 --git --config experimental.extendedheader.index=full | grep index
+  index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644
+
+Make sure `hg diff --git` differentiate "file was empty" and "file is removed"
+for git blob oids
+
+  $ rm a
+  $ hg ci -Am "removed a"
+  removing a
+  $ hg diff -c 1 --git --config experimental.extendedheader.index=full | grep index
+  index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644
+
+  $ cd ..



To: khanchi97, #hg-reviewers
Cc: Alphare, mharbison72, pulkit, mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20210224/b775c7da/attachment-0002.html>


More information about the Mercurial-patches mailing list