Instead of checking silent flag all over the place, simply use
the NO_OUTPUT option diffcore provides to suppress the diff
output.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
#include "cache.h"
#include "diff.h"
#include "cache.h"
#include "diff.h"
static int show_root_diff = 0;
static int verbose_header = 0;
static int ignore_merges = 1;
static int show_root_diff = 0;
static int verbose_header = 0;
static int ignore_merges = 1;
const char *path;
const unsigned char *sha1 = extract(tree, size, &path, &mode);
const char *path;
const unsigned char *sha1 = extract(tree, size, &path, &mode);
- if (silent)
- return;
-
if (recursive && S_ISDIR(mode)) {
char type[20];
unsigned long size;
if (recursive && S_ISDIR(mode)) {
char type[20];
unsigned long size;
- if (silent)
- return 0;
-
diff_change(mode1, mode2, sha1, sha2, base, path1);
return 0;
}
diff_change(mode1, mode2, sha1, sha2, base, path1);
return 0;
}
if (this_header[offset-1] != '\n')
this_header[offset++] = '\n';
/* Add _another_ EOLN if we are doing diff output */
if (this_header[offset-1] != '\n')
this_header[offset++] = '\n';
/* Add _another_ EOLN if we are doing diff output */
- if (!silent)
- this_header[offset++] = '\n';
+ this_header[offset++] = '\n';
this_header[offset] = 0;
}
this_header[offset] = 0;
}
* Don't print multiple merge entries if we
* don't print the diffs.
*/
* Don't print multiple merge entries if we
* don't print the diffs.
*/
continue;
}
if (!strcmp(arg, "-s")) {
continue;
}
if (!strcmp(arg, "-s")) {
+ diff_output_format = DIFF_FORMAT_NO_OUTPUT;
continue;
}
if (!strcmp(arg, "-v")) {
continue;
}
if (!strcmp(arg, "-v")) {