{"record":{"id":"c89033fa6861bd16","repo":"jesseduffield/lazygit","slug":"no-changed-files","errorCode":null,"errorMessage":"No changed files","messagePattern":"No changed files","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"pkg/gui/controllers/helpers/fixup_helper.go","lineNumber":64,"sourceCode":"\tdiff, hasStagedChanges, err := self.getDiff()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tdeletedLineHunks, addedLineHunks := parseDiff(diff)\n\n\tcommits := self.c.Model().Commits\n\n\tvar hashes []string\n\twarnAboutAddedLines := false\n\n\tif len(deletedLineHunks) > 0 {\n\t\thashes, err = self.blameDeletedLines(deletedLineHunks)\n\t\twarnAboutAddedLines = len(addedLineHunks) > 0\n\t} else if len(addedLineHunks) > 0 {\n\t\thashes, err = self.blameAddedLines(commits, addedLineHunks)\n\t} else {\n\t\treturn errors.New(self.c.Tr.NoChangedFiles)\n\t}\n\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif len(hashes) == 0 {\n\t\t// This should never happen\n\t\treturn errors.New(self.c.Tr.NoBaseCommitsFound)\n\t}\n\n\t// If a commit can't be found, and the last known commit is already merged,\n\t// we know that the commit we're looking for is also merged. Otherwise we\n\t// can't tell.\n\tnotFoundMeansMerged := len(commits) > 0 && commits[len(commits)-1].Status == models.StatusMerged\n\n\tconst (\n\t\tMERGED int = iota","sourceCodeStart":46,"sourceCodeEnd":82,"githubUrl":"https://github.com/jesseduffield/lazygit/blob/c477a2959b229fbf3284be0d4d2904ab61ec3c94/pkg/gui/controllers/helpers/fixup_helper.go#L46-L82","documentation":"Returned by FixupHelper when the fixup ('shift-F') command finds neither added nor deleted line hunks in the current selection/patch, i.e. there is no change to attribute to a base commit. The helper blames added lines' preceding context and deleted lines' content to find which commit last touched them; with zero hunks in both buckets there is nothing to blame.","triggerScenarios":"Invoking the fixup/suggest-fixup keybinding when the staged/unstaged diff contains no selected lines — e.g. the file has no modifications left, the selection covers only context lines, or the hunk extraction filtered everything out.","commonSituations":"Pressing shift-F after already committing or discarding the change; stale Files panel where the model still lists a file whose diff is now empty; selecting blank/context-only lines in the main view.","solutions":["Verify there is an actual uncommitted change (Files panel shows M/A/D status) before invoking fixup.","Re-select the changed lines in the main diff view and re-run the command.","Refresh the view (r) if the diff may be stale, then retry."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// before fixup: ensure hunks exist\nif len(addedLineHunks) == 0 && len(deletedLineHunks) == 0 {\n    // nothing to attribute; skip the command entirely\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Refresh (r) before fixup if the diff might be stale","Only invoke fixup with changed lines actually selected"],"tags":["git","fixup","blame","diff","validation"],"backgroundTag":null,"analyzedSha":"c477a2959b229fbf3284be0d4d2904ab61ec3c94","analyzedAt":"2026-08-15T08:34:32.451Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}