Correct gocui link#2
Merged
Merged
Conversation
Owner
|
nice, thanks :) |
jesseduffield
pushed a commit
that referenced
this pull request
Aug 16, 2018
Updated to latest master
abid-mujtaba
pushed a commit
to abid-mujtaba/lazygit
that referenced
this pull request
Mar 23, 2022
Refactor unit tests to DRY
jesseduffield
pushed a commit
that referenced
this pull request
Sep 10, 2023
Add co-author to commits Add addCoAuthor command for commits - Implement the `addCoAuthor` command to add co-authors to commits. - Utilize suggestions helpers to populate author names from the suggestions list. - Added command to gui at `LocalCommitsController`. This commit introduces the `addCoAuthor` command, which allows users to easily add co-authors to their commits. The co-author names are populated from the suggestions list, minimizing the chances of user input errors. The co-authors are added using the Co-authored-by metadata format recognized by GitHub and GitLab.
jesseduffield
added a commit
that referenced
this pull request
May 19, 2024
jesseduffield
added a commit
that referenced
this pull request
May 19, 2024
jesseduffield
added a commit
that referenced
this pull request
May 19, 2024
…3572) - **PR Description** First attempt didn't work. Let's try this one, based on https://github.com/orgs/community/discussions/25217 <img width="910" alt="image" src="/asset?url=https%3A%2F%2Fgithub.com%2Fjesseduffield%2Flazygit%2Fpull%2F%253Ca%2520href%3D"/browse?url=https%3A%2F%2Fgithub.com%2Fjesseduffield%2Flazygit%2Fassets%2F8456633%2Ffa2e82b0-db34-486b-8bea-ec3807d10a33">https://github.com/jesseduffield/lazygit/assets/8456633/fa2e82b0-db34-486b-8bea-ec3807d10a33"> - **Please check if the PR fulfills these requirements** * [ ] Cheatsheets are up-to-date (run `go generate ./...`) * [ ] Code has been formatted (see [here](https://github.com/jesseduffield/lazygit/blob/master/CONTRIBUTING.md#code-formatting)) * [ ] Tests have been added/updated (see [here](https://github.com/jesseduffield/lazygit/blob/master/pkg/integration/README.md) for the integration test guide) * [ ] Text is internationalised (see [here](https://github.com/jesseduffield/lazygit/blob/master/CONTRIBUTING.md#internationalisation)) * [ ] Docs (specifically `docs/Config.md`) have been updated if necessary * [ ] You've read through your own file changes for silly mistakes etc <!-- Be sure to name your PR with an imperative e.g. 'Add worktrees view' see https://github.com/jesseduffield/lazygit/releases/tag/v0.40.0 for examples -->
stefanhaller
added a commit
that referenced
this pull request
Jun 28, 2026
…seam The focused main view's click/enter/e/G handlers all need the same thing: given a rendered diff row, the patch-space line it corresponds to. Until now that came solely from delta's lazygit-edit:// hyperlinks, which only carry a path and a single line number — no side. That's lossy: for a deletion the number is the old line, but the consumers fed it into new-file lookups, and two consecutive deletions (which share a new-file line number) couldn't be told apart at all. Replace GetFileAndLineForClickedDiffLine with GetDiffLineInfo, returning the fuller (file, type, new-line, old-line) record from diff-line-metadata-notes.md. This is mechanism #1: parse the decolorized view buffer — walk up to the file's "diff --git" section, reuse patch.Parse on it (splitting multi-file commit diffs on the "diff --git" boundaries), and read the type and line numbers off the patch arithmetic. It serves the structure-preserving renderings — no pager, git diff --color, and delta --color-only without line numbers — with no external dependency. To avoid trusting a mis-parse, the parser bails when a hunk's body no longer matches its header (Patch.IsWellFormed). That's what happens when a pager keeps the diff/hunk headers but restructures the body: delta's line-number gutters push the +/- marker off the start of each line, so every body line reads as context. Such renderings fall through to the next backend rather than yielding a confident wrong answer. (diff-so-fancy goes further and rewrites the headers too, so it fails even earlier, on the missing "diff --git".) GetDiffLineInfo is a seam with swappable backends: the buffer parser first, then the old hyperlink reader as a fallback for renderings the parser can't handle (delta's default mode, or delta with line-number gutters). The future #2 OSC per-cell metadata reader plugs in ahead of both, behind the same record shape. Wire the consumers to the record per that doc's field mapping: - dive into staging/patch building lands on the exact patch line, looking a deletion up by its old-file line number (PatchLineForOldLineNumber) so the two-deletions case resolves correctly; - `e` edits at the new-file line; - `G` anchors the PR link on the left (old) side for a deletion, the right (new) side otherwise. The hyperlink fallback can't convey the side, so it reports DiffLineOther, which the consumers treat as a non-deletion — i.e. exactly today's behavior. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
stefanhaller
added a commit
that referenced
this pull request
Jun 28, 2026
…om verification Record what the #1 prototype settled. The two open questions #1 touches are now answered (the deleted-line new-line convention is patch.LineNumberOfLine's, and a deletion carries both line numbers; multi-file diffs split on "diff --git" and the section parses 1:1 with patch.Parse). Add a §8 capturing what landed, how it was verified, and the implications for #2. Two coverage corrections came out of verifying against real pager output, both worth pinning before the spec is written: delta --color-only qualifies for #1 only *without* line numbers (the gutter pushes the +/- marker off column 0, so a naive parse is confidently wrong — handled by an integrity check that falls back, not by teaching the host delta's gutter), and diff-so-fancy strips the +/- markers entirely, so it's a #2 case, not #1. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
stefanhaller
added a commit
that referenced
this pull request
Jun 28, 2026
Mechanism #2's emitter side is now prototyped on this branch (delta, normal unified mode only) and the bytes are verified. Capture what that settled, since the spec is meant to be published for pager-developer feedback: - The single per-line emit point in delta and which fields are reachable there (the gotcha: delta only maintains its line-number counters with --line-numbers on, so the patch tracks its own), and why a dedicated additive emitter beats reusing LineNumbersData. - The pinned v1 wire format (positional, file last so it may contain ';', empty old-line unless deleted) and the EMIT_OSC456_METADATA env-var handshake. - Deferred items: the OSC-number terminal audit, wrapped continuation rows, and header-row attachments. Also resolves the §6 wire-format open question accordingly. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
stefanhaller
added a commit
that referenced
this pull request
Jun 28, 2026
… backend Add mechanism #2 to GetDiffLineInfo: when a patched pager annotated each diff line with OSC 456 metadata, read it back as the first backend, ahead of the buffer parser (#1) and the lazygit-edit hyperlink. It is strictly higher fidelity -- it carries the side explicitly, so it serves the renderings #1 cannot parse (delta's default mode, --line-numbers, diff-so-fancy) and conveys deletions, which the hyperlink can't. The host advertises the protocol versions it understands by setting EMIT_OSC456_METADATA on the pager subprocess; a pager that doesn't understand it ignores the variable, so this is safe to set unconditionally. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
stefanhaller
added a commit
that referenced
this pull request
Jun 28, 2026
The emitter (delta), carrier (gocui per-cell attachment), and consumer (the GetDiffLineInfo metadata backend + env-var handshake) are now built for the normal unified case and verified end-to-end — including in the running app with delta's default mode, where clicking/enter/e/G resolve via #2 and deletions get the correct side. Update §9 from "in progress" to a "built & verified" record (what was built, how it was verified) mirroring §8 for #1, and mark the build order (§7) accordingly. The remaining step-5 deliverables — finalizing/publishing the spec and the production plan — and side-by-side/difftastic are still open. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
stefanhaller
added a commit
that referenced
this pull request
Jun 28, 2026
The OSC-metadata prototype now extends to difftastic (the categorical #2-only pager), checked out at /Users/stk/Stk/Dev/Builds/difftastic. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
stefanhaller
added a commit
that referenced
this pull request
Jun 28, 2026
Record the third pager emitter (diff-so-fancy, commit c397cd6 on its prototype-osc-metadata branch): the simplest of the three -- a line-oriented Perl filter, unified single-column only, the same #2 category as delta's default. Captures the diff-so-fancy-specific findings: sanitize_display strips OSC so the record is prepended not embedded; the path is derived from $file_1/$file_2 (not $last_file_seen, which is empty for a noprefix deletion); combined diffs skipped; counters are file-scope globals so a chunk-spanning hunk keeps counting; classification mirrors strip_leading_indicators so the no-newline marker is correctly skipped. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
stefanhaller
added a commit
that referenced
this pull request
Jun 28, 2026
§10 now lists diff-so-fancy alongside delta and difftastic: the same #2 case as delta's default (strips +/- markers, conveys side by color) but a line-oriented Perl filter, unified-only, and -- the one wrinkle worth stating in the spec -- it strips terminal escapes from its content, so the record is prepended to the line rather than embedded. Fix the now-stale "all three"/"both pagers" counts. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
stefanhaller
added a commit
that referenced
this pull request
Jun 30, 2026
…seam The focused main view's click/enter/e/G handlers all need the same thing: given a rendered diff row, the patch-space line it corresponds to. Until now that came solely from delta's lazygit-edit:// hyperlinks, which only carry a path and a single line number — no side. That's lossy: for a deletion the number is the old line, but the consumers fed it into new-file lookups, and two consecutive deletions (which share a new-file line number) couldn't be told apart at all. Replace GetFileAndLineForClickedDiffLine with GetDiffLineInfo, returning the fuller (file, type, new-line, old-line) record from diff-line-metadata-notes.md. This is mechanism #1: parse the decolorized view buffer — walk up to the file's "diff --git" section, reuse patch.Parse on it (splitting multi-file commit diffs on the "diff --git" boundaries), and read the type and line numbers off the patch arithmetic. It serves the structure-preserving renderings — no pager, git diff --color, and delta --color-only without line numbers — with no external dependency. To avoid trusting a mis-parse, the parser bails when a hunk's body no longer matches its header (Patch.IsWellFormed). That's what happens when a pager keeps the diff/hunk headers but restructures the body: delta's line-number gutters push the +/- marker off the start of each line, so every body line reads as context. Such renderings fall through to the next backend rather than yielding a confident wrong answer. (diff-so-fancy goes further and rewrites the headers too, so it fails even earlier, on the missing "diff --git".) GetDiffLineInfo is a seam with swappable backends: the buffer parser first, then the old hyperlink reader as a fallback for renderings the parser can't handle (delta's default mode, or delta with line-number gutters). The future #2 OSC per-cell metadata reader plugs in ahead of both, behind the same record shape. Wire the consumers to the record per that doc's field mapping: - dive into staging/patch building lands on the exact patch line, looking a deletion up by its old-file line number (PatchLineForOldLineNumber) so the two-deletions case resolves correctly; - `e` edits at the new-file line; - `G` anchors the PR link on the left (old) side for a deletion, the right (new) side otherwise. The hyperlink fallback can't convey the side, so it reports DiffLineOther, which the consumers treat as a non-deletion — i.e. exactly today's behavior. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
stefanhaller
added a commit
that referenced
this pull request
Jun 30, 2026
…om verification Record what the #1 prototype settled. The two open questions #1 touches are now answered (the deleted-line new-line convention is patch.LineNumberOfLine's, and a deletion carries both line numbers; multi-file diffs split on "diff --git" and the section parses 1:1 with patch.Parse). Add a §8 capturing what landed, how it was verified, and the implications for #2. Two coverage corrections came out of verifying against real pager output, both worth pinning before the spec is written: delta --color-only qualifies for #1 only *without* line numbers (the gutter pushes the +/- marker off column 0, so a naive parse is confidently wrong — handled by an integrity check that falls back, not by teaching the host delta's gutter), and diff-so-fancy strips the +/- markers entirely, so it's a #2 case, not #1. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
stefanhaller
added a commit
that referenced
this pull request
Jun 30, 2026
Mechanism #2's emitter side is now prototyped on this branch (delta, normal unified mode only) and the bytes are verified. Capture what that settled, since the spec is meant to be published for pager-developer feedback: - The single per-line emit point in delta and which fields are reachable there (the gotcha: delta only maintains its line-number counters with --line-numbers on, so the patch tracks its own), and why a dedicated additive emitter beats reusing LineNumbersData. - The pinned v1 wire format (positional, file last so it may contain ';', empty old-line unless deleted) and the EMIT_OSC456_METADATA env-var handshake. - Deferred items: the OSC-number terminal audit, wrapped continuation rows, and header-row attachments. Also resolves the §6 wire-format open question accordingly. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
stefanhaller
added a commit
that referenced
this pull request
Jun 30, 2026
… backend Add mechanism #2 to GetDiffLineInfo: when a patched pager annotated each diff line with OSC 456 metadata, read it back as the first backend, ahead of the buffer parser (#1) and the lazygit-edit hyperlink. It is strictly higher fidelity -- it carries the side explicitly, so it serves the renderings #1 cannot parse (delta's default mode, --line-numbers, diff-so-fancy) and conveys deletions, which the hyperlink can't. The host advertises the protocol versions it understands by setting EMIT_OSC456_METADATA on the pager subprocess; a pager that doesn't understand it ignores the variable, so this is safe to set unconditionally. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
stefanhaller
added a commit
that referenced
this pull request
Jun 30, 2026
The emitter (delta), carrier (gocui per-cell attachment), and consumer (the GetDiffLineInfo metadata backend + env-var handshake) are now built for the normal unified case and verified end-to-end — including in the running app with delta's default mode, where clicking/enter/e/G resolve via #2 and deletions get the correct side. Update §9 from "in progress" to a "built & verified" record (what was built, how it was verified) mirroring §8 for #1, and mark the build order (§7) accordingly. The remaining step-5 deliverables — finalizing/publishing the spec and the production plan — and side-by-side/difftastic are still open. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
stefanhaller
added a commit
that referenced
this pull request
Jun 30, 2026
The OSC-metadata prototype now extends to difftastic (the categorical #2-only pager), checked out at /Users/stk/Stk/Dev/Builds/difftastic. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
stefanhaller
added a commit
that referenced
this pull request
Jun 30, 2026
Record the third pager emitter (diff-so-fancy, commit c397cd6 on its prototype-osc-metadata branch): the simplest of the three -- a line-oriented Perl filter, unified single-column only, the same #2 category as delta's default. Captures the diff-so-fancy-specific findings: sanitize_display strips OSC so the record is prepended not embedded; the path is derived from $file_1/$file_2 (not $last_file_seen, which is empty for a noprefix deletion); combined diffs skipped; counters are file-scope globals so a chunk-spanning hunk keeps counting; classification mirrors strip_leading_indicators so the no-newline marker is correctly skipped. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
stefanhaller
added a commit
that referenced
this pull request
Jun 30, 2026
§10 now lists diff-so-fancy alongside delta and difftastic: the same #2 case as delta's default (strips +/- markers, conveys side by color) but a line-oriented Perl filter, unified-only, and -- the one wrinkle worth stating in the spec -- it strips terminal escapes from its content, so the record is prepended to the line rather than embedded. Fix the now-stale "all three"/"both pagers" counts. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Readme had a placeholder url in the gocui link