diff tests/test-diff-unified.t @ 46375:33350debb480 stable

patch: make diff --git to differentiate b/w file is empty or doesn't exists Before this patch, as we didn't differentiate the two cases of a file in a context: 1. File doesn't exists 2. File is empty which causes the blob id to be same for both the cases. Now we use `nullhex` for a file which doesn't exists in a context (aligning it with the git diff format) Changes in test file reflect the fixed behavior. Differential Revision: https://phab.mercurial-scm.org/D10001
author Sushil khanchi <sushilkhanchi97@gmail.com>
date Tue, 16 Feb 2021 15:44:51 +0530
parents df44bac9413d
children 67064c238ae7
line wrap: on
line diff
--- a/tests/test-diff-unified.t	Tue Feb 16 15:37:19 2021 +0530
+++ b/tests/test-diff-unified.t	Tue Feb 16 15:44:51 2021 +0530
@@ -467,7 +467,7 @@
   $ hg ci -Am "empty a"
   adding a
   $ hg diff -c 0 --git --config experimental.extendedheader.index=full | grep index
-  index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644
+  index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644
 
 Make sure `hg diff --git` differentiate "file was empty" and "file is removed"
 for git blob oids
@@ -476,6 +476,6 @@
   $ hg ci -Am "removed a"
   removing a
   $ hg diff -c 1 --git --config experimental.extendedheader.index=full | grep index
-  index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644
+  index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 100644
 
   $ cd ..