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: bugzi...@mercurial-scm.org
          Reporter: sushilkhanch...@gmail.com
                CC: mercurial-devel@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.
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to