Skip to content

Stores that already pushed logs/ still carry them in the backup remote's history, and #287's exclusion cannot remove them #288

Closed

Description

@fdaviddpt

Found while reviewing #287 (fix for #285). The forward-looking half is fixed there; this is the part an exclude rule cannot reach, and it is user-facing.

What #287 established

The git-backup hook's comment claimed "the root-level .gitignore covers logs/tmp exclusions". The plugin never creates that file, and in external mode it deletes the only one it does write. Confirmed empirically in a store built entirely by the plugin: logs/ was committed and pushed like memory.

#287 fixes that going forward — /<slug>/logs/ and /<slug>/tmp/ are now maintained in $GIT_DIR/info/exclude, and the existing git rm --cached untracks them.

What it does not fix

git rm --cached stops tracking a path. It does not remove the path from history. So for any user whose store predates #287 and who never hand-authored a root .gitignore, their session logs are already in their backup remote's commit history, and they stay there after upgrading. The working tree gets clean; the history does not.

That matters because of what these logs are. They are this plugin's own session logs — whatever the hooks recorded about that user's sessions — sitting in a git remote the user set up for memory, which they may well have chosen on the assumption that it held only what they wrote. Nothing has told them otherwise.

Why this is a filing and not a paragraph in #287's CHANGELOG entry

The distinction the tracker uses:

It is not destructive — nothing of the user's is lost — but it is the one class where the user, not us, has to decide what to do, and they can only decide it if they are told.

What a fix probably is

Mostly words rather than code, and the words are the hard part:

  • Tell people. A CHANGELOG note and a README line under the backup section, stating plainly that stores created before this version may have logs/ in their remote history, and that upgrading does not remove it.
  • Give them the command, with its cost stated. Purging history means a rewrite (git filter-repo or equivalent) and a force-push, which breaks every other clone of that store. That is a real trade and the note must say so rather than handing over an incantation.
  • Consider whether the plugin should detect it at all — e.g. /remember:doctor reporting "your backup history contains logs/" as a finding. Worth weighing against noise: for a user who does not care, that is a permanent warning about something harmless to them.

Deliberately not proposing which. Whether to alarm every existing user about data they may consider unremarkable is a judgment about this plugin's audience, and I do not think it is mine to make.

Not established

How many users this touches. It requires: a store older than #287, no hand-authored root .gitignore, and a configured backup remote. All three are plausible together — that combination is precisely the default path — but nobody has counted, and I would rather say that than imply a population.

Related: #285 (the report that surfaced the seam), #287 (fixes it forward), #261 (why $GIT_DIR/info/exclude is the right home for a per-clone rule).

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions