libgit2 / libgit2/libgit2sharp

Stash from StashCollection.Add is unsafe.

Open
#865 11 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
3.5k
Forks
925
PR merge metrics
No merged PRs in 30d

Description

Let's say we create two stashes.

First stash operation:
Stash1 will be stash@{0}.

Second stash operation:
Stash1 will be stash@{1}
Stash2 will be stash@{0}

The managed reference to Stash1 will still be stash@{0}. We need a way to reflect these index changes, as unsafe in practice.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing StashCollection.Add and reproduce the two-stash sequence described in the issue. Check how the managed reference to Stash1 is represented after the second addition; done means that reference continues to identify Stash1 after stash indexes shift. No test or source file is named, so locating the relevant implementation and defining the safe update behavior will require project familiarity.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, git
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.