{"thread":{"id":"43054","subject":"[PATCH v11 01/40] apply: make some names more specific","startedAt":"2016-08-11T08:53:01Z","lastAt":"2016-08-11T08:53:01Z","messageCount":1,"participants":["Christian Couder"],"isPatch":true,"patchVersion":11,"patchTotal":40},"messages":[{"id":"293699","messageId":"20160811085229.19017-1-chriscool@tuxfamily.org","threadId":"43054","inReplyTo":null,"subject":"[PATCH v11 01/40] apply: make some names more specific","fromName":"Christian Couder","fromEmail":"christian.couder@gmail.com","sentAt":"2016-08-11T08:52:29Z","receivedAt":"2016-08-11T08:53:01Z","isPatch":true,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"To prepare for some structs and constants being moved from\nbuiltin/apply.c to apply.h, we should give them some more\nspecific names to avoid possible name collisions in the global\nnamespace.\n\nSigned-off-by: Christian Couder <chriscool@tuxfamily.org>\n---\nI am sending only 01/40 and 28/40 for v11 as there are only\ncommit message updates in those 2 patches.\n\nI hope that it will make it possible to merge the first 32\npatches or so of this series.\n\nAs usual cou can get the full series from:\n\nhttps://github.com/chriscool/git/commits/libify-apply-use-in-am\n\n builtin/apply.c | 20 ++++++++++----------\n 1 file changed, 10 insertions(+), 10 deletions(-)\n\ndiff --git a/builtin/apply.c b/builtin/apply.c\nindex 1a488f9..ab8f0bd 100644\n--- a/builtin/apply.c\n+++ b/builtin/apply.c\n@@ -21,7 +21,7 @@\n #include \"ll-merge.h\"\n #include \"rerere.h\"\n \n-enum ws_error_action {\n+enum apply_ws_error_action {\n \tnowarn_ws_error,\n \twarn_on_ws_error,\n \tdie_on_ws_error,\n@@ -29,7 +29,7 @@ enum ws_error_action {\n };\n \n \n-enum ws_ignore {\n+enum apply_ws_ignore {\n \tignore_ws_none,\n \tignore_ws_change\n };\n@@ -45,8 +45,8 @@ enum ws_ignore {\n  * See also \"struct string_list symlink_changes\" in \"struct\n  * apply_state\".\n  */\n-#define SYMLINK_GOES_AWAY 01\n-#define SYMLINK_IN_RESULT 02\n+#define APPLY_SYMLINK_GOES_AWAY 01\n+#define APPLY_SYMLINK_IN_RESULT 02\n \n struct apply_state {\n \tconst char *prefix;\n@@ -110,8 +110,8 @@ struct apply_state {\n \tstruct string_list fn_table;\n \n \t/* These control whitespace errors */\n-\tenum ws_error_action ws_error_action;\n-\tenum ws_ignore ws_ignore_action;\n+\tenum apply_ws_error_action ws_error_action;\n+\tenum apply_ws_ignore ws_ignore_action;\n \tconst char *whitespace_option;\n \tint whitespace_error;\n \tint squelch_whitespace_errors;\n@@ -3750,11 +3750,11 @@ static void prepare_symlink_changes(struct apply_state *state, struct patch *pat\n \t\tif ((patch->old_name && S_ISLNK(patch->old_mode)) &&\n \t\t    (patch->is_rename || patch->is_delete))\n \t\t\t/* the symlink at patch->old_name is removed */\n-\t\t\tregister_symlink_changes(state, patch->old_name, SYMLINK_GOES_AWAY);\n+\t\t\tregister_symlink_changes(state, patch->old_name, APPLY_SYMLINK_GOES_AWAY);\n \n \t\tif (patch->new_name && S_ISLNK(patch->new_mode))\n \t\t\t/* the symlink at patch->new_name is created or remains */\n-\t\t\tregister_symlink_changes(state, patch->new_name, SYMLINK_IN_RESULT);\n+\t\t\tregister_symlink_changes(state, patch->new_name, APPLY_SYMLINK_IN_RESULT);\n \t}\n }\n \n@@ -3769,9 +3769,9 @@ static int path_is_beyond_symlink_1(struct apply_state *state, struct strbuf *na\n \t\t\tbreak;\n \t\tname->buf[name->len] = '\\0';\n \t\tchange = check_symlink_changes(state, name->buf);\n-\t\tif (change & SYMLINK_IN_RESULT)\n+\t\tif (change & APPLY_SYMLINK_IN_RESULT)\n \t\t\treturn 1;\n-\t\tif (change & SYMLINK_GOES_AWAY)\n+\t\tif (change & APPLY_SYMLINK_GOES_AWAY)\n \t\t\t/*\n \t\t\t * This cannot be \"return 0\", because we may\n \t\t\t * see a new one created at a higher level.\n-- \n2.9.2.614.g5428e0c\n\n"}]}