Thanks a lot, Christian, for your quick and detailed answer. Then I
will stick to the StashListCommand / reflog approach.
- Rüdiger
On 07.07.2017 14:05, Christian
Halstrick wrote:
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).
|