PR-4.3-dev Pending

User tests: Successful: Unsuccessful:

avatar laoneo
laoneo
22 May 2023

Git offers the possibility to exclude code style commits in git blame https://git-scm.com/docs/git-blame#Documentation/git-blame.txt---ignore-revs-fileltfilegt. Github is supporting this feature as well https://docs.github.com/en/repositories/working-with-files/using-files/viewing-a-file#ignore-commits-in-the-blame-view.

This pr adds the PSR 12 conversion and some other CS commits to the file .git-blame-ignore-revs, which should be excluded in blame then.

Want to test this, browse around in https://github.com/Digital-Peak/joomla-cms/tree/blame and open the blame view. The commits should not be displayed there.

avatar laoneo laoneo - open - 22 May 2023
avatar laoneo laoneo - change - 22 May 2023
Status New Pending
avatar laoneo laoneo - change - 22 May 2023
The description was changed
avatar laoneo laoneo - edited - 22 May 2023
avatar richard67
richard67 - comment - 22 May 2023

Want to test this, browse around in https://github.com/Digital-Peak/joomla-cms/tree/blame and open the blame view. The commits should not be displayed there.

@laoneo Doesn't work here:
j4 3_pr-40642

b0d75bd 22 May 2023 avatar laoneo test
avatar laoneo laoneo - change - 22 May 2023
Labels Added: PR-4.3-dev
avatar laoneo
laoneo - comment - 22 May 2023

Not sure why this one is not excluded, the other ones are. For example #39616 is excluded as you can see here https://github.com/Digital-Peak/joomla-cms/blame/blame/libraries/cms.php when you compare it with https://github.com/Digital-Peak/joomla-cms/blame/4.4-dev/libraries/cms.php.

I also don't see the failed warning, the correct one is displayed:
image

avatar laoneo
laoneo - comment - 22 May 2023

When I do it on command line, then it works also with the PSR 12 one.

avatar richard67
richard67 - comment - 22 May 2023

Maybe GitHub has a bug when using the "blame" function on a branch with name "blame"?

avatar laoneo
laoneo - comment - 22 May 2023

Maybe, as the commit hash should be the correct one.

avatar HLeithner
HLeithner - comment - 24 May 2023

thanks I have one similar to this but only local

avatar obuisard obuisard - close - 24 May 2023
avatar obuisard obuisard - merge - 24 May 2023
avatar obuisard obuisard - change - 24 May 2023
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2023-05-24 16:16:15
Closed_By obuisard
avatar obuisard
obuisard - comment - 24 May 2023

Thanks Allon @laoneo !

avatar laoneo
laoneo - comment - 25 May 2023

I had another look @richard67 and the PSR 12 entry with the blank line on line 2 is because this line was added through that commit and there is no previous commit. So git has to show that commit as it is the first one. But when you compare the file libraries/cms.php on the 4.3 branch with the on from 5.0, which doesn't have the ignore pr merged up, then the other PSR 12 changes are not listed, because there are some older commits on these lines, check line 13 on the next two screenshots.

4.3
image

5.0
image

Add a Comment

Login with GitHub to post a comment