{"thread":{"id":"5018","subject":"[PATCH 2/6] merge-recur: Get rid of debug code","startedAt":"2006-07-27T17:12:51Z","lastAt":"2006-07-27T17:12:51Z","messageCount":1,"participants":["Johannes Schindelin"],"isPatch":true,"patchVersion":1,"patchTotal":6},"messages":[{"id":"24225","messageId":"Pine.LNX.4.63.0607271912310.29667@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"5018","inReplyTo":null,"subject":"[PATCH 2/6] merge-recur: Get rid of debug code","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2006-07-27T17:12:51Z","receivedAt":"2006-07-27T17:12:51Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n merge-recursive.c |   65 +----------------------------------------------------\n 1 files changed, 1 insertions(+), 64 deletions(-)\n\ndiff --git a/merge-recursive.c b/merge-recursive.c\nindex b0035cc..8d9451f 100644\n--- a/merge-recursive.c\n+++ b/merge-recursive.c\n@@ -22,56 +22,6 @@ #include \"tag.h\"\n \n #include \"path-list.h\"\n \n-/*#define DEBUG*/\n-\n-#ifdef DEBUG\n-#define debug(...) fprintf(stderr, __VA_ARGS__)\n-#else\n-#define debug(...) do { ; /* nothing */ } while (0)\n-#endif\n-\n-#ifdef DEBUG\n-#include \"quote.h\"\n-static void show_ce_entry(const char *tag, struct cache_entry *ce)\n-{\n-\tif (tag && *tag &&\n-\t    (ce->ce_flags & htons(CE_VALID))) {\n-\t\tstatic char alttag[4];\n-\t\tmemcpy(alttag, tag, 3);\n-\t\tif (isalpha(tag[0]))\n-\t\t\talttag[0] = tolower(tag[0]);\n-\t\telse if (tag[0] == '?')\n-\t\t\talttag[0] = '!';\n-\t\telse {\n-\t\t\talttag[0] = 'v';\n-\t\t\talttag[1] = tag[0];\n-\t\t\talttag[2] = ' ';\n-\t\t\talttag[3] = 0;\n-\t\t}\n-\t\ttag = alttag;\n-\t}\n-\n-\tfprintf(stderr,\"%s%06o %s %d\\t\",\n-\t\t\ttag,\n-\t\t\tntohl(ce->ce_mode),\n-\t\t\tsha1_to_hex(ce->sha1),\n-\t\t\tce_stage(ce));\n-\twrite_name_quoted(\"\", 0, ce->name,\n-\t\t\t'\\n', stderr);\n-\tfputc('\\n', stderr);\n-}\n-\n-static void ls_files(void) {\n-\tint i;\n-\tfor (i = 0; i < active_nr; i++) {\n-\t\tstruct cache_entry *ce = active_cache[i];\n-\t\tshow_ce_entry(\"\", ce);\n-\t}\n-\tfprintf(stderr, \"---\\n\");\n-\tif (0) ls_files(); /* avoid \"unused\" warning */\n-}\n-#endif\n-\n /*\n  * A virtual commit has\n  * - (const char *)commit->util set to the name, and\n@@ -346,13 +296,9 @@ static int save_files_dirs(const unsigne\n static int get_files_dirs(struct tree *tree)\n {\n \tint n;\n-\tdebug(\"get_files_dirs ...\\n\");\n-\tif (read_tree_recursive(tree, \"\", 0, 0, NULL, save_files_dirs) != 0) {\n-\t\tdebug(\"  get_files_dirs done (0)\\n\");\n+\tif (read_tree_recursive(tree, \"\", 0, 0, NULL, save_files_dirs) != 0)\n \t\treturn 0;\n-\t}\n \tn = current_file_set.nr + current_directory_set.nr;\n-\tdebug(\"  get_files_dirs done (%d)\\n\", n);\n \treturn n;\n }\n \n@@ -434,11 +380,6 @@ static struct path_list *get_renames(str\n \tint i;\n \tstruct path_list *renames;\n \tstruct diff_options opts;\n-#ifdef DEBUG\n-\ttime_t t = time(0);\n-\n-\tdebug(\"get_renames ...\\n\");\n-#endif\n \n \trenames = xcalloc(1, sizeof(struct path_list));\n \tdiff_setup(&opts);\n@@ -479,9 +420,6 @@ #endif\n \topts.output_format = DIFF_FORMAT_NO_OUTPUT;\n \tdiff_queued_diff.nr = 0;\n \tdiff_flush(&opts);\n-#ifdef DEBUG\n-\tdebug(\"  get_renames done in %ld\\n\", time(0)-t);\n-#endif\n \treturn renames;\n }\n \n@@ -829,7 +767,6 @@ static void conflict_rename_rename_2(str\n \tfree(new_path1);\n }\n \n-/* General TODO: get rid of all the debug messages */\n static int process_renames(struct path_list *a_renames,\n \t\t\t   struct path_list *b_renames,\n \t\t\t   const char *a_branch,\n-- \n1.4.2.rc2.g6a4e\n"}]}