Skip to content

The delete guard counts tags, so every kinisi_ros workspace reports 265 unpushed commits #485

Description

@blooop

dl rm and dl --rm refuse to delete any workspace of a repository that tags releases on branches it then deletes. On this host, six of eight workspaces report unsaved work and none of it is real:

$ dl --ls --json
  kinisi-ros-feat-bt-with-wheels-on-brake-4ixn: 265 unpushed commit(s)
  kinisi-ros-feat-bt-transform-pose-stamped-w0yq: 265 unpushed commit(s)
  kinisi-ros-fix-bt-mtpwo-goal-generation-bomq: 265 unpushed commit(s)
  kinisi-ros-feat-bt-compute-spread-target-94p1: 265 unpushed commit(s)
  kinisi-ros-bugfix-interpolator-position-cl-cf9e: 268 unpushed commit(s)
  kinisi-ros-rerun-tf-frame-list-and-recordi-p4vl: 269 unpushed commit(s)

The clones are clean and fully pushed. Inside one of them:

query count
git rev-list --count --all --not --remotes 265
git rev-list --count --exclude=refs/tags/* --all --not --remotes 0
git rev-list --count feat/bt-with-wheels-on-brake --not --remotes 0
git rev-list --count main --not --remotes 0

Every one of the 265 is reachable only from a tag whose branch the remote deleted — kaufland_virtual_demo (131), bt-mapping-refresh/bounded-verified-2026-08-11 (29), bt-mapping-refresh/verified-2026-08-11 (26), DPD_Demo (7), ci-regression-pr-6003 (7), live_ford_demo (4), and so on. The bare cache fetches --tags, so every clone of the repository inherits them and every workspace of it is affected forever.

Git::unpushed_commits documents this as a deliberate trade — a clone kept costs disk, a clone deleted costs the work. The measurement is what makes it the wrong way round for this repository: the guard cannot be satisfied, so --force becomes the ordinary way to delete a workspace, and a habit of --force is how the clone that does hold an hour of work goes.

The tags are the only ref set --all reaches that behaves this way, and --exclude=refs/tags/* takes them out of --all alone — local branches, every worktree's HEAD including detached ones, and refs/stash all stay in, so #471 and the stash keep the answers they have. What is given up is a commit reachable only from a local tag with no branch, worktree HEAD or stash naming it too.

Activity

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions