* [PATCH 3/9] Send unpack-trees debugging output to stderr
@ 2008-02-04 18:35 Daniel Barkalow
2008-02-05 1:20 ` Johannes Schindelin
0 siblings, 1 reply; 4+ messages in thread
From: Daniel Barkalow @ 2008-02-04 18:35 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
This is to keep git-stash from getting confused if you're debugging
unpack-trees.
Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
---
unpack-trees.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/unpack-trees.c b/unpack-trees.c
index 45f40c2..f462a56 100644
--- a/unpack-trees.c
+++ b/unpack-trees.c
@@ -122,13 +122,13 @@ static int unpack_trees_rec(struct tree_entry_list **posns, int len,
#if DBRT_DEBUG > 1
if (first)
- printf("index %s\n", first);
+ fprintf(stderr, "index %s\n", first);
#endif
for (i = 0; i < len; i++) {
if (!posns[i] || posns[i] == df_conflict_list)
continue;
#if DBRT_DEBUG > 1
- printf("%d %s\n", i + 1, posns[i]->name);
+ fprintf(stderr, "%d %s\n", i + 1, posns[i]->name);
#endif
if (!first || entcmp(first, firstdir,
posns[i]->name,
@@ -209,13 +209,13 @@ static int unpack_trees_rec(struct tree_entry_list **posns, int len,
int ret;
#if DBRT_DEBUG > 1
- printf("%s:\n", first);
+ fprintf(stderr, "%s:\n", first);
for (i = 0; i < src_size; i++) {
- printf(" %d ", i);
+ fprintf(stderr, " %d ", i);
if (src[i])
- printf("%s\n", sha1_to_hex(src[i]->sha1));
+ fprintf(stderr, "%06x %s\n", src[i]->ce_mode, sha1_to_hex(src[i]->sha1));
else
- printf("\n");
+ fprintf(stderr, "\n");
}
#endif
ret = o->fn(src, o, remove);
@@ -223,7 +223,7 @@ static int unpack_trees_rec(struct tree_entry_list **posns, int len,
return ret;
#if DBRT_DEBUG > 1
- printf("Added %d entries\n", ret);
+ fprintf(stderr, "Added %d entries\n", ret);
#endif
o->pos += ret;
} else {
--
1.5.4
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH 3/9] Send unpack-trees debugging output to stderr
2008-02-04 18:35 [PATCH 3/9] Send unpack-trees debugging output to stderr Daniel Barkalow
@ 2008-02-05 1:20 ` Johannes Schindelin
2008-02-05 20:38 ` Daniel Barkalow
0 siblings, 1 reply; 4+ messages in thread
From: Johannes Schindelin @ 2008-02-05 1:20 UTC (permalink / raw)
To: Daniel Barkalow; +Cc: Junio C Hamano, git
Hi,
On Mon, 4 Feb 2008, Daniel Barkalow wrote:
> #if DBRT_DEBUG > 1
> if (first)
> - printf("index %s\n", first);
> + fprintf(stderr, "index %s\n", first);
> #endif
This code path is only affected when DBRT_DEBUG is defined ("Daniel
Barkalow's Roasted Tomatoes"?). So technically, I do not really see why
this is part of this patch series...
Ciao,
Dscho
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH 3/9] Send unpack-trees debugging output to stderr
2008-02-05 1:20 ` Johannes Schindelin
@ 2008-02-05 20:38 ` Daniel Barkalow
0 siblings, 0 replies; 4+ messages in thread
From: Daniel Barkalow @ 2008-02-05 20:38 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: Junio C Hamano, git
On Tue, 5 Feb 2008, Johannes Schindelin wrote:
> Hi,
>
> On Mon, 4 Feb 2008, Daniel Barkalow wrote:
>
> > #if DBRT_DEBUG > 1
> > if (first)
> > - printf("index %s\n", first);
> > + fprintf(stderr, "index %s\n", first);
> > #endif
>
> This code path is only affected when DBRT_DEBUG is defined ("Daniel
> Barkalow's Roasted Tomatoes"?). So technically, I do not really see why
> this is part of this patch series...
"Daniel Barkalow's read_tree" (which is what that code was called when it
was added). I needed to enable this debugging in order to debug this
series, and found that enabling debugging caused tests to fail, so I fixed
that in the series. To the extent that this matters at all, having it in
the series that could need debugging makes sense.
-Daniel
*This .sig left intentionally blank*
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 3/9] Send unpack-trees debugging output to stderr
@ 2008-01-25 23:24 Daniel Barkalow
0 siblings, 0 replies; 4+ messages in thread
From: Daniel Barkalow @ 2008-01-25 23:24 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
This is to keep git-stash from getting confused if you're debugging
unpack-trees.
Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
---
unpack-trees.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/unpack-trees.c b/unpack-trees.c
index fc0d2c7..d6bae1b 100644
--- a/unpack-trees.c
+++ b/unpack-trees.c
@@ -122,13 +122,13 @@ static int unpack_trees_rec(struct tree_entry_list **posns, int len,
#if DBRT_DEBUG > 1
if (first)
- printf("index %s\n", first);
+ fprintf(stderr, "index %s\n", first);
#endif
for (i = 0; i < len; i++) {
if (!posns[i] || posns[i] == df_conflict_list)
continue;
#if DBRT_DEBUG > 1
- printf("%d %s\n", i + 1, posns[i]->name);
+ fprintf(stderr, "%d %s\n", i + 1, posns[i]->name);
#endif
if (!first || entcmp(first, firstdir,
posns[i]->name,
@@ -209,13 +209,13 @@ static int unpack_trees_rec(struct tree_entry_list **posns, int len,
int ret;
#if DBRT_DEBUG > 1
- printf("%s:\n", first);
+ fprintf(stderr, "%s:\n", first);
for (i = 0; i < src_size; i++) {
- printf(" %d ", i);
+ fprintf(stderr, " %d ", i);
if (src[i])
- printf("%s\n", sha1_to_hex(src[i]->sha1));
+ fprintf(stderr, "%06x %s\n", src[i]->ce_mode, sha1_to_hex(src[i]->sha1));
else
- printf("\n");
+ fprintf(stderr, "\n");
}
#endif
ret = o->fn(src, o, remove);
@@ -223,7 +223,7 @@ static int unpack_trees_rec(struct tree_entry_list **posns, int len,
return ret;
#if DBRT_DEBUG > 1
- printf("Added %d entries\n", ret);
+ fprintf(stderr, "Added %d entries\n", ret);
#endif
o->pos += ret;
} else {
--
1.5.4.rc3.4.g16335
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-02-05 20:39 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-04 18:35 [PATCH 3/9] Send unpack-trees debugging output to stderr Daniel Barkalow
2008-02-05 1:20 ` Johannes Schindelin
2008-02-05 20:38 ` Daniel Barkalow
-- strict thread matches above, loose matches on Subject: below --
2008-01-25 23:24 Daniel Barkalow
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox