{"thread":{"id":"11878","subject":"[PATCH 3/9] Send unpack-trees debugging output to stderr","startedAt":"2008-02-04T18:35:44Z","lastAt":"2008-02-05T20:38:35Z","messageCount":3,"participants":["Daniel Barkalow","Johannes Schindelin"],"isPatch":true,"patchVersion":1,"patchTotal":9},"messages":[{"id":"67403","messageId":"alpine.LNX.1.00.0802041335430.13593@iabervon.org","threadId":"11878","inReplyTo":null,"subject":"[PATCH 3/9] Send unpack-trees debugging output to stderr","fromName":"Daniel Barkalow","fromEmail":"barkalow@iabervon.org","sentAt":"2008-02-04T18:35:44Z","receivedAt":"2008-02-04T18:35:44Z","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 45f40c2..f462a56 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\n"},{"id":"67463","messageId":"alpine.LSU.1.00.0802050117410.8543@racer.site","threadId":"11878","inReplyTo":"alpine.LNX.1.00.0802041335430.13593@iabervon.org","subject":"Re: [PATCH 3/9] Send unpack-trees debugging output to stderr","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-02-05T01:20:43Z","receivedAt":"2008-02-05T01:20:43Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Mon, 4 Feb 2008, Daniel Barkalow wrote:\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\nThis code path is only affected when DBRT_DEBUG is defined (\"Daniel \nBarkalow's Roasted Tomatoes\"?).  So technically, I do not really see why \nthis is part of this patch series...\n\nCiao,\nDscho\n"},{"id":"67549","messageId":"alpine.LNX.1.00.0802042118420.13593@iabervon.org","threadId":"11878","inReplyTo":"alpine.LSU.1.00.0802050117410.8543@racer.site","subject":"Re: [PATCH 3/9] Send unpack-trees debugging output to stderr","fromName":"Daniel Barkalow","fromEmail":"barkalow@iabervon.org","sentAt":"2008-02-05T20:38:35Z","receivedAt":"2008-02-05T20:38:35Z","isPatch":true,"sender":{"key":"barkalow@iabervon.org","avatar":"https://avatars.githubusercontent.com/u/55364219?v=4"},"body":"On Tue, 5 Feb 2008, Johannes Schindelin wrote:\n\n> Hi,\n> \n> On Mon, 4 Feb 2008, Daniel Barkalow wrote:\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> \n> This code path is only affected when DBRT_DEBUG is defined (\"Daniel \n> Barkalow's Roasted Tomatoes\"?).  So technically, I do not really see why \n> this is part of this patch series...\n\n\"Daniel Barkalow's read_tree\" (which is what that code was called when it \nwas added). I needed to enable this debugging in order to debug this \nseries, and found that enabling debugging caused tests to fail, so I fixed \nthat in the series. To the extent that this matters at all, having it in \nthe series that could need debugging makes sense.\n\n\t-Daniel\n*This .sig left intentionally blank*\n"}]}