[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [jgit-dev] How to find identify a stash id
|
I don't think you can definitely tell a commit is representing a stash without inspecting the reflog of the refs/stash ref. The objects created by the stash command are standard commits which do have specific commit messages and the multiple commits belonging to the same stash are arranged in a specific topology. This allows you to determine easily that certain commits will not represent a stash (because they don't have the right commit message, because they aranged in the wrong topology). But I guess to find out whether a certain commit really represents a stash you would have to inspect .git/logs/refs/stash. When you create a new stash .git/refs/stash is updated and to find the other stashes you would have to go to the reflog. Take care that a stash can consist of multiple commits (on saving the working tree content, one saving the index content, one for the untracked files).