Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
fmt-patch: output file names to stdout
author
Johannes Schindelin
<Johannes.Schindelin@gmx.de>
Fri, 5 May 2006 01:33:05 +0000
(
03:33
+0200)
committer
Junio C Hamano
<junkio@cox.net>
Fri, 5 May 2006 20:56:01 +0000
(13:56 -0700)
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
builtin-log.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
0377db7
)
diff --git
a/builtin-log.c
b/builtin-log.c
index 576703c47ec84c4028b0ca40985888a61556f3d2..1649f4943e03f379f69716ecea2074b0d92c41f3 100644
(file)
--- a/
builtin-log.c
+++ b/
builtin-log.c
@@
-75,6
+75,8
@@
static int istitlechar(char c)
(c >= '0' && c <= '9') || c == '.' || c == '_';
}
(c >= '0' && c <= '9') || c == '.' || c == '_';
}
+static FILE *realstdout = NULL;
+
static void reopen_stdout(struct commit *commit, int nr)
{
char filename[1024];
static void reopen_stdout(struct commit *commit, int nr)
{
char filename[1024];
@@
-117,7
+119,7
@@
static void reopen_stdout(struct commit *commit, int nr)
len--;
}
strcpy(filename + len, ".txt");
len--;
}
strcpy(filename + len, ".txt");
- fprintf(
stderr
, "%s\n", filename);
+ fprintf(
realstdout
, "%s\n", filename);
freopen(filename, "w", stdout);
}
freopen(filename, "w", stdout);
}
@@
-149,6
+151,9
@@
int cmd_format_patch(int argc, const char **argv, char **envp)
argv++;
}
argv++;
}
+ if (!use_stdout)
+ realstdout = fdopen(dup(1), "w");
+
prepare_revision_walk(&rev);
while ((commit = get_revision(&rev)) != NULL) {
/* ignore merges */
prepare_revision_walk(&rev);
while ((commit = get_revision(&rev)) != NULL) {
/* ignore merges */