Skip to content

Fix multiline context showing file start and end - #709

Open
vulragrag-star wants to merge 1 commit into
homeport:mainfrom
vulragrag-star:fix/issue-686-multiline-context-bookends
Open

vulragrag-star wants to merge 1 commit into
homeport:mainfrom
vulragrag-star:fix/issue-686-multiline-context-bookends

Conversation

@vulragrag-star

Copy link
Copy Markdown

--multi-line-context-lines is meant to keep context around each change in a multiline value. For leading and trailing equal hunks it also printed the beginning and end of the file.

Only keep the context adjacent to actual inserts/deletes. Equal hunks between changes still show both ends with the unchanged summary.

Example with --multi-line-context-lines 2:

Before:

  image:
    registry: custom-registry

  [two lines unchanged)]

  autoscaling:
    enabled: true
-   minReplicas: 2
+   minReplicas: 3
    maxReplicas: 10
    metrics: {}

  [two lines unchanged)]

      cpu: 100m
  priorityClassName: my-priority

After:

  autoscaling:
    enabled: true
-   minReplicas: 2
+   minReplicas: 3
    maxReplicas: 10
    metrics: {}

Fixes #686

Test plan

`--multi-line-context-lines` is meant to keep context around each
change. For leading and trailing equal hunks it also printed the
beginning and end of the multiline value.

Only keep the context adjacent to actual inserts/deletes; equal hunks
between changes still show both ends with the unchanged summary.

Fixes homeport#686
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

--multi-line-context-lines adds unneeded beginning and end of file

1 participant