commit - 5e0b25c451a0506eecec208277ad217b14a74e6b
commit + b8bdcc21c2a597ea4af9b9dd1949a58fb8a62904
blob - d74ed85680084b8e192d10eb6f77ade5721e72f1
blob + 72e810d22ce253f7c807aceb768f59b3fc1aa5a4
--- lib/worktree.c
+++ lib/worktree.c
struct got_tree_object *tree = NULL;
char *fileindex_path = NULL, *new_fileindex_path = NULL;
struct got_fileindex *fileindex = NULL;
- FILE *findex = NULL;
+ FILE *new_index = NULL;
err = lock_worktree(worktree, LOCK_EX);
if (err)
goto done;
}
- err = got_opentemp_named(&new_fileindex_path, &findex, fileindex_path);
+ err = got_opentemp_named(&new_fileindex_path, &new_index,
+ fileindex_path);
if (err)
goto done;
if (err)
goto done;
- err = got_fileindex_write(fileindex, findex);
+ err = got_fileindex_write(fileindex, new_index);
if (err)
goto done;
free(commit_id);
if (new_fileindex_path)
unlink(new_fileindex_path);
- if (findex)
- fclose(findex);
+ if (new_index)
+ fclose(new_index);
free(new_fileindex_path);
free(fileindex_path);
got_fileindex_close(fileindex);