* git-whatchanged doesn't display date human understandable
@ 2005-06-12 9:34 Thomas Glanzmann
2005-06-13 0:44 ` [PATCH] Support commit_format fully in diff-tree Junio C Hamano
0 siblings, 1 reply; 2+ messages in thread
From: Thomas Glanzmann @ 2005-06-12 9:34 UTC (permalink / raw)
To: GIT
Hello,
what option to I have to tweak to get timestamps human understandable
again:
git-whatchanged | head -5
diff-tree 422dee18f8b39b4c14332afbdf75a5c519bdbed2 (from 16df05aa0464e5e17d4ef023b78bc7b98546cb9a)
tree 2ed70720e7103ae700a9dceac55c77d562057467
parent 16df05aa0464e5e17d4ef023b78bc7b98546cb9a
author vrsieh <vrsieh> 1082362048 +0000
committer vrsieh <vrsieh> 1082362048 +0000
~~~~~~~~~~~~~~~~
This seems to happen with Linus git tree HEAD.
Thomas
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH] Support commit_format fully in diff-tree
2005-06-12 9:34 git-whatchanged doesn't display date human understandable Thomas Glanzmann
@ 2005-06-13 0:44 ` Junio C Hamano
0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2005-06-13 0:44 UTC (permalink / raw)
To: Thomas Glanzmann; +Cc: Linus Torvalds, git
>>>>> "TG" == Thomas Glanzmann <sithglan@stud.uni-erlangen.de> writes:
TG> Hello,
TG> what option to I have to tweak to get timestamps human understandable
TG> again:
TG> git-whatchanged | head -5
------------
This steals --pretty command line option from rev-list and
teaches diff-tree to do the same. With this change,
$ git-whatchanged --pretty
would work as expected.
Signed-off-by: Junio C Hamano <junkio@cox.net>
---
*** Sorry, but this patch does not include documentation updates
*** or additional tests like my usual ones. I would appreciate
*** it if others on the list give help with them. I will be
*** offline for about a week or so, and trying to clean my stack
*** as much as possible before I have to leave.
cd /opt/packrat/playpen/public/in-place/git/git.junio/
jit-diff : diff-tree.c
# - linus: git-apply: ignore empty git headers
# + (working tree)
diff --git a/diff-tree.c b/diff-tree.c
--- a/diff-tree.c
+++ b/diff-tree.c
@@ -398,7 +398,20 @@ static int diff_tree_stdin(char *line)
}
static char *diff_tree_usage =
-"git-diff-tree [-p] [-r] [-z] [--stdin] [-M] [-C] [-R] [-S<string>] [-O<orderfile>] [-m] [-s] [-v] [-t] <tree-ish> <tree-ish>";
+"git-diff-tree [-p] [-r] [-z] [--stdin] [-M] [-C] [-R] [-S<string>] [-O<orderfile>] [-m] [-s] [-v] [--pretty] [-t] <tree-ish> <tree-ish>";
+
+static enum cmit_fmt get_commit_format(const char *arg)
+{
+ if (!*arg)
+ return CMIT_FMT_DEFAULT;
+ if (!strcmp(arg, "=raw"))
+ return CMIT_FMT_RAW;
+ if (!strcmp(arg, "=medium"))
+ return CMIT_FMT_MEDIUM;
+ if (!strcmp(arg, "=short"))
+ return CMIT_FMT_SHORT;
+ usage(diff_tree_usage);
+}
int main(int argc, const char **argv)
{
@@ -492,6 +505,11 @@ int main(int argc, const char **argv)
header_prefix = "diff-tree ";
continue;
}
+ if (!strncmp(arg, "--pretty", 8)) {
+ verbose_header = 1;
+ commit_format = get_commit_format(arg+8);
+ continue;
+ }
if (!strcmp(arg, "--stdin")) {
read_stdin = 1;
continue;
Compilation finished at Sun Jun 12 17:39:24
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-06-13 0:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-12 9:34 git-whatchanged doesn't display date human understandable Thomas Glanzmann
2005-06-13 0:44 ` [PATCH] Support commit_format fully in diff-tree Junio C Hamano
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).