Unverified Commit 4e7006ab by Edward Thomson Committed by GitHub

Merge pull request #6695 from libgit2/ethomson/fix

Minor bug fixes
parents cbae7756 113b995f
......@@ -97,9 +97,6 @@ int cmd_index_pack(int argc, char **argv)
}
}
if (!read_stdin)
p_close(fd);
if (git_indexer_commit(idx, &stats) < 0) {
ret = cli_error_git();
goto done;
......@@ -108,6 +105,9 @@ int cmd_index_pack(int argc, char **argv)
cli_progress_finish(&progress);
done:
if (!read_stdin && fd >= 0)
p_close(fd);
cli_progress_dispose(&progress);
git_indexer_free(idx);
return ret;
......
......@@ -703,9 +703,9 @@ static int midx_write(
hash_cb_data.ctx = &ctx;
oid_size = git_oid_size(w->oid_type);
GIT_ASSERT((checksum_type = git_oid_algorithm(w->oid_type)));
checksum_type = git_oid_algorithm(w->oid_type);
checksum_size = git_hash_size(checksum_type);
GIT_ASSERT(oid_size && checksum_type && checksum_size);
if ((error = git_hash_ctx_init(&ctx, checksum_type)) < 0)
return error;
......
......@@ -121,7 +121,7 @@ int git_process_new(
GIT_ERROR_CHECK_ALLOC(process);
if (git_strlist_copy_with_null(&process->args, args, args_len) < 0 ||
merge_env(&process->env, env, env_len, opts->exclude_env) < 0) {
merge_env(&process->env, env, env_len, opts ? opts->exclude_env : false) < 0) {
git_process_free(process);
return -1;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment