From 46d5098ff450b8e83b7db9671cd830b2d668402c Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 1 Feb 2022 13:43:18 -0400 Subject: [PATCH] Pass --no-textconv when running git diff internally Seems that --no-ext-diff and -c diff.external= are not enough to disable external diff command when gitattributes textconv specifies it. I'm pretty sure that --no-ext-diff and -c diff.external= are not both needed, but not 100%. Something about -G may need the latter to fully disable diffs in some cases. So kept that part as it was. Sponsored-by: Dartmouth College's Datalad project --- CHANGELOG | 1 + Database/Keys.hs | 3 +++ ...__syntax_warnings_in_diff_driver_on_Windows.mdwn | 4 ++++ ...ment_1_65fda26959f82d1f3d110e72d7aaec9a._comment | 13 +++++++++++++ 4 files changed, 21 insertions(+) create mode 100644 doc/bugs/init__58___syntax_warnings_in_diff_driver_on_Windows/comment_1_65fda26959f82d1f3d110e72d7aaec9a._comment diff --git a/CHANGELOG b/CHANGELOG index cd9311523f..cb67fa3924 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,7 @@ git-annex (10.20220128) UNRELEASED; urgency=medium * adb: Avoid find failing with "Argument list too long" + * Pass --no-textconv when running git diff internally. -- Joey Hess Mon, 31 Jan 2022 13:14:42 -0400 diff --git a/Database/Keys.hs b/Database/Keys.hs index a342274f5e..3c2541ead3 100644 --- a/Database/Keys.hs +++ b/Database/Keys.hs @@ -342,6 +342,9 @@ reconcileStaged qh = unlessM (Git.Config.isBare <$> gitRepo) $ do , Param "--no-renames" -- Avoid other complications. , Param "--ignore-submodules=all" + -- Avoid using external textconv command, which would be slow + -- and possibly wrong. + , Param "--no-textconv" , Param "--no-ext-diff" ] diff --git a/doc/bugs/init__58___syntax_warnings_in_diff_driver_on_Windows.mdwn b/doc/bugs/init__58___syntax_warnings_in_diff_driver_on_Windows.mdwn index 7bedb6ca42..3faa80170f 100644 --- a/doc/bugs/init__58___syntax_warnings_in_diff_driver_on_Windows.mdwn +++ b/doc/bugs/init__58___syntax_warnings_in_diff_driver_on_Windows.mdwn @@ -119,3 +119,7 @@ There is a companion issue in datalad at [https://github.com/datalad/datalad/iss ### Have you had any luck using git-annex before? (Sometimes we get tired of reading bug reports all day and a lil' positive end note does wonders) Git-annex is amazing. I use it daily. A lot of science is made possible by this tool. + +> [[fixed|done]] --[[Joey]] + +[[!tag projects/datalad]] diff --git a/doc/bugs/init__58___syntax_warnings_in_diff_driver_on_Windows/comment_1_65fda26959f82d1f3d110e72d7aaec9a._comment b/doc/bugs/init__58___syntax_warnings_in_diff_driver_on_Windows/comment_1_65fda26959f82d1f3d110e72d7aaec9a._comment new file mode 100644 index 0000000000..83c5dfde84 --- /dev/null +++ b/doc/bugs/init__58___syntax_warnings_in_diff_driver_on_Windows/comment_1_65fda26959f82d1f3d110e72d7aaec9a._comment @@ -0,0 +1,13 @@ +[[!comment format=mdwn + username="joey" + subject="""comment 1""" + date="2022-02-01T17:30:46Z" + content=""" +Hmm, it seems to me that when git-annex runs git diff, it passes +--no-ext-diff, which ought to disable any external diff drivers. + +Ah, so this is really about the .gitattributes textconv, +which enables the same thing in a different way that +the other option doesn't disable. +Ok, I'll add --no-textconv as well. +"""]]