mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 10:37:03 +00:00
[8314] Fixed a bug with prepare_new_index remaining true when in fact it's not used
This commit is contained in:
parent
1e9483111d
commit
e9234f048e
2 changed files with 4 additions and 2 deletions
|
|
@ -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))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue