Skip to content

[Bug] isomorphic-git cherry-pick overwrites a dirty tracked file #2436

Closed

Description

@N0zoM1z0

Summary

git.cherryPick silently replaces a tracked worktree file containing local
changes. It returns a new commit and exposes no overwrite/force option. The
attached Git control rejects the same tracked-dirty operation and preserves the
local bytes.

Steps

unzip attachments.zip
cd attachments
ISOGIT_DIR=../isomorphic-git ./reproduce.sh isogit-cherry-pick-repro

The output includes isogit_rc=0, isogit_local_bytes_lost=yes, and
control_git_preserved=yes. Detailed source analysis and exact revisions are
in report.md.

Environment and usage

  • Runtime: Node.js (not the browser).
  • Usage: Node ESM import with the Node filesystem adapter; no bundler, <script>
    tag, or CDN is involved.
  • Tested with isomorphic-git v1.42.2 and the pinned main revision.

Version

v1.42.2 and main at
66ae89c3ae33ab4932d75c0e19fd2c45c8ee2630.

Disclosure note

The report and reproduction code were assisted by an LLM. I personally
reviewed the analysis and confirmed the behavior with the attached reproducer.
I apologize if this LLM assistance creates extra work; the additional detail
is intended to make the behavior and fix location easier to verify.

Attachments

report.md

attachments.zip

Activity

  1. added a commit that references this issue on Oct 1, 2026
    431453f
  2. jcubic commented on Oct 1, 2026

    @jcubic
    Member

    🎉 This issue has been resolved in version 1.42.6 🎉

    The release is available on:

    Your semantic-release bot 📦🚀

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions