On 2020-08-28 08:40, 'Reimundo Heluani' via sage-devel wrote:
> On Aug 28, Michael Orlitzky wrote:
>> On 2020-08-28 08:23, 'Reimundo Heluani' via sage-devel wrote:
>>> Thanks, I guess recompilation is unavoidable then, the worst part is that it was one of my own tickets :)
>>>
>>
>> Dima meant "git fetch" literally. That will pull down the changes, but
>> won't try to merge them into your local branch (like "git pull" would).
>>
> yeah but looking at a diff would be impossible to find conflicts with such a
> large patch. The only way I know of is attempting a merge, and if there are
> conflicts this always results in changing the working tree.
You can try creating a patch with `git format-patch`, and then applying
it with `git apply --check`.
I have a branch of the ClamAV project right now that conflicts with
upstream, so I'm using that as my example. First I have to find the
latest common ancestor of my branch and the upstream one,
$ git merge-base HEAD upstream/dev/0.103
854d38de546a53e3c27b90965b8d89804acfdf02
Now if I format-patch that against the upstream branch, I get...
$ git format-patch 854d38de546..upstream/dev/0.103
0000-cover-letter.patch
0001-Add-newlines-at-end-of-sources-to-satisfy-strict-war.patch
0002-Update-acknowledgements-in-the-NEWS.patch
0003-Remove-v-typo-from-unit-test-source.patch
0004-bb12596-Fix-build-issue-when-libcheck-missing.patch
0005-Add-autogen.sh-to-Autotools-dist.patch
0006-Autotools-freshclam-remove-BUILD_CLAMD-macro.patch
0007-CMake-Fix-libclamav-pcre2-include-path-issue.patch
0008-clam-d-scan-win32-fix-RO-directory-remove-bug.patch
0009-Autotools-Add-pkg-config-support-for-finding-pcre2.patch
0010-Update-acknowledgements-in-the-NEWS.patch
And one of those should fail to apply:
$ git apply --check 0001*.patch
$ git apply --check 0002*.patch
$ git apply --check 0003*.patch
$ git apply --check 0004*.patch
$ git apply --check 0005*.patch
$ git apply --check 0006*.patch
error: patch failed: clamav-milter/Makefile.am:36
error: clamav-milter/Makefile.am: patch does not apply
error: patch failed: clamd/Makefile.am:46
error: clamd/Makefile.am: patch does not apply
error: patch failed: etc/Makefile.am:23
error: etc/Makefile.am: patch does not apply
That last one is responsible for the conflict, and `git status` shows
that my local tree hasn't been changed (aside from the new patch files).