summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9ab55bd)
raw | patch | inline | side by side (parent: 9ab55bd)
author | Linus Torvalds <torvalds@ppc970.osdl.org> | |
Mon, 23 May 2005 23:42:21 +0000 (16:42 -0700) | ||
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | |
Mon, 23 May 2005 23:42:21 +0000 (16:42 -0700) |
This makes it act more like a traditional UNIX thing (eg "cat").
apply.c | patch | blob | history |
index dbcc07d398ba386d5f3f7e746a71f8b6b5845d1e..f3b686541c568004c7e19edd9e30f313a224c7e7 100644 (file)
--- a/apply.c
+++ b/apply.c
int main(int argc, char **argv)
{
int i;
+ int read_stdin = 1;
if (read_cache() < 0)
die("unable to read index file");
if (!strcmp(arg, "-")) {
apply_patch(0);
+ read_stdin = 0;
continue;
}
if (!strcmp(arg, "--no-merge")) {
fd = open(arg, O_RDONLY);
if (fd < 0)
usage(apply_usage);
+ read_stdin = 0;
apply_patch(fd);
close(fd);
}
+ if (read_stdin)
+ apply_patch(0);
return 0;
}