#include "sequencer.h"
#include "notes-utils.h"
#include "mailmap.h"
+#include "sigchain.h"
static const char * const builtin_commit_usage[] = {
N_("git commit [<options>] [--] <pathspec>..."),
opts.dst_index = &the_index;
opts.fn = oneway_merge;
- tree = parse_tree_indirect(get_object_hash(current_head->object));
+ tree = parse_tree_indirect(current_head->object.oid.hash);
if (!tree)
die(_("failed to unpack HEAD tree object"));
parse_tree(tree);
return code;
n = snprintf(buf, sizeof(buf), "%s %s\n",
sha1_to_hex(oldsha1), sha1_to_hex(newsha1));
+ sigchain_push(SIGPIPE, SIG_IGN);
write_in_full(proc.in, buf, n);
close(proc.in);
+ sigchain_pop(SIGPIPE);
return finish_command(&proc);
}
if (!transaction ||
ref_transaction_update(transaction, "HEAD", sha1,
current_head
- ? get_object_hash(current_head->object) : null_sha1,
+ ? current_head->object.oid.hash : null_sha1,
0, sb.buf, &err) ||
ref_transaction_commit(transaction, &err)) {
rollback_index_files();
cfg = init_copy_notes_for_rewrite("amend");
if (cfg) {
/* we are amending, so current_head is not NULL */
- copy_note_for_rewrite(cfg, get_object_hash(current_head->object), sha1);
+ copy_note_for_rewrite(cfg, current_head->object.oid.hash, sha1);
finish_copy_notes_for_rewrite(cfg, "Notes added by 'git commit --amend'");
}
- run_rewrite_hook(get_object_hash(current_head->object), sha1);
+ run_rewrite_hook(current_head->object.oid.hash, sha1);
}
if (!quiet)
print_summary(prefix, sha1, !current_head);