merge-recur: Get rid of debug code
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
Johannes Schindelin committed
Jul 27, 2006 at 19:12 UTC
bd669986f7ecfb0215e5d5fa29ec8449a6225bc1
1 file changed
+1
-64
merge-recursive.c
+1
-64
@@ -22,56 +22,6 @@
22
23
#include "path-list.h"
24
25
-/*#define DEBUG*/
26
-
27
-#ifdef DEBUG
28
-#define debug(...) fprintf(stderr, __VA_ARGS__)
29
-#else
30
-#define debug(...) do { ; /* nothing */ } while (0)
31
-#endif
32
-
33
-#ifdef DEBUG
34
-#include "quote.h"
35
-static void show_ce_entry(const char *tag, struct cache_entry *ce)
36
-{
37
- if (tag && *tag &&
38
- (ce->ce_flags & htons(CE_VALID))) {
39
- static char alttag[4];
40
- memcpy(alttag, tag, 3);
41
- if (isalpha(tag[0]))
42
- alttag[0] = tolower(tag[0]);
43
- else if (tag[0] == '?')
44
- alttag[0] = '!';
45
- else {
46
- alttag[0] = 'v';
47
- alttag[1] = tag[0];
48
- alttag[2] = ' ';
49
- alttag[3] = 0;
50
- }
51
- tag = alttag;
52
- }
53
-
54
- fprintf(stderr,"%s%06o %s %d\t",
55
- tag,
56
- ntohl(ce->ce_mode),
57
- sha1_to_hex(ce->sha1),
58
- ce_stage(ce));
59
- write_name_quoted("", 0, ce->name,
60
- '\n', stderr);
61
- fputc('\n', stderr);
62
-}
63
-
64
-static void ls_files(void) {
65
- int i;
66
- for (i = 0; i < active_nr; i++) {
67
- struct cache_entry *ce = active_cache[i];
68
- show_ce_entry("", ce);
69
- }
70
- fprintf(stderr, "---\n");
71
- if (0) ls_files(); /* avoid "unused" warning */
72
-}
73
-#endif
74
-
25
/*
26
* A virtual commit has
27
* - (const char *)commit->util set to the name, and
@@ -346,13 +296,9 @@ static int save_files_dirs(const unsigned char *sha1,
296
static int get_files_dirs(struct tree *tree)
297
{
298
int n;
349
- debug("get_files_dirs ...\n");
350
- if (read_tree_recursive(tree, "", 0, 0, NULL, save_files_dirs) != 0) {
351
- debug(" get_files_dirs done (0)\n");
299
+ if (read_tree_recursive(tree, "", 0, 0, NULL, save_files_dirs) != 0)
300
return 0;
353
- }
301
n = current_file_set.nr + current_directory_set.nr;
355
- debug(" get_files_dirs done (%d)\n", n);
302
return n;
303
}
304
@@ -434,11 +380,6 @@ static struct path_list *get_renames(struct tree *tree,
380
int i;
381
struct path_list *renames;
382
struct diff_options opts;
437
-#ifdef DEBUG
438
- time_t t = time(0);
439
-
440
- debug("get_renames ...\n");
441
-#endif
383
384
renames = xcalloc(1, sizeof(struct path_list));
385
diff_setup(&opts);
@@ -479,9 +420,6 @@ static struct path_list *get_renames(struct tree *tree,
420
opts.output_format = DIFF_FORMAT_NO_OUTPUT;
421
diff_queued_diff.nr = 0;
422
diff_flush(&opts);
482
-#ifdef DEBUG
483
- debug(" get_renames done in %ld\n", time(0)-t);
484
-#endif
423
return renames;
424
}
425
@@ -829,7 +767,6 @@ static void conflict_rename_rename_2(struct rename *ren1,
767
free(new_path1);
768
}
769
832
-/* General TODO: get rid of all the debug messages */
770
static int process_renames(struct path_list *a_renames,
771
struct path_list *b_renames,
772
const char *a_branch,