libgit2 / libgit2/libgit2

Hard to create a commit with current state of workdir

Open
#4,354 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

easy fix up for grabs
Dominant language
C
Stars
10.6k
Forks
2.7k
PR merge metrics
No merged PRs in 30d

Description

I was looking at the equivalent of git stash create and I couldn't find one. The closes I got was:

  • Add all things to index
  • Create a new commit
  • Reload index from disk

However this seems a bit strange given that I need to undo changes. Even ability to create a temporary indecies associated with repo would make it nicer. Other - possibly more generic - way would be to allow apply diff to tree.

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

No source file, entry point, or test is named. Start by comparing the requested behavior with git stash create and reviewing libgit2's index, tree, and diff concepts; determine whether temporary index state or applying a diff to a tree is the intended scope. Done requires a defined API and behavior for creating a commit from the workdir without the described index-reset workflow.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, git
Domain
devtools
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.