Skip to content

jj util gc fails with internal error after a file is ignored in the colocated repo #7062

@fuine

Description

@fuine

Description

After ignoring a previously tracked file in the colocated repo, running jj util gc fails. This problem isn't present in a non-colocated repo. Adding jj new prior to the jj util gc line fixes the issue (GC run finishes succesfully).

Steps to Reproduce the Problem

jj git init --colocate test_repo
cd test_repo
echo "hello" > hello
jj st
echo "hello" > .gitignore
jj file untrack hello
# jj new  # uncommenting this line fixes the issue
jj util gc

Expected Behavior

GC run is finished succesfully (or if this isn't possible due to the internal mechanics then maybe a more descriptive error message could be shown).

Actual Behavior

Enumerating objects: 10, done.
Counting objects: 100% (10/10), done.
Delta compression using up to 12 threads
Compressing objects: 100% (5/5), done.
fatal: unable to read e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
fatal: failed to run repack
Internal error: Unexpected error from backend
Caused by: git gc command exited with an error: exit status: 128

Specifications

  • Platform: Linux
  • Version: 0.31.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐛bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions