"git blame" file access control modifier

I noticed that a couple of .txtfiles in my git repository have execute permissions. I also noticed that when I did chmod a-x *.txt, the repo actually showed the changes. Here is the result of the work git diffafter updating the files.

diff --git a/requirements.txt b/requirements.txt
old mode 100755
new mode 100644

Is there a way to blame file permissions? (in particular, I would like to know who added the permissions a+xto these files.

+4
source share
2 answers

Perhaps you used a command git diffwith some commits indicated to get the results specified in your question. Assume the command:

git diff goodcommit..badcommit requirements.txt

..badcommit, , badcommit - HEAD. ( ), :

git bisect start badcommit goodcommit
git bisect run test ! -x requirements.txt

. :

running test ! -x requirements.txt
8088473809f905bd8f3d5825983e8c9fe82b10c6 is the first bad commit
commit 8088473809f905bd8f3d5825983e8c9fe82b10c6
Author: author
Date:   Fri Jun 16 23:05:49 2017 +0100

    commit message

, :

git bisect reset
+4

Git . . . , .

:

git log --follow -p -- a/requirements.txt

.

+1

Source: https://habr.com/ru/post/1679497/


All Articles