jesseduffield/lazygit · warning

No changed files

Error message

No changed files

What it means

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.

Source

Thrown at pkg/gui/controllers/helpers/fixup_helper.go:64

	diff, hasStagedChanges, err := self.getDiff()
	if err != nil {
		return err
	}

	deletedLineHunks, addedLineHunks := parseDiff(diff)

	commits := self.c.Model().Commits

	var hashes []string
	warnAboutAddedLines := false

	if len(deletedLineHunks) > 0 {
		hashes, err = self.blameDeletedLines(deletedLineHunks)
		warnAboutAddedLines = len(addedLineHunks) > 0
	} else if len(addedLineHunks) > 0 {
		hashes, err = self.blameAddedLines(commits, addedLineHunks)
	} else {
		return errors.New(self.c.Tr.NoChangedFiles)
	}

	if err != nil {
		return err
	}

	if len(hashes) == 0 {
		// This should never happen
		return errors.New(self.c.Tr.NoBaseCommitsFound)
	}

	// If a commit can't be found, and the last known commit is already merged,
	// we know that the commit we're looking for is also merged. Otherwise we
	// can't tell.
	notFoundMeansMerged := len(commits) > 0 && commits[len(commits)-1].Status == models.StatusMerged

	const (
		MERGED int = iota

View on GitHub (pinned to c477a2959b)

Solutions

  1. Verify there is an actual uncommitted change (Files panel shows M/A/D status) before invoking fixup.
  2. Re-select the changed lines in the main diff view and re-run the command.
  3. Refresh the view (r) if the diff may be stale, then retry.
Defensive patterns

Strategy: validation

Validate before calling

// before fixup: ensure hunks exist
if len(addedLineHunks) == 0 && len(deletedLineHunks) == 0 {
    // nothing to attribute; skip the command entirely
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of jesseduffield/lazygit@c477a2959b (2026-08-15). Data as JSON: /api/errors/c89033fa6861bd16. Report an issue: GitHub.