summaryrefslogtreecommitdiff
path: root/builtin/apply.c
diff options
context:
space:
mode:
authorChristian Couder <christian.couder@gmail.com>2016-08-11 08:52:29 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-08-11 19:41:09 (GMT)
commit4d5acae0ca9c3a72c7ba7d82d684e7c0e57f8e92 (patch)
tree805045cefa5aa8300bde93be6d3a6b61b24491f6 /builtin/apply.c
parentf8f7adce9fc50a11a764d57815602dcb818d1816 (diff)
downloadgit-4d5acae0ca9c3a72c7ba7d82d684e7c0e57f8e92.zip
git-4d5acae0ca9c3a72c7ba7d82d684e7c0e57f8e92.tar.gz
git-4d5acae0ca9c3a72c7ba7d82d684e7c0e57f8e92.tar.bz2
apply: make some names more specific
To prepare for some structs and constants being moved from builtin/apply.c to apply.h, we should give them some more specific names to avoid possible name collisions in the global namespace. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/apply.c')
-rw-r--r--builtin/apply.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/builtin/apply.c b/builtin/apply.c
index 1a488f9..ab8f0bd 100644
--- a/builtin/apply.c
+++ b/builtin/apply.c
@@ -21,7 +21,7 @@
#include "ll-merge.h"
#include "rerere.h"
-enum ws_error_action {
+enum apply_ws_error_action {
nowarn_ws_error,
warn_on_ws_error,
die_on_ws_error,
@@ -29,7 +29,7 @@ enum ws_error_action {
};
-enum ws_ignore {
+enum apply_ws_ignore {
ignore_ws_none,
ignore_ws_change
};
@@ -45,8 +45,8 @@ enum ws_ignore {
* See also "struct string_list symlink_changes" in "struct
* apply_state".
*/
-#define SYMLINK_GOES_AWAY 01
-#define SYMLINK_IN_RESULT 02
+#define APPLY_SYMLINK_GOES_AWAY 01
+#define APPLY_SYMLINK_IN_RESULT 02
struct apply_state {
const char *prefix;
@@ -110,8 +110,8 @@ struct apply_state {
struct string_list fn_table;
/* These control whitespace errors */
- enum ws_error_action ws_error_action;
- enum ws_ignore ws_ignore_action;
+ enum apply_ws_error_action ws_error_action;
+ enum apply_ws_ignore ws_ignore_action;
const char *whitespace_option;
int whitespace_error;
int squelch_whitespace_errors;
@@ -3750,11 +3750,11 @@ static void prepare_symlink_changes(struct apply_state *state, struct patch *pat
if ((patch->old_name && S_ISLNK(patch->old_mode)) &&
(patch->is_rename || patch->is_delete))
/* the symlink at patch->old_name is removed */
- register_symlink_changes(state, patch->old_name, SYMLINK_GOES_AWAY);
+ register_symlink_changes(state, patch->old_name, APPLY_SYMLINK_GOES_AWAY);
if (patch->new_name && S_ISLNK(patch->new_mode))
/* the symlink at patch->new_name is created or remains */
- register_symlink_changes(state, patch->new_name, SYMLINK_IN_RESULT);
+ register_symlink_changes(state, patch->new_name, APPLY_SYMLINK_IN_RESULT);
}
}
@@ -3769,9 +3769,9 @@ static int path_is_beyond_symlink_1(struct apply_state *state, struct strbuf *na
break;
name->buf[name->len] = '\0';
change = check_symlink_changes(state, name->buf);
- if (change & SYMLINK_IN_RESULT)
+ if (change & APPLY_SYMLINK_IN_RESULT)
return 1;
- if (change & SYMLINK_GOES_AWAY)
+ if (change & APPLY_SYMLINK_GOES_AWAY)
/*
* This cannot be "return 0", because we may
* see a new one created at a higher level.