[Bug 6486] New: hg diff --git should make a difference between "file did not exists" and "file was empty"
mercurial-bugs at mercurial-scm.org
mercurial-bugs at mercurial-scm.org
Fri Feb 12 13:10:21 UTC 2021
https://bz.mercurial-scm.org/show_bug.cgi?id=6486
Bug ID: 6486
Summary: hg diff --git should make a difference between "file
did not exists" and "file was empty"
Product: Mercurial
Version: default branch
Hardware: PC
OS: Linux
Status: UNCONFIRMED
Severity: bug
Priority: wish
Component: Mercurial
Assignee: bugzilla at mercurial-scm.org
Reporter: sushilkhanchi97 at gmail.com
CC: mercurial-devel at mercurial-scm.org
Python Version: ---
Repo setup:
hg init repo
cd repo
touch a
hg ci -Am "empty a"
Now run:
hg diff -c 0 --git --config experimental.extendedheader.index=full
Output:
```
diff --git a/a b/a
new file mode 100644
index
e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
100644
```
Whereas, in a git repository output would be:
```
diff --git a/a b/a
new file mode 100644
index
0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
```
where: '0' * 40 is used for: NULL_BLOB_ID (file does not exists)
and 'e69de29bb2d1' is used for EMPTY_BLOB_ID (file is empty)
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Mercurial-devel
mailing list