public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Johannes Sixt <j6t@kdbg•org>
To: Harald Nordgren <haraldnordgren@gmail•com>
Cc: collin.funk1@gmail•com, git@vger•kernel.org,
	gitgitgadget@gmail•com, phillip.wood@dunelm•org.uk,
	phillip.wood123@gmail•com
Subject: Re: [PATCH] diff: add --no-indicators option
Date: Sat, 20 Dec 2025 14:14:48 +0100	[thread overview]
Message-ID: <a8cc6a07-9b63-46e8-936a-4aefeb0a1311@kdbg.org> (raw)
In-Reply-To: <20251219145037.17880-1-haraldnordgren@gmail.com>

Am 19.12.25 um 15:50 schrieb Harald Nordgren:
> 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'
I think you are looking for `git difftool`. For me, on Linux it uses
meld, on Windows, I've configured it to use WinMerge. With both it is
very easy to move hunks or even just individual lines between versions.

-- Hannes


  reply	other threads:[~2025-12-20 13:15 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
2025-12-20 13:14         ` Johannes Sixt [this message]
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=a8cc6a07-9b63-46e8-936a-4aefeb0a1311@kdbg.org \
    --to=j6t@kdbg$(echo .)org \
    --cc=collin.funk1@gmail$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=gitgitgadget@gmail$(echo .)com \
    --cc=haraldnordgren@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