]> git.proxmox.com Git - libgit2.git/blobdiff - src/stash.c
New upstream version 1.0.1+dfsg.1
[libgit2.git] / src / stash.c
index 4a13d0530f6b9cf4d5eae14642d845b9ac3bff63..790f56fddc79f2fc20facbe9bf977e98aab7384c 100644 (file)
@@ -173,7 +173,7 @@ static int stash_to_index(
        git_index *index,
        const char *path)
 {
-       git_index *repo_index;
+       git_index *repo_index = NULL;
        git_index_entry entry = {{0}};
        struct stat st;
        int error;
@@ -187,7 +187,7 @@ static int stash_to_index(
                return error;
 
        git_index_entry__init_from_stat(&entry, &st,
-               (repo_index != NULL || !repo_index->distrust_filemode));
+               (repo_index == NULL || !repo_index->distrust_filemode));
 
        entry.path = path;