git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] diff: add --no-indicators option

From
Johannes Sixt <j6t@kdbg.org>
Date
Dec 20, 2025, 13:14 UTC
Message-ID
<a8cc6a07-9b63-46e8-936a-4aefeb0a1311@kdbg.org>
In-Reply-To
<20251219145037.17880-1-haraldnordgren@gmail.com>
Am 19.12.25 um 15:50 schrieb Harald Nordgren:
Show 74 quoted lines
> 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
Previous: Harald NordgrenNext: Junio C Hamano
Message 14 of 18 in “diff: add --no-indicators option”
  1. diff: add --no-indicators optionHarald Nordgren via GitGitGadget, Dec 19, 2025
  2. Collin FunkDec 19, 2025
  3. Harald NordgrenDec 19, 2025
  4. Ben KnobleDec 19, 2025
  5. Harald NordgrenDec 19, 2025
  6. Phillip WoodDec 19, 2025
  7. Harald NordgrenDec 19, 2025
  8. Phillip WoodDec 19, 2025
  9. Chris TorekDec 19, 2025
  10. Harald NordgrenDec 19, 2025
  11. Chris TorekDec 19, 2025
  12. Harald NordgrenDec 19, 2025
  13. Harald NordgrenDec 19, 2025
  14. Johannes SixtDec 20, 2025
  15. Junio C HamanoDec 19, 2025
  16. Harald NordgrenDec 19, 2025
  17. Junio C HamanoDec 20, 2025
  18. Harald NordgrenDec 20, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.