From e9234f048eae3809ea37aec3e8c26372fb02db43 Mon Sep 17 00:00:00 2001 From: Wyk3d Date: Wed, 5 Aug 2009 11:39:39 +0300 Subject: [PATCH] [8314] Fixed a bug with prepare_new_index remaining true when in fact it's not used --- contrib/git_id/git_id.cpp | 4 +++- src/shared/revision_nr.h | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/contrib/git_id/git_id.cpp b/contrib/git_id/git_id.cpp index 319abbd64..df81ac522 100644 --- a/contrib/git_id/git_id.cpp +++ b/contrib/git_id/git_id.cpp @@ -750,8 +750,10 @@ bool prepare_new_index() if(!use_new_index) return true; // only use a new index if there are staged changes that should be preserved - if( (cmd_pipe = popen( "git diff --cached", "r" )) == NULL ) + if( (cmd_pipe = popen( "git diff --cached", "r" )) == NULL ) { + use_new_index = false; return false; + } if(!fgets(buffer, MAX_BUF, cmd_pipe)) { diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index ef1e942cd..995276071 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "8313" + #define REVISION_NR "8314" #endif // __REVISION_NR_H__