I'm trying to reproduce the behavior of git stash -u followed by git stash apply in libgit2. I can create the stash properly in libgit2 and applying it with the git CLT works. However, if I try to apply it with libgit2, the untracked files are not restored.
git_checkout_options options = GIT_CHECKOUT_OPTIONS_INIT;
options.checkout_strategy = GIT_CHECKOUT_SAFE_CREATE | GIT_CHECKOUT_DONT_UPDATE_INDEX;
CALL_LIBGIT2_FUNCTION_RETURN(NO, git_checkout_tree, self.private, (git_object*)stash.private, &options);
(stash.private is actually a git_commit* retrieved with git_commit_lookup() after creating the stash)
What am I doing wrong?
I'm trying to reproduce the behavior of
git stash -ufollowed bygit stash applyin libgit2. I can create the stash properly in libgit2 and applying it with the git CLT works. However, if I try to apply it with libgit2, the untracked files are not restored.(stash.private is actually a git_commit* retrieved with git_commit_lookup() after creating the stash)
What am I doing wrong?