Skip to content

Conversation

@hartwork
Copy link
Contributor

.. by fixing SHA1 inspection in method copyFileToDiffIfNeeded where any SHA1 matched regex pattern "0*".

That led the external diff feature to always compare the working directory state of a file against itself rather than comparing the version from a given commit against the version from the commit' parent.

Regression from commit 1cb9acf


Fixes #163

@elBoberido @tibirna does this fix the issue for you?

.. by fixing SHA1 inspection in method copyFileToDiffIfNeeded
where any SHA1 matched regex pattern "0*".

That led the external diff feature to always compare the working
directory state of a file against itself rather than comparing
the version from a given commit against the version from the commit'
parent.

Regression from commit 1cb9acf
@elBoberido
Copy link

@hartwork I need to find some time to build qgit from source. Quite busy with other stuff at the moment. By when would you like to know if the patch fixes the bug?

@hartwork
Copy link
Contributor Author

@hartwork I need to find some time to build qgit from source.

@elBoberido are you on Windows, macOS, or Linux? For Linux it would be:

cd "$(mktemp -d)"
git clone --branch fix-external-diff-regression https://github.com/hartwork/qgit
cd qgit
cmake -S . -B build
make -C build
./build/qgit  # .. on its own Git history

Quite busy with other stuff at the moment. By when would you like to know if the patch fixes the bug?

I'm not sure how to answer that but thanks for the report and the quick reply!

@elBoberido
Copy link

@hartwork thanks for the instructions. It seems all dev dependencies where installed, so it was indeed a piece of cake :)

I can confirm that the bug is fixed on your branch and also cross checked that it is present on current master.

Thanks very much for taking care of this.

@tibirna tibirna merged commit 95ffb09 into tibirna:master Oct 15, 2025
2 checks passed
@tibirna
Copy link
Owner

tibirna commented Oct 15, 2025

I confirm the patch fixes #163 . Looking at what broke it, I see that I had to replace a QRegExp::exactMatch, which does not anymore exist in QRegularExpression, with whatever behaviour the latter introduced. I'm still not sure the latest fix is equivalent with the original code (which seemed to have been matching any SHA containing a string of zeros, not only the ZERO_SHA string). It might be that some obscure StGIT functionality might still not work as expected. I guess not many people are still using StGIT though...

@elBoberido
Copy link

Oh, I don't know if it is related to this patch, but now the search and filter is broken

@hartwork
Copy link
Contributor Author

@tibirna would you prefer ^0*$?

@elBoberido with this commit merged but not the parent commit? Sounds like #165 somehow which was reported fixed on master. Which commit is this broken for?

@tibirna
Copy link
Owner

tibirna commented Oct 15, 2025

@elBoberido thanks a lot for testing. From @hartwork 's instructions you have got a version of the source that doesn't contain my fix for the filtering. It will be fixed in the next release.

@hartwork
Copy link
Contributor Author

Makes sense, my fix was sitting right on top of qgit-2.12 rather than master 👍

@hartwork hartwork deleted the fix-external-diff-regression branch October 15, 2025 21:54
@hartwork
Copy link
Contributor Author

hartwork commented Oct 15, 2025

It will be fixed in the next release.

@tibirna thanks for 2.13 🙏 The new release allowed me to cleanly fix this for everyone using Gentoo: gentoo/gentoo@762624c .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

External diff tool broken

3 participants