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