{"thread":{"id":"64655","subject":"[PATCH] diff: add --no-indicators option","startedAt":"2025-12-19T08:17:47Z","lastAt":"2025-12-20T13:15:01Z","messageCount":18,"participants":["Harald Nordgren via GitGitGadget","Collin Funk","Phillip Wood","Harald Nordgren","Junio C Hamano","Ben Knoble","Chris Torek","Johannes Sixt"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"532526","messageId":"pull.2133.git.git.1766132264231.gitgitgadget@gmail.com","threadId":"64655","inReplyTo":null,"subject":"[PATCH] diff: add --no-indicators option","fromName":"Harald Nordgren via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2025-12-19T08:17:44Z","receivedAt":"2025-12-19T08:17:47Z","isPatch":true,"sender":{"key":"haraldnordgren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/9569897?v=4"},"body":"From: Harald Nordgren <haraldnordgren@gmail.com>\n\nAdd --no-indicators to replace '+', '-', and ' ' indicators in the\nleft margin with spaces. Colors are preserved, allowing diffs to be\ndistinguished by color alone.\n\nThis is useful when copy-pasting diff output, as the indicators no\nlonger need to be manually removed.\n\nSigned-off-by: Harald Nordgren <haraldnordgren@gmail.com>\n---\n    diff: add '--no-indicators' option\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-2133%2FHaraldNordgren%2Fno-indicators-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-2133/HaraldNordgren/no-indicators-v1\nPull-Request: https://github.com/git/git/pull/2133\n\n diff.c                 | 17 +++++++++++++++++\n t/t4000-diff-format.sh | 32 ++++++++++++++++++++++++++++++++\n 2 files changed, 49 insertions(+)\n\ndiff --git a/diff.c b/diff.c\nindex 436da250eb..668ba349fe 100644\n--- a/diff.c\n+++ b/diff.c\n@@ -5290,6 +5290,20 @@ static int diff_opt_char(const struct option *opt,\n \treturn 0;\n }\n \n+static int diff_opt_no_indicators(const struct option *opt,\n+\t\t\t\t  const char *arg, int unset)\n+{\n+\tstruct diff_options *options = opt->value;\n+\n+\tBUG_ON_OPT_NEG(unset);\n+\tBUG_ON_OPT_ARG(arg);\n+\n+\toptions->output_indicators[OUTPUT_INDICATOR_NEW] = ' ';\n+\toptions->output_indicators[OUTPUT_INDICATOR_OLD] = ' ';\n+\toptions->output_indicators[OUTPUT_INDICATOR_CONTEXT] = ' ';\n+\treturn 0;\n+}\n+\n static int diff_opt_color_moved(const struct option *opt,\n \t\t\t\tconst char *arg, int unset)\n {\n@@ -5828,6 +5842,9 @@ struct option *add_diff_options(const struct option *opts,\n \t\tOPT_INTEGER_F(0, \"inter-hunk-context\", &options->interhunkcontext,\n \t\t\t      N_(\"show context between diff hunks up to the specified number of lines\"),\n \t\t\t      PARSE_OPT_NONEG),\n+\t\tOPT_CALLBACK_F(0, \"no-indicators\", options, NULL,\n+\t\t\t       N_(\"do not show '+', '-' and ' ' indicators in the left margin\"),\n+\t\t\t       PARSE_OPT_NONEG | PARSE_OPT_NOARG, diff_opt_no_indicators),\n \t\tOPT_CALLBACK_F(0, \"output-indicator-new\",\n \t\t\t       &options->output_indicators[OUTPUT_INDICATOR_NEW],\n \t\t\t       N_(\"<char>\"),\ndiff --git a/t/t4000-diff-format.sh b/t/t4000-diff-format.sh\nindex 32b14e3a71..1863553056 100755\n--- a/t/t4000-diff-format.sh\n+++ b/t/t4000-diff-format.sh\n@@ -95,6 +95,38 @@ test_expect_success 'git diff-files --patch --no-patch does not show the patch'\n \ttest_must_be_empty err\n '\n \n+cat >expected_no_indicators <<\\EOF\n+diff --git a/path0 b/path0\n+old mode 100644\n+new mode 100755\n+--- a/path0\n++++ b/path0\n+@@ -1,3 +1,3 @@\n+ Line 1\n+ Line 2\n+ line 3\n+ Line 3\n+diff --git a/path1 b/path1\n+deleted file mode 100755\n+--- a/path1\n++++ /dev/null\n+@@ -1,3 +0,0 @@\n+ Line 1\n+ Line 2\n+ line 3\n+EOF\n+\n+test_expect_success 'git diff-files --no-indicators replaces +/- with spaces' '\n+\tgit diff-files -p --no-indicators >actual &&\n+\tcompare_diff_patch expected_no_indicators actual\n+'\n+\n+test_expect_success 'git diff-files --no-indicators --color preserves colors' '\n+\tgit diff-files -p --no-indicators --color --ws-error-highlight=none >actual.raw &&\n+\ttest_decode_color <actual.raw >actual &&\n+\tgrep -F \"<RED> line 3<RESET>\" actual &&\n+\tgrep -F \"<GREEN> Line 3<RESET>\" actual\n+'\n \n # Smudge path2/path3 so that dirstat has something to show\n date >path2/path3\n\nbase-commit: c4a0c8845e2426375ad257b6c221a3a7d92ecfda\n-- \ngitgitgadget\n"},{"id":"532531","messageId":"87qzsqaly3.fsf@gmail.com","threadId":"64655","inReplyTo":"pull.2133.git.git.1766132264231.gitgitgadget@gmail.com","subject":"Re: [PATCH] diff: add --no-indicators option","fromName":"Collin Funk","fromEmail":"collin.funk1@gmail.com","sentAt":"2025-12-19T08:57:08Z","receivedAt":"2025-12-19T08:57:10Z","isPatch":true,"sender":{"key":"collin.funk1@gmail.com","avatar":"https://avatars.githubusercontent.com/u/65689063?v=4"},"body":"\"Harald Nordgren via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n\n> From: Harald Nordgren <haraldnordgren@gmail.com>\n>\n> Add --no-indicators to replace '+', '-', and ' ' indicators in the\n> left margin with spaces. Colors are preserved, allowing diffs to be\n> distinguished by color alone.\n>\n> This is useful when copy-pasting diff output, as the indicators no\n> longer need to be manually removed.\n>\n> Signed-off-by: Harald Nordgren <haraldnordgren@gmail.com>\n> ---\n>     diff: add '--no-indicators' option\n>\n> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-2133%2FHaraldNordgren%2Fno-indicators-v1\n> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-2133/HaraldNordgren/no-indicators-v1\n> Pull-Request: https://github.com/git/git/pull/2133\n>\n>  diff.c                 | 17 +++++++++++++++++\n>  t/t4000-diff-format.sh | 32 ++++++++++++++++++++++++++++++++\n>  2 files changed, 49 insertions(+)\n\nWould a 'sed' command work for this? Something like:\n\n    $ git diff --color=always HEAD~ \\\n        | sed -E '/^(\\x1b\\[[0-9;]*m)*(-{3} a|\\+{3} b)/b\n                  s/^((\\x1b\\[[0-9;]*m)*)[-+]/\\1 /'\n\nMy impression is that indicators are wanted for diff's most (all?) of\nthe time.\n\nCollin\n"},{"id":"532534","messageId":"035238d7-f98a-4072-a363-9a57650abb95@gmail.com","threadId":"64655","inReplyTo":"pull.2133.git.git.1766132264231.gitgitgadget@gmail.com","subject":"Re: [PATCH] diff: add --no-indicators option","fromName":"Phillip Wood","fromEmail":"phillip.wood123@gmail.com","sentAt":"2025-12-19T10:33:40Z","receivedAt":"2025-12-19T10:33:47Z","isPatch":true,"sender":{"key":"phillip.wood@dunelm.org.uk","avatar":null},"body":"Hi Harald\n\nOn 19/12/2025 08:17, Harald Nordgren via GitGitGadget wrote:\n> From: Harald Nordgren <haraldnordgren@gmail.com>\n> \n> Add --no-indicators to replace '+', '-', and ' ' indicators in the\n> left margin with spaces. Colors are preserved, allowing diffs to be\n> distinguished by color alone.\n> \n> This is useful when copy-pasting diff output, as the indicators no\n> longer need to be manually removed.\n\nBut you're still left with a space at the beginning of each line. I'd \nhave thought it would be better for --no-indicators to just strip the \nleading '+', ' ', '-' though that still leaves us with\n\n     \\ No newline at end of file\n\nshould that whole line be stripped as well?\n\nIf you just want to replace the indicators with a space then you can \nalways set up an alias that does\n\n     diff --output-indicator-old=' '  --output-indicator-new=' ' \\\n          --output-indicator-context=' '\n\nThe --output-indicator-* options error out if you pass an empty string \nso you cannot use them to remove the indicators all together.\n\nThanks\n\nPhillip\n\n> Signed-off-by: Harald Nordgren <haraldnordgren@gmail.com>\n> ---\n>      diff: add '--no-indicators' option\n> \n> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-2133%2FHaraldNordgren%2Fno-indicators-v1\n> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-2133/HaraldNordgren/no-indicators-v1\n> Pull-Request: https://github.com/git/git/pull/2133\n> \n>   diff.c                 | 17 +++++++++++++++++\n>   t/t4000-diff-format.sh | 32 ++++++++++++++++++++++++++++++++\n>   2 files changed, 49 insertions(+)\n> \n> diff --git a/diff.c b/diff.c\n> index 436da250eb..668ba349fe 100644\n> --- a/diff.c\n> +++ b/diff.c\n> @@ -5290,6 +5290,20 @@ static int diff_opt_char(const struct option *opt,\n>   \treturn 0;\n>   }\n>   \n> +static int diff_opt_no_indicators(const struct option *opt,\n> +\t\t\t\t  const char *arg, int unset)\n> +{\n> +\tstruct diff_options *options = opt->value;\n> +\n> +\tBUG_ON_OPT_NEG(unset);\n> +\tBUG_ON_OPT_ARG(arg);\n> +\n> +\toptions->output_indicators[OUTPUT_INDICATOR_NEW] = ' ';\n> +\toptions->output_indicators[OUTPUT_INDICATOR_OLD] = ' ';\n> +\toptions->output_indicators[OUTPUT_INDICATOR_CONTEXT] = ' ';\n> +\treturn 0;\n> +}\n> +\n>   static int diff_opt_color_moved(const struct option *opt,\n>   \t\t\t\tconst char *arg, int unset)\n>   {\n> @@ -5828,6 +5842,9 @@ struct option *add_diff_options(const struct option *opts,\n>   \t\tOPT_INTEGER_F(0, \"inter-hunk-context\", &options->interhunkcontext,\n>   \t\t\t      N_(\"show context between diff hunks up to the specified number of lines\"),\n>   \t\t\t      PARSE_OPT_NONEG),\n> +\t\tOPT_CALLBACK_F(0, \"no-indicators\", options, NULL,\n> +\t\t\t       N_(\"do not show '+', '-' and ' ' indicators in the left margin\"),\n> +\t\t\t       PARSE_OPT_NONEG | PARSE_OPT_NOARG, diff_opt_no_indicators),\n>   \t\tOPT_CALLBACK_F(0, \"output-indicator-new\",\n>   \t\t\t       &options->output_indicators[OUTPUT_INDICATOR_NEW],\n>   \t\t\t       N_(\"<char>\"),\n> diff --git a/t/t4000-diff-format.sh b/t/t4000-diff-format.sh\n> index 32b14e3a71..1863553056 100755\n> --- a/t/t4000-diff-format.sh\n> +++ b/t/t4000-diff-format.sh\n> @@ -95,6 +95,38 @@ test_expect_success 'git diff-files --patch --no-patch does not show the patch'\n>   \ttest_must_be_empty err\n>   '\n>   \n> +cat >expected_no_indicators <<\\EOF\n> +diff --git a/path0 b/path0\n> +old mode 100644\n> +new mode 100755\n> +--- a/path0\n> ++++ b/path0\n> +@@ -1,3 +1,3 @@\n> + Line 1\n> + Line 2\n> + line 3\n> + Line 3\n> +diff --git a/path1 b/path1\n> +deleted file mode 100755\n> +--- a/path1\n> ++++ /dev/null\n> +@@ -1,3 +0,0 @@\n> + Line 1\n> + Line 2\n> + line 3\n> +EOF\n> +\n> +test_expect_success 'git diff-files --no-indicators replaces +/- with spaces' '\n> +\tgit diff-files -p --no-indicators >actual &&\n> +\tcompare_diff_patch expected_no_indicators actual\n> +'\n> +\n> +test_expect_success 'git diff-files --no-indicators --color preserves colors' '\n> +\tgit diff-files -p --no-indicators --color --ws-error-highlight=none >actual.raw &&\n> +\ttest_decode_color <actual.raw >actual &&\n> +\tgrep -F \"<RED> line 3<RESET>\" actual &&\n> +\tgrep -F \"<GREEN> Line 3<RESET>\" actual\n> +'\n>   \n>   # Smudge path2/path3 so that dirstat has something to show\n>   date >path2/path3\n> \n> base-commit: c4a0c8845e2426375ad257b6c221a3a7d92ecfda\n\n"},{"id":"532537","messageId":"20251219114602.96489-1-haraldnordgren@gmail.com","threadId":"64655","inReplyTo":"035238d7-f98a-4072-a363-9a57650abb95@gmail.com","subject":"Re: [PATCH] diff: add --no-indicators option","fromName":"Harald Nordgren","fromEmail":"haraldnordgren@gmail.com","sentAt":"2025-12-19T11:46:02Z","receivedAt":"2025-12-19T11:46:05Z","isPatch":true,"sender":{"key":"haraldnordgren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/9569897?v=4"},"body":"Hi Phillip!\n\nYeah, getting rid of the extra space in the beginning would be preferable,\nI can take a look at that assuming that this has any chance of getting merged.\n\nHarald\n\n"},{"id":"532538","messageId":"20251219114814.98846-1-haraldnordgren@gmail.com","threadId":"64655","inReplyTo":"87qzsqaly3.fsf@gmail.com","subject":"Re: [PATCH] diff: add --no-indicators option","fromName":"Harald Nordgren","fromEmail":"haraldnordgren@gmail.com","sentAt":"2025-12-19T11:48:14Z","receivedAt":"2025-12-19T11:48:17Z","isPatch":true,"sender":{"key":"haraldnordgren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/9569897?v=4"},"body":"Hi Collin!\n\nSurely, \"git diff --output-indicator-old=' ' --output-indicator-new=' '\"\nexists for a reason, to allow users to customize the workflow for\nthemselves. So this is adding a better short-hand instead of that, which\nfeels a bit clunky. Sed workaround would likely work, but nicer to have it\nnative inside git instead?\n\nI use Git from the CLI 99.99% of the time, and find myself often copy-\npasting to recover some code from and old commit, so then this helps to\nsave me pasting in and the manually removing the +/- signs. Not a huge\ndeal, but makes the awesome Git CLI even better.\n\nHarald\n\n"},{"id":"532540","messageId":"xmqq8qeywuno.fsf@gitster.g","threadId":"64655","inReplyTo":"pull.2133.git.git.1766132264231.gitgitgadget@gmail.com","subject":"Re: [PATCH] diff: add --no-indicators option","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-12-19T11:58:03Z","receivedAt":"2025-12-19T11:58:05Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Harald Nordgren via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n\n> From: Harald Nordgren <haraldnordgren@gmail.com>\n>\n> Add --no-indicators to replace '+', '-', and ' ' indicators in the\n> left margin with spaces. Colors are preserved, allowing diffs to be\n> distinguished by color alone.\n>\n> This is useful when copy-pasting diff output, as the indicators no\n> longer need to be manually removed.\n\nIf you are cutting more than two lines, then the first column,\nwhether it is '+' or neutered ' ', needs to be removed.  And even if\nyou are cutting just one line, you'd still need to deal with the\nbyte in the first column, whether it is '+' or ' ', by either\ncutting from the second column or removing the first column after\npasting.\n\nAlso, if your terminal emulator allows cutting from Nth column to\nthe right (e.g., \"screen\" allows this), it does not matter what the\nfirst letter is.  You can just say \"cut from the 2nd column\" and you\nare done.\n\nSo, I am not sure if this is something we want to support.  Are\nthere other people's \"diff\" implementations (like GNU or BSD) that\nhas something like that?  If not, it takes a lot more to convince\nothers.\n"},{"id":"532546","messageId":"7B631B32-22B7-443C-8D1A-D05FF93F55C2@gmail.com","threadId":"64655","inReplyTo":"20251219114814.98846-1-haraldnordgren@gmail.com","subject":"Re: [PATCH] diff: add --no-indicators option","fromName":"Ben Knoble","fromEmail":"ben.knoble@gmail.com","sentAt":"2025-12-19T13:28:48Z","receivedAt":"2025-12-19T13:29:00Z","isPatch":true,"sender":{"key":"ben.knoble@gmail.com","avatar":"https://avatars.githubusercontent.com/u/22802209?v=4"},"body":"\n> Le 19 déc. 2025 à 07:27, Harald Nordgren <haraldnordgren@gmail.com> a écrit :\n> \n> ﻿Hi Collin!\n> \n> Surely, \"git diff --output-indicator-old=' ' --output-indicator-new=' '\"\n> exists for a reason, to allow users to customize the workflow for\n> themselves. So this is adding a better short-hand instead of that, which\n> feels a bit clunky. Sed workaround would likely work, but nicer to have it\n> native inside git instead?\n> \n> I use Git from the CLI 99.99% of the time, and find myself often copy-\n> pasting to recover some code from and old commit, so then this helps to\n> save me pasting in and the manually removing the +/- signs. Not a huge\n> deal, but makes the awesome Git CLI even better.\n> \n> Harald\n\nI wondered why you’d be copying diffs without leading indicators; with that answered, perhaps you should try “git restore”? One benefit of version control is easily restoring other versions. "},{"id":"532550","messageId":"f141e335-9729-4f09-86b2-12a39f24837a@gmail.com","threadId":"64655","inReplyTo":"20251219114602.96489-1-haraldnordgren@gmail.com","subject":"Re: [PATCH] diff: add --no-indicators option","fromName":"Phillip Wood","fromEmail":"phillip.wood123@gmail.com","sentAt":"2025-12-19T14:27:20Z","receivedAt":"2025-12-19T14:27:26Z","isPatch":true,"sender":{"key":"phillip.wood@dunelm.org.uk","avatar":null},"body":"On 19/12/2025 11:46, Harald Nordgren wrote:\n> Hi Phillip!\n> \n> Yeah, getting rid of the extra space in the beginning would be preferable,\n> I can take a look at that assuming that this has any chance of getting merged.\n\nI can't say whether any given patch will be merged or not. All I can say \nis that if there is support for an idea on the mailing list and someone \nsubmits a sensible implementation then it is likely to be merged. If \npeople on the mailing list are generally unconvinced something is a good \nidea then it is unlikely to be merged.\n\nIf you want to restore some lines from a previous version of the file \nthen it would be worth trying out \"git restore -p\" as Ben suggested. If \nthere is some other use for this then it would be helpful to understand \na bit more about it. I'm struggling to see why it would be useful to be \nable to copy and paste a mixture of insertions and deletions without the \n'+' and '-' indicators. There was some discussion a while ago about \nbeing able to view just the new version of the file[1] would it make \nsense to just show the old or new version when the indicators are omitted?\n\nThanks\n\nPhillip\n\n[1] \nhttps://lore.kernel.org/git/CAHk-=wgh8emJn-+FtxN=m_SCPiP6cGKHU-5ozzV9tWBMxn+xcA@mail.gmail.com\n\n> Harald\n> \n\n"},{"id":"532551","messageId":"CAPx1GvdNQbHY0avQ_Gt4bkLiuNHPW80E0v1vxrwyQYDD=zpc0g@mail.gmail.com","threadId":"64655","inReplyTo":"f141e335-9729-4f09-86b2-12a39f24837a@gmail.com","subject":"Re: [PATCH] diff: add --no-indicators option","fromName":"Chris Torek","fromEmail":"chris.torek@gmail.com","sentAt":"2025-12-19T14:40:10Z","receivedAt":"2025-12-19T14:40:25Z","isPatch":true,"sender":{"key":"chris.torek@gmail.com","avatar":"https://avatars.githubusercontent.com/u/16826774?v=4"},"body":"On Fri, Dec 19, 2025 at 6:27 AM Phillip Wood <phillip.wood123@gmail.com> wrote:\n> If you want to restore some lines from a previous version of the file\n> then it would be worth trying out \"git restore -p\" as Ben suggested. If\n> there is some other use for this then it would be helpful to understand\n> a bit more about it. I'm struggling to see why it would be useful to be\n> able to copy and paste a mixture of insertions and deletions without the\n> '+' and '-' indicators. ...\n\nAs someone who makes a lot of tpyos and hsa text that\ngets duplicaged because of copypasta duplicaged because\nof copypasta errors and on on (ahem), my personal preference\ntends towards:\n\n    $ git show <rev1>:<path>  > file.oldver\n    $ git show <rev2>:<path>  > file.newver\n    $ vim file file.oldver file.newver\n\nand then cut/paste old or new parts in the editor,\nrather than with a mouse that doesn't always get\nthe proper edge points.  The ability to \"git show\"\nspecific versions of files is the key here.\n\n(The patch modes of git add/restore are good for\nsmall things.)\n\nChris\n"},{"id":"532552","messageId":"20251219145037.17880-1-haraldnordgren@gmail.com","threadId":"64655","inReplyTo":"f141e335-9729-4f09-86b2-12a39f24837a@gmail.com","subject":"Re: [PATCH] diff: add --no-indicators option","fromName":"Harald Nordgren","fromEmail":"haraldnordgren@gmail.com","sentAt":"2025-12-19T14:50:37Z","receivedAt":"2025-12-19T14:50:40Z","isPatch":true,"sender":{"key":"haraldnordgren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/9569897?v=4"},"body":"Hi Collin!\n\nThe use case for me is when working on a feature and digging through my own\ncommits to recover a code block that I previously threw away. Then I dont't\nwant to do 'git restore -p' and go through all the changes in that file.\n\nI just want to quickly pick out the thing I need, that could be e.g. this\nsnippet\n\n```\n            top={\n              spcGoalMarkerPositionStaticProps.y -\n              ARROW_SIZE / 2 +\n              ARROW_OUTWARD_OFFSET * Math.sin(arrowAngleRadians)\n            }\n            left={\n              spcGoalMarkerPositionStaticProps.x -\n              ARROW_SIZE / 2 +\n              ARROW_OUTWARD_OFFSET * Math.cos(arrowAngleRadians)\n            }\n```\n\nfrom the full diff below:\n\n```\n--- a/src/ui/components/SatietyIndicator.tsx\n+++ b/src/ui/components/SatietyIndicator.tsx\n\n   const spcGoalCompletionOuterGAnimProps = useAnimatedProps(() => {\n     return {\n-      opacity: satietyGoalScore\n+      opacity: shouldShowGoalMarker\n         ? interpolate(spcGoalMarkerOpacitySV.value, [0, 1], [1, 0])\n         : 0,\n     }\n@@ -364,7 +372,7 @@ export const SatietyIndicator: FC<Props> = ({\n\n     const centerAdjustment = -(CHECKMARK_SIZE * scale) / 2\n\n-    return satietyGoalScore\n+    return shouldShowGoalMarker\n       ? {\n           transform: [\n             {scale: scale},\n@@ -383,11 +391,19 @@ export const SatietyIndicator: FC<Props> = ({\n         {shouldShowReachHere && (\n           <AnimatedBox\n             position={'absolute'}\n-            top={spcGoalMarkerPositionStaticProps.y - 18}\n-            left={spcGoalMarkerPositionStaticProps.x - 9}\n+            top={\n+              spcGoalMarkerPositionStaticProps.y -\n+              ARROW_SIZE / 2 +\n+              ARROW_OUTWARD_OFFSET * Math.sin(arrowAngleRadians)\n+            }\n+            left={\n+              spcGoalMarkerPositionStaticProps.x -\n+              ARROW_SIZE / 2 +\n+              ARROW_OUTWARD_OFFSET * Math.cos(arrowAngleRadians)\n+            }\n             style={arrowBounceStyle}>\n             <PointerArrow\n-              size={18}\n+              size={ARROW_SIZE}\n               color={'black'}\n               angle={270 + arrowTiltDegrees}\n             />\n```\n\nI do this already, it just has the extra step of having to go through\nmanually and remove +/- characters. Since already have the red and green\ncolors to judge me, +/- doesn't help anything.\n\nI would also like to add this to 'git show'\n\nHarald\n"},{"id":"532553","messageId":"20251219145447.22234-1-haraldnordgren@gmail.com","threadId":"64655","inReplyTo":"CAPx1GvdNQbHY0avQ_Gt4bkLiuNHPW80E0v1vxrwyQYDD=zpc0g@mail.gmail.com","subject":"Re: [PATCH] diff: add --no-indicators option","fromName":"Harald Nordgren","fromEmail":"haraldnordgren@gmail.com","sentAt":"2025-12-19T14:54:47Z","receivedAt":"2025-12-19T14:54:50Z","isPatch":true,"sender":{"key":"haraldnordgren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/9569897?v=4"},"body":"Hi Chris!\n\nThanks for the idea, but that doesn't seem fast at all 😅\n"},{"id":"532555","messageId":"CAPx1Gvcc6P08F=HiqWOMcWjGtv1TsqeS3aR=GtzVxpMBzorqFw@mail.gmail.com","threadId":"64655","inReplyTo":"20251219145447.22234-1-haraldnordgren@gmail.com","subject":"Re: [PATCH] diff: add --no-indicators option","fromName":"Chris Torek","fromEmail":"chris.torek@gmail.com","sentAt":"2025-12-19T15:02:50Z","receivedAt":"2025-12-19T15:03:03Z","isPatch":true,"sender":{"key":"chris.torek@gmail.com","avatar":"https://avatars.githubusercontent.com/u/16826774?v=4"},"body":"On Fri, Dec 19, 2025 at 6:54 AM Harald Nordgren\n<haraldnordgren@gmail.com> wrote:\n> Hi Chris!\n>\n> Thanks for the idea, but that doesn't seem fast at all 😅\n\nIt's terrifically easy to script. Instead of:\n\n    git show $rev -- $path\n\nyou need:\n\n    git show ${rev}^:$path >$path.old\n    git show ${rev}:$path >$path.new\n\nwhich in sh/bash is (you can fancy this up some):\n\n    rev=$(git rev-parse \"$1\") || exit\n    path=$2\n\nfollowed by the two \"git show\" commands. Using ${rev}^ gets\nyou the raw hash ID of the specified revision followed by the\ncaret / hat suffix, which means \"parent of the given rev\", so\nall you need to specify to the mini-script is the same rev you'd\npass to \"git show\" and the path name.\n\n(I don't need this often enough to bother with the script,\nI just type in the commands.)\n\nChris\n"},{"id":"532557","messageId":"20251219152335.28448-1-haraldnordgren@gmail.com","threadId":"64655","inReplyTo":"CAPx1Gvcc6P08F=HiqWOMcWjGtv1TsqeS3aR=GtzVxpMBzorqFw@mail.gmail.com","subject":"Re: [PATCH] diff: add --no-indicators option","fromName":"Harald Nordgren","fromEmail":"haraldnordgren@gmail.com","sentAt":"2025-12-19T15:23:35Z","receivedAt":"2025-12-19T15:23:38Z","isPatch":true,"sender":{"key":"haraldnordgren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/9569897?v=4"},"body":"Hi Chris!\n\nThanks! I get that we can wrap things in scripts, but I find that it\ndoesn't help when working with a team. Other people don't like\nhomemade bash scripts.\n\nIt's much easier to convince someone to use a feaute when it's built-\ninto git itself. Just my experience.\n\nHarald\n"},{"id":"532564","messageId":"20251219185342.35056-1-haraldnordgren@gmail.com","threadId":"64655","inReplyTo":"7B631B32-22B7-443C-8D1A-D05FF93F55C2@gmail.com","subject":"Re: [PATCH] diff: add --no-indicators option","fromName":"Harald Nordgren","fromEmail":"haraldnordgren@gmail.com","sentAt":"2025-12-19T18:53:42Z","receivedAt":"2025-12-19T18:53:45Z","isPatch":true,"sender":{"key":"haraldnordgren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/9569897?v=4"},"body":"Hi Ben!\n\nHere is the use can when it would be useful: https://lore.kernel.org/git/20251219145037.17880-1-haraldnordgren@gmail.com/\n\nYou don't need to tell me about the benefits of version control 😬\n\nHarald\n"},{"id":"532569","messageId":"20251219190828.50839-1-haraldnordgren@gmail.com","threadId":"64655","inReplyTo":"xmqq8qeywuno.fsf@gitster.g","subject":"Re: [PATCH] diff: add --no-indicators option","fromName":"Harald Nordgren","fromEmail":"haraldnordgren@gmail.com","sentAt":"2025-12-19T19:08:28Z","receivedAt":"2025-12-19T19:08:31Z","isPatch":true,"sender":{"key":"haraldnordgren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/9569897?v=4"},"body":"Hi Mr. Hamano!\n\nHere is my classic use-case: https://lore.kernel.org/git/20251219145037.17880-1-haraldnordgren@gmail.com/\n\nI have auto-formatting set up for all the projects I work on in my daily work (Golang and TypeScript) so leading spaces do get removed automatically. But I agree with your general point, I can take a look at removing the leading column for this patch, it makes the code nicer of course! As you know, the current implementations of 'output-indicator-*' don't support empty string, so a little bit of extra work is needed for that.\n\nRegarding \"cutting from Nth column\", I use macOS with iTerm 2 and I'm not sure if that functionality exists there. It's of course possible for me to keep copy-pasting the whole blob and removing the +/- signs manually or via some scripts, but seems like a lost oppornunity to not handle this from git?\n\nMaybe I missed your point about GNU or BSD, could you explain more about that?\n\nHarald\n"},{"id":"532574","messageId":"xmqqzf7du1ut.fsf@gitster.g","threadId":"64655","inReplyTo":"20251219190828.50839-1-haraldnordgren@gmail.com","subject":"Re: [PATCH] diff: add --no-indicators option","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-12-20T06:03:06Z","receivedAt":"2025-12-20T06:03:08Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Harald Nordgren <haraldnordgren@gmail.com> writes:\n\n> Maybe I missed your point about GNU or BSD, could you explain more about that?\n\nWhen I talk/think about what \"git diff\" should and should not do, I\nremind myself that not many things under the sun are truly novel.\nAfter all, long before Git was invented, people had used \"diff\" to\ncompare old and new versions of the same thing to extract the\ndifferences.  When proposing a new feature X in \"git diff\", it would\nsupport the idea very well if these implementations of \"diff\" that\nway predates Git itself has a simliar feature already.  On the other\nhand, if the vanilla \"diff\" used outside the context of Git lack\nsuch feature X, it is more likely that X is an ill-thought-out\nmisfeature that they didn't want, than people who have been working\non these implementations of \"diff\" (not \"git diff\", but GNU or BSD\nor others) were dumb enough that they did not think of the feature X\nthemselves.\n\nThat was why I asked if there are precedents, either in GNU or BSD\nimplementations of \"diff\".\n"},{"id":"532594","messageId":"20251220105222.47651-1-haraldnordgren@gmail.com","threadId":"64655","inReplyTo":"xmqqzf7du1ut.fsf@gitster.g","subject":"Re: [PATCH] diff: add --no-indicators option","fromName":"Harald Nordgren","fromEmail":"haraldnordgren@gmail.com","sentAt":"2025-12-20T10:52:22Z","receivedAt":"2025-12-20T10:52:25Z","isPatch":true,"sender":{"key":"haraldnordgren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/9569897?v=4"},"body":"> That was why I asked if there are precedents, either in GNU or BSD implementations of \"diff\".\n\nHi Junio!\n\nGot it! I did some research and it seems GNU diff has features for this and BSD diff is more barebones.\n\nGNU diff has the option to turn off +/- indicators with `--line-format='%L'`, however it also turns of colors even if supplying `--color=always`. Git doesn't have this option yet, so maybe it's time to implement it, but be a bit smarter so colors are shown its a TTY?\n\n\nHarald\n"},{"id":"532595","messageId":"a8cc6a07-9b63-46e8-936a-4aefeb0a1311@kdbg.org","threadId":"64655","inReplyTo":"20251219145037.17880-1-haraldnordgren@gmail.com","subject":"Re: [PATCH] diff: add --no-indicators option","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2025-12-20T13:14:48Z","receivedAt":"2025-12-20T13:15:01Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Am 19.12.25 um 15:50 schrieb Harald Nordgren:\n> Hi Collin!\n> \n> The use case for me is when working on a feature and digging through my own\n> commits to recover a code block that I previously threw away. Then I dont't\n> want to do 'git restore -p' and go through all the changes in that file.\n> \n> I just want to quickly pick out the thing I need, that could be e.g. this\n> snippet\n> \n> ```\n>             top={\n>               spcGoalMarkerPositionStaticProps.y -\n>               ARROW_SIZE / 2 +\n>               ARROW_OUTWARD_OFFSET * Math.sin(arrowAngleRadians)\n>             }\n>             left={\n>               spcGoalMarkerPositionStaticProps.x -\n>               ARROW_SIZE / 2 +\n>               ARROW_OUTWARD_OFFSET * Math.cos(arrowAngleRadians)\n>             }\n> ```\n> \n> from the full diff below:\n> \n> ```\n> --- a/src/ui/components/SatietyIndicator.tsx\n> +++ b/src/ui/components/SatietyIndicator.tsx\n> \n>    const spcGoalCompletionOuterGAnimProps = useAnimatedProps(() => {\n>      return {\n> -      opacity: satietyGoalScore\n> +      opacity: shouldShowGoalMarker\n>          ? interpolate(spcGoalMarkerOpacitySV.value, [0, 1], [1, 0])\n>          : 0,\n>      }\n> @@ -364,7 +372,7 @@ export const SatietyIndicator: FC<Props> = ({\n> \n>      const centerAdjustment = -(CHECKMARK_SIZE * scale) / 2\n> \n> -    return satietyGoalScore\n> +    return shouldShowGoalMarker\n>        ? {\n>            transform: [\n>              {scale: scale},\n> @@ -383,11 +391,19 @@ export const SatietyIndicator: FC<Props> = ({\n>          {shouldShowReachHere && (\n>            <AnimatedBox\n>              position={'absolute'}\n> -            top={spcGoalMarkerPositionStaticProps.y - 18}\n> -            left={spcGoalMarkerPositionStaticProps.x - 9}\n> +            top={\n> +              spcGoalMarkerPositionStaticProps.y -\n> +              ARROW_SIZE / 2 +\n> +              ARROW_OUTWARD_OFFSET * Math.sin(arrowAngleRadians)\n> +            }\n> +            left={\n> +              spcGoalMarkerPositionStaticProps.x -\n> +              ARROW_SIZE / 2 +\n> +              ARROW_OUTWARD_OFFSET * Math.cos(arrowAngleRadians)\n> +            }\n>              style={arrowBounceStyle}>\n>              <PointerArrow\n> -              size={18}\n> +              size={ARROW_SIZE}\n>                color={'black'}\n>                angle={270 + arrowTiltDegrees}\n>              />\n> ```\n> \n> I do this already, it just has the extra step of having to go through\n> manually and remove +/- characters. Since already have the red and green\n> colors to judge me, +/- doesn't help anything.\n> \n> I would also like to add this to 'git show'\nI think you are looking for `git difftool`. For me, on Linux it uses\nmeld, on Windows, I've configured it to use WinMerge. With both it is\nvery easy to move hunks or even just individual lines between versions.\n\n-- Hannes\n\n"}]}