gitbutlerapp/gitbutler · error

The uncommitted area has been renamed from

Error message

The uncommitted area has been renamed from '{OLD_UNCOMMITTED}' to '{UNCOMMITTED}'. Repeat the command with '{UNCOMMITTED}' instead to proceed.

What it means

The `but` CLI renamed the placeholder for the uncommitted-work area from OLD_UNCOMMITTED ("wip@") to UNCOMMITTED ("uncommitted@"). When an id/element string using the old name is parsed, this error tells the user to repeat the command with the new name. It is an anyhow::bail because converting the whole call chain to CliResult was deemed too invasive for a temporary migration message.

Solutions

  1. Replace the old uncommitted-area name with the new one (UNCOMMITTED) and repeat the exact same command.
  2. Update any scripts, aliases, or docs that still reference OLD_UNCOMMITTED.
  3. Check `but --help` or current docs for the current name of the uncommitted area.

Example fix

// before
but diff wip@
// after
but diff uncommitted@
Defensive patterns

Strategy: validation

Validate before calling

// shell: reject the old uncommitted-area name before invoking but
case "$ARG" in
  *wip@*) echo "Use 'uncommitted@' instead of '$ARG'"; exit 1;;
esac

Prevention

When it happens

Trigger: Calling any command that resolves a file/id element (via id parsing in crates/but/src/id/mod.rs) with the literal old uncommitted-area name (e.g. 'wip@' style references) instead of the new one.

Common situations: Scripts, shell aliases, or documentation written before the rename; muscle-memory usage of the old keyword; older tutorials or notes referencing the deprecated name.

Understand the failure class

Background: "is deprecated and will be removed" — deprecation warnings for old API names, keywords, and options, and how to migrate before the removal release — this error's family across 29 libraries.

Related errors


AI-assisted analysis of gitbutlerapp/gitbutler@58e5313667 (2026-09-18). Data as JSON: /api/errors/019ae6afff04d1f5. Report an issue: GitHub.

Appendix: source

Thrown at crates/but/src/id/mod.rs:1394

            }
            matches.push(Box::new(uncommitted_file));
        }
        matches
    }

    fn parse_element_scoped<'a>(
        &'a self,
        element: &str,
        scope: SourceScope,
    ) -> anyhow::Result<Vec<Box<dyn Node<'a> + 'a>>> {
        if element.is_empty() {
            return Ok(vec![]);
        }

        if element == OLD_UNCOMMITTED {
            // this should be a bad_input but it's just too much of a hassle to convert the entire
            // call chain to use CliResult. This is fine for a temporary error message.
            anyhow::bail!(
                "The uncommitted area has been renamed from '{OLD_UNCOMMITTED}' to '{UNCOMMITTED}'. Repeat the command with '{UNCOMMITTED}' instead to proceed."
            )
        }

        // Parse known suffixes.
        if let Some(prefix) = element.strip_suffix("@{stack}") {
            let mut matches = Vec::<Box<dyn Node<'a> + 'a>>::new();
            for stack_with_id in self.indexed_stacks.borrow_owner().iter() {
                for segment_with_id in stack_with_id.segments.iter() {
                    if segment_with_id
                        .branch_name()
                        .is_some_and(|branch_name| branch_name.contains_str(prefix))
                    {
                        matches.push(Box::new(stack_with_id));
                        break;
                    }
                }
            }

View on GitHub (pinned to 58e5313667)