diff options
author | Lars Hjemli | 2007-05-14 11:10:59 +0200 |
---|---|---|
committer | Lars Hjemli | 2007-05-14 11:13:18 +0200 |
commit | 9fb53af215639fcd3bfb876fa9c8bac221244bdf (patch) | |
tree | 3ebbebebed59b53066e16720a32e1b34c54dc609 /ui-log.c | |
parent | 4fdf571c888fd38ae362684c429a3bdf24240ef7 (diff) | |
download | cgit-9fb53af215639fcd3bfb876fa9c8bac221244bdf.tar.gz cgit-9fb53af215639fcd3bfb876fa9c8bac221244bdf.tar.bz2 cgit-9fb53af215639fcd3bfb876fa9c8bac221244bdf.zip |
Add log filtering by path and link to it from tree view
This enables path-filtering in log-view, and adds a link per entry in
tree-view to show the log for each file/directory.
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Diffstat (limited to 'ui-log.c')
-rw-r--r-- | ui-log.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -53,16 +53,20 @@ void print_commit(struct commit *commit) | |||
53 | } | 53 | } |
54 | 54 | ||
55 | 55 | ||
56 | void cgit_print_log(const char *tip, int ofs, int cnt, char *grep) | 56 | void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *path) |
57 | { | 57 | { |
58 | struct rev_info rev; | 58 | struct rev_info rev; |
59 | struct commit *commit; | 59 | struct commit *commit; |
60 | const char *argv[3] = {NULL, tip, NULL}; | 60 | const char *argv[] = {NULL, tip, NULL, NULL, NULL}; |
61 | int argc = 2; | 61 | int argc = 2; |
62 | int i; | 62 | int i; |
63 | 63 | ||
64 | if (grep) | 64 | if (grep) |
65 | argv[argc++] = fmt("--grep=%s", grep); | 65 | argv[argc++] = fmt("--grep=%s", grep); |
66 | if (path) { | ||
67 | argv[argc++] = "--"; | ||
68 | argv[argc++] = path; | ||
69 | } | ||
66 | init_revisions(&rev, NULL); | 70 | init_revisions(&rev, NULL); |
67 | rev.abbrev = DEFAULT_ABBREV; | 71 | rev.abbrev = DEFAULT_ABBREV; |
68 | rev.commit_format = CMIT_FMT_DEFAULT; | 72 | rev.commit_format = CMIT_FMT_DEFAULT; |