summaryrefslogtreecommitdiff
path: root/refs.c
diff options
context:
space:
mode:
authorLibravatar Michael Haggerty <mhagger@alum.mit.edu>2014-04-07 15:47:56 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2014-04-07 12:09:11 -0700
commitf412411245d4329307dec8ac0b1860c791cdb212 (patch)
tree2f5b7a142c26a2f95d9f2c075873e1fd6bc71d7e /refs.c
parentt1400: add some more tests involving quoted arguments (diff)
downloadtgif-f412411245d4329307dec8ac0b1860c791cdb212.tar.xz
refs.h: rename the action_on_err constants
Given that these constants are only being used when updating references, it is inappropriate to give them such generic names as "DIE_ON_ERR". So prefix their names with "UPDATE_REFS_". Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refs.c')
-rw-r--r--refs.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/refs.c b/refs.c
index 28d5eca8ea..196984e12e 100644
--- a/refs.c
+++ b/refs.c
@@ -3243,9 +3243,9 @@ static struct ref_lock *update_ref_lock(const char *refname,
if (!lock) {
const char *str = "Cannot lock the ref '%s'.";
switch (onerr) {
- case MSG_ON_ERR: error(str, refname); break;
- case DIE_ON_ERR: die(str, refname); break;
- case QUIET_ON_ERR: break;
+ case UPDATE_REFS_MSG_ON_ERR: error(str, refname); break;
+ case UPDATE_REFS_DIE_ON_ERR: die(str, refname); break;
+ case UPDATE_REFS_QUIET_ON_ERR: break;
}
}
return lock;
@@ -3258,9 +3258,9 @@ static int update_ref_write(const char *action, const char *refname,
if (write_ref_sha1(lock, sha1, action) < 0) {
const char *str = "Cannot update the ref '%s'.";
switch (onerr) {
- case MSG_ON_ERR: error(str, refname); break;
- case DIE_ON_ERR: die(str, refname); break;
- case QUIET_ON_ERR: break;
+ case UPDATE_REFS_MSG_ON_ERR: error(str, refname); break;
+ case UPDATE_REFS_DIE_ON_ERR: die(str, refname); break;
+ case UPDATE_REFS_QUIET_ON_ERR: break;
}
return 1;
}
@@ -3294,11 +3294,11 @@ static int ref_update_reject_duplicates(struct ref_update **updates, int n,
const char *str =
"Multiple updates for ref '%s' not allowed.";
switch (onerr) {
- case MSG_ON_ERR:
+ case UPDATE_REFS_MSG_ON_ERR:
error(str, updates[i]->ref_name); break;
- case DIE_ON_ERR:
+ case UPDATE_REFS_DIE_ON_ERR:
die(str, updates[i]->ref_name); break;
- case QUIET_ON_ERR:
+ case UPDATE_REFS_QUIET_ON_ERR:
break;
}
return 1;