# HG changeset patch # User Matt Harbison # Date 1619643932 14400 # Node ID 9cea55ca117535a092c9e6fb5e0edf1a5a6b6fd4 # Parent 4c7bc42a509e7d896f2c30bc232e506cdb73b6cf git: ensure all dirstate state values are bytes I'm not sure how this particular git status occurs, but after the fallout of issue 6510 and getting into the issue 6511 state where `git status` shows the files as modified in both the "to be committed" and "not staged" lists, `hg diff` was crashing in `workingctx.__contains__()`. Differential Revision: https://phab.mercurial-scm.org/D10532 diff -r 4c7bc42a509e -r 9cea55ca1175 hgext/git/dirstate.py --- a/hgext/git/dirstate.py Wed Apr 28 10:29:45 2021 -0400 +++ b/hgext/git/dirstate.py Wed Apr 28 17:05:32 2021 -0400 @@ -63,7 +63,7 @@ pygit2.GIT_STATUS_WT_RENAMED: b'a', pygit2.GIT_STATUS_WT_TYPECHANGE: b'n', pygit2.GIT_STATUS_WT_UNREADABLE: b'?', - pygit2.GIT_STATUS_INDEX_MODIFIED | pygit2.GIT_STATUS_WT_MODIFIED: 'm', + pygit2.GIT_STATUS_INDEX_MODIFIED | pygit2.GIT_STATUS_WT_MODIFIED: b'm', }