diff options
author | Junio C Hamano <gitster@pobox.com> | 2014-06-03 12:06:40 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-06-03 12:06:41 -0700 |
commit | 2cc70cefdd4a249fab895943890d21071e03f8c7 (patch) | |
tree | 011f926458c12d9298bebefdbc732a82a7522846 /builtin/checkout.c | |
parent | 8eaf517835d0534767d6a54d12d072ce30276ad9 (diff) | |
parent | 6a402338ec9ca0369e1801533dda2108689ceaaf (diff) | |
download | git-2cc70cefdd4a249fab895943890d21071e03f8c7.tar.gz git-2cc70cefdd4a249fab895943890d21071e03f8c7.tar.xz |
Merge branch 'mh/ref-transaction'
Update "update-ref --stdin [-z]" and then introduce a transactional
support for (multi-)reference updates.
* mh/ref-transaction: (27 commits)
ref_transaction_commit(): work with transaction->updates in place
struct ref_update: add a type field
struct ref_update: add a lock field
ref_transaction_commit(): simplify code using temporary variables
struct ref_update: store refname as a FLEX_ARRAY
struct ref_update: rename field "ref_name" to "refname"
refs: remove API function update_refs()
update-ref --stdin: reimplement using reference transactions
refs: add a concept of a reference transaction
update-ref --stdin: harmonize error messages
update-ref --stdin: improve the error message for unexpected EOF
t1400: test one mistake at a time
update-ref --stdin -z: deprecate interpreting the empty string as zeros
update-ref.c: extract a new function, parse_next_sha1()
t1400: test that stdin -z update treats empty <newvalue> as zeros
update-ref --stdin: simplify error messages for missing oldvalues
update-ref --stdin: make error messages more consistent
update-ref --stdin: improve error messages for invalid values
update-ref.c: extract a new function, parse_refname()
parse_cmd_verify(): copy old_sha1 instead of evaluating <oldvalue> twice
...
Diffstat (limited to 'builtin/checkout.c')
-rw-r--r-- | builtin/checkout.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/checkout.c b/builtin/checkout.c index 07cf55530..ff4492162 100644 --- a/builtin/checkout.c +++ b/builtin/checkout.c @@ -624,7 +624,7 @@ static void update_refs_for_switch(const struct checkout_opts *opts, /* Nothing to do. */ } else if (opts->force_detach || !new->path) { /* No longer on any branch. */ update_ref(msg.buf, "HEAD", new->commit->object.sha1, NULL, - REF_NODEREF, DIE_ON_ERR); + REF_NODEREF, UPDATE_REFS_DIE_ON_ERR); if (!opts->quiet) { if (old->path && advice_detached_head) detach_advice(new->name); |