Commit e35b947bece8e3e6cecf5c7dbae014069404c445

Pierre-Olivier Latour 2015-06-21T01:06:20

Write modified index in git_stash_apply() Same as with git_stash_save(), there's no reason not to write the index to disk since it has been modified.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/stash.c b/src/stash.c
index a7a288c..8f512d4 100644
--- a/src/stash.c
+++ b/src/stash.c
@@ -819,6 +819,8 @@ int git_stash_apply(
 
 	NOTIFY_PROGRESS(opts, GIT_STASH_APPLY_PROGRESS_DONE);
 
+	error = git_index_write(repo_index);
+
 cleanup:
 	git_index_free(untracked_index);
 	git_index_free(modified_index);