Skip to content

Allow explicit configuration of storage backend, prevent accidental switch to jjfs #3332

Closed

Description

@jinnatar

Currently there seems to be no config option to set the storage backend of a store. The type determination is left up to detecting identifying artefacts from the store, such as the presence of the .git or .jj dirs. This is somewhat unexpected behavior and can shift the storage routines used in unintended ways. A better way would be an explicit mounts.storage option that defaults to gitfs unless overriden in init with the --storage flag or manually configured. Default config without specifying --storage should still record gitfs as the backend to make it explicit that's how its being used.

Personally, I have the repo initialized with jj to better view history in a way I'm familiar with and I didn't intend to switch to gopass's jjfs mode. Everything was fine until I tried to run a fsck which fails due to the immaturity of the jjfs backend.


Original content that assumed jjfs was considered usable:

jj-vcs does not implement garbage collection, quoting from https://docs.jj-vcs.dev/latest/git-compatibility/:

Garbage collection: Yes. It should be safe to run git gc in the Git repo, but it's not tested, so it's probably a good idea to make a backup of the whole workspace first. There's no garbage collection and repacking of Jujutsu's own data structures yet, however.

So it sounds to me like it would be best to just skip gc if operating via jjfs which would allow the rest of fsck to perhaps function.

Activity

  1. changed the title [-]fsck fails on jjfs, no subcommand gc[/-] [+]Allow explicit configuration of storage backend, prevent accidental switch to jjfs[/+] on Feb 2, 2026
  2. dominikschulz commented on Feb 7, 2026

    @dominikschulz
    Member

    Interesting use case. Sorry for the confusion. I agree, we must never accidentally switch the storage backend. Might not be an easy fix, but we should fix this.

  3. added a commit that references this issue on Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugDefects

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      ⌂ 换网址