You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
letrepository=openRepository(NSURL(fileURLWithPath:"/Users/modocache/Desktop/MyRepo")!)letindex= repository.flatMap{ $0.index }letcommit= index.flatMap{ $0.stash(message:"Saving some work for another day")}
I'd also like to be able to apply stashed changes somehow. Not sure what that API should look like yet, but suggestions welcome!
The text was updated successfully, but these errors were encountered:
We can create a stash thanks to b305354 and 699f411. It turns out a stash creates a commit object.
The next part of this issue would involve applying a stash. Perhaps "applying a stash" would simply mean merging the commit that was created? Is there a way to get a list of stashes, like git stash list? Ideally, we would be able to list all stashes, find the one we want, then apply it.
There are two things related to stashing that I think I can help shed some light on.
With regards to applying a stash, I don't know the specifics, but I'm pretty sure that it's far more complicated than a simple merge. Fortunately it appears that libgit2 will get git_stash_apply and git_stash_pop soon.
With regards to getting a list of stashes libgit2 already has this built in, with git_stash_foreach.
I want to be able to stash uncommitted changes:
I'd also like to be able to apply stashed changes somehow. Not sure what that API should look like yet, but suggestions welcome!
The text was updated successfully, but these errors were encountered: