public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Harald Nordgren <haraldnordgren@gmail•com>
To: phillip.wood123@gmail•com
Cc: collin.funk1@gmail•com, git@vger•kernel.org,
	gitgitgadget@gmail•com, haraldnordgren@gmail•com,
	phillip.wood@dunelm•org.uk
Subject: Re: [PATCH] diff: add --no-indicators option
Date: Fri, 19 Dec 2025 15:50:37 +0100	[thread overview]
Message-ID: <20251219145037.17880-1-haraldnordgren@gmail.com> (raw)
In-Reply-To: <f141e335-9729-4f09-86b2-12a39f24837a@gmail.com>

Hi Collin!

The use case for me is when working on a feature and digging through my own
commits to recover a code block that I previously threw away. Then I dont't
want to do 'git restore -p' and go through all the changes in that file.

I just want to quickly pick out the thing I need, that could be e.g. this
snippet

```
            top={
              spcGoalMarkerPositionStaticProps.y -
              ARROW_SIZE / 2 +
              ARROW_OUTWARD_OFFSET * Math.sin(arrowAngleRadians)
            }
            left={
              spcGoalMarkerPositionStaticProps.x -
              ARROW_SIZE / 2 +
              ARROW_OUTWARD_OFFSET * Math.cos(arrowAngleRadians)
            }
```

from the full diff below:

```
--- a/src/ui/components/SatietyIndicator.tsx
+++ b/src/ui/components/SatietyIndicator.tsx

   const spcGoalCompletionOuterGAnimProps = useAnimatedProps(() => {
     return {
-      opacity: satietyGoalScore
+      opacity: shouldShowGoalMarker
         ? interpolate(spcGoalMarkerOpacitySV.value, [0, 1], [1, 0])
         : 0,
     }
@@ -364,7 +372,7 @@ export const SatietyIndicator: FC<Props> = ({

     const centerAdjustment = -(CHECKMARK_SIZE * scale) / 2

-    return satietyGoalScore
+    return shouldShowGoalMarker
       ? {
           transform: [
             {scale: scale},
@@ -383,11 +391,19 @@ export const SatietyIndicator: FC<Props> = ({
         {shouldShowReachHere && (
           <AnimatedBox
             position={'absolute'}
-            top={spcGoalMarkerPositionStaticProps.y - 18}
-            left={spcGoalMarkerPositionStaticProps.x - 9}
+            top={
+              spcGoalMarkerPositionStaticProps.y -
+              ARROW_SIZE / 2 +
+              ARROW_OUTWARD_OFFSET * Math.sin(arrowAngleRadians)
+            }
+            left={
+              spcGoalMarkerPositionStaticProps.x -
+              ARROW_SIZE / 2 +
+              ARROW_OUTWARD_OFFSET * Math.cos(arrowAngleRadians)
+            }
             style={arrowBounceStyle}>
             <PointerArrow
-              size={18}
+              size={ARROW_SIZE}
               color={'black'}
               angle={270 + arrowTiltDegrees}
             />
```

I do this already, it just has the extra step of having to go through
manually and remove +/- characters. Since already have the red and green
colors to judge me, +/- doesn't help anything.

I would also like to add this to 'git show'

Harald

  parent reply	other threads:[~2025-12-19 14:50 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-19  8:17 [PATCH] diff: add --no-indicators option Harald Nordgren via GitGitGadget
2025-12-19  8:57 ` Collin Funk
2025-12-19 11:48   ` Harald Nordgren
2025-12-19 13:28     ` Ben Knoble
2025-12-19 18:53       ` Harald Nordgren
2025-12-19 10:33 ` Phillip Wood
2025-12-19 11:46   ` Harald Nordgren
2025-12-19 14:27     ` Phillip Wood
2025-12-19 14:40       ` Chris Torek
2025-12-19 14:54         ` Harald Nordgren
2025-12-19 15:02           ` Chris Torek
2025-12-19 15:23             ` Harald Nordgren
2025-12-19 14:50       ` Harald Nordgren [this message]
2025-12-20 13:14         ` Johannes Sixt
2025-12-19 11:58 ` Junio C Hamano
2025-12-19 19:08   ` Harald Nordgren
2025-12-20  6:03     ` Junio C Hamano
2025-12-20 10:52       ` Harald Nordgren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251219145037.17880-1-haraldnordgren@gmail.com \
    --to=haraldnordgren@gmail$(echo .)com \
    --cc=collin.funk1@gmail$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=gitgitgadget@gmail$(echo .)com \
    --cc=phillip.wood123@gmail$(echo .)com \
    --cc=phillip.wood@dunelm$(echo .)org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox