{"thread":{"id":"11744","subject":"[PATCH 3/9] Send unpack-trees debugging output to stderr","startedAt":"2008-01-25T23:24:47Z","lastAt":"2008-01-25T23:24:47Z","messageCount":1,"participants":["Daniel Barkalow"],"isPatch":true,"patchVersion":1,"patchTotal":9},"messages":[{"id":"66611","messageId":"alpine.LNX.1.00.0801251820140.13593@iabervon.org","threadId":"11744","inReplyTo":null,"subject":"[PATCH 3/9] Send unpack-trees debugging output to stderr","fromName":"Daniel Barkalow","fromEmail":"barkalow@iabervon.org","sentAt":"2008-01-25T23:24:47Z","receivedAt":"2008-01-25T23:24:47Z","isPatch":true,"sender":{"key":"barkalow@iabervon.org","avatar":"https://avatars.githubusercontent.com/u/55364219?v=4"},"body":"This is to keep git-stash from getting confused if you're debugging\nunpack-trees.\n\nSigned-off-by: Daniel Barkalow <barkalow@iabervon.org>\n---\n unpack-trees.c |   14 +++++++-------\n 1 files changed, 7 insertions(+), 7 deletions(-)\n\ndiff --git a/unpack-trees.c b/unpack-trees.c\nindex fc0d2c7..d6bae1b 100644\n--- a/unpack-trees.c\n+++ b/unpack-trees.c\n@@ -122,13 +122,13 @@ static int unpack_trees_rec(struct tree_entry_list **posns, int len,\n \n #if DBRT_DEBUG > 1\n \t\tif (first)\n-\t\t\tprintf(\"index %s\\n\", first);\n+\t\t\tfprintf(stderr, \"index %s\\n\", first);\n #endif\n \t\tfor (i = 0; i < len; i++) {\n \t\t\tif (!posns[i] || posns[i] == df_conflict_list)\n \t\t\t\tcontinue;\n #if DBRT_DEBUG > 1\n-\t\t\tprintf(\"%d %s\\n\", i + 1, posns[i]->name);\n+\t\t\tfprintf(stderr, \"%d %s\\n\", i + 1, posns[i]->name);\n #endif\n \t\t\tif (!first || entcmp(first, firstdir,\n \t\t\t\t\t     posns[i]->name,\n@@ -209,13 +209,13 @@ static int unpack_trees_rec(struct tree_entry_list **posns, int len,\n \t\t\t\tint ret;\n \n #if DBRT_DEBUG > 1\n-\t\t\t\tprintf(\"%s:\\n\", first);\n+\t\t\t\tfprintf(stderr, \"%s:\\n\", first);\n \t\t\t\tfor (i = 0; i < src_size; i++) {\n-\t\t\t\t\tprintf(\" %d \", i);\n+\t\t\t\t\tfprintf(stderr, \" %d \", i);\n \t\t\t\t\tif (src[i])\n-\t\t\t\t\t\tprintf(\"%s\\n\", sha1_to_hex(src[i]->sha1));\n+\t\t\t\t\t\tfprintf(stderr, \"%06x %s\\n\", src[i]->ce_mode, sha1_to_hex(src[i]->sha1));\n \t\t\t\t\telse\n-\t\t\t\t\t\tprintf(\"\\n\");\n+\t\t\t\t\t\tfprintf(stderr, \"\\n\");\n \t\t\t\t}\n #endif\n \t\t\t\tret = o->fn(src, o, remove);\n@@ -223,7 +223,7 @@ static int unpack_trees_rec(struct tree_entry_list **posns, int len,\n \t\t\t\t\treturn ret;\n \n #if DBRT_DEBUG > 1\n-\t\t\t\tprintf(\"Added %d entries\\n\", ret);\n+\t\t\t\tfprintf(stderr, \"Added %d entries\\n\", ret);\n #endif\n \t\t\t\to->pos += ret;\n \t\t\t} else {\n-- \n1.5.4.rc3.4.g16335\n"}]}