]> git.99rst.org Git - git.git/commit
mingw: give more details about unsafe directory's ownership
authorSören Krecker <redacted>
Mon, 8 Jan 2024 17:38:37 +0000 (18:38 +0100)
committerJunio C Hamano <redacted>
Wed, 10 Jan 2024 16:23:30 +0000 (08:23 -0800)
commitf755e092e8bf22e7bf3599d59a6a7fa562f6b61b
treeafd3c47ef7813b0e592fa24e731c40f1ed036894
parentec583449067bab5b800ecc63926f35c9dae96fa1
mingw: give more details about unsafe directory's ownership

Add domain/username in error message, if owner sid of repository and
user sid are not equal on windows systems.

Old error message:
'''
fatal: detected dubious ownership in repository at 'C:/Users/test/source/repos/git'
'C:/Users/test/source/repos/git' is owned by:
'S-1-5-21-571067702-4104414259-3379520149-500'
but the current user is:
'S-1-5-21-571067702-4104414259-3379520149-1001'
To add an exception for this directory, call:

git config --global --add safe.directory C:/Users/test/source/repos/git
'''

New error message:
'''
fatal: detected dubious ownership in repository at 'C:/Users/test/source/repos/git'
'C:/Users/test/source/repos/git' is owned by:
        DESKTOP-L78JVA6/Administrator (S-1-5-21-571067702-4104414259-3379520149-500)
but the current user is:
        DESKTOP-L78JVA6/test (S-1-5-21-571067702-4104414259-3379520149-1001)
To add an exception for this directory, call:

        git config --global --add safe.directory C:/Users/test/source/repos/git
'''

Signed-off-by: Sören Krecker <redacted>
Acked-by: Johannes Sixt <redacted>
Signed-off-by: Junio C Hamano <redacted>
compat/mingw.c
git clone https://git.99rst.org/PROJECT