summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 17cf939)
raw | patch | inline | side by side (parent: 17cf939)
author | Pavel Roskin <proski@gnu.org> | |
Thu, 10 Nov 2005 05:30:12 +0000 (00:30 -0500) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Fri, 11 Nov 2005 09:13:05 +0000 (01:13 -0800) |
This patch introduces -no-commit-id option for git-diff-tree, which
suppresses commit ID output.
[jc: dropped gitk part for now.]
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
suppresses commit ID output.
[jc: dropped gitk part for now.]
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Documentation/git-diff-tree.txt | patch | blob | history | |
diff-tree.c | patch | blob | history |
index f57c8d0d8191dae8be8db930ef8b38ddc9c42623..9a2947e27dc2476a78bad93957cca18a06ab037b 100644 (file)
SYNOPSIS
--------
-'git-diff-tree' [--stdin] [-m] [-s] [-v] [--pretty] [-t] [-r] [--root] [<common diff options>] <tree-ish> [<tree-ish>] [<path>...]
+'git-diff-tree' [--stdin] [-m] [-s] [-v] [--no-commit-id] [--pretty] [-t] [-r] [--root] [<common diff options>] <tree-ish> [<tree-ish>] [<path>...]
DESCRIPTION
-----------
commit message. Without "=<style>", it defaults to
medium.
+--no-commit-id::
+ git-diff-tree outputs a line with the commit ID when
+ applicable. This flag suppressed the commit ID output.
+
Limiting Output
---------------
diff --git a/diff-tree.c b/diff-tree.c
index ed323d877cad1e78e08f84c1e9ee1ebb09f05d91..09d16ad6619d7e95959adf2003a8d0f8626491ce 100644 (file)
--- a/diff-tree.c
+++ b/diff-tree.c
#include "commit.h"
static int show_root_diff = 0;
+static int no_commit_id = 0;
static int verbose_header = 0;
static int ignore_merges = 1;
static int read_stdin = 0;
return 0;
}
if (header) {
- printf("%s%c", header, diff_options.line_termination);
+ if (!no_commit_id)
+ printf("%s%c", header, diff_options.line_termination);
header = NULL;
}
diff_flush(&diff_options);
show_root_diff = 1;
continue;
}
+ if (!strcmp(arg, "--no-commit-id")) {
+ no_commit_id = 1;
+ continue;
+ }
usage(diff_tree_usage);
}
if (diff_options.output_format == DIFF_FORMAT_PATCH)