return cmd_log_wc(ac, av, ep, &wcopt);
}
+static int cmd_show(int ac, const char **av, char **ep)
+{
+ struct whatchanged_opt wcopt;
+
+ memset(&wcopt, 0, sizeof(wcopt));
+ wcopt.do_diff = 1;
+ init_log_tree_opt(&wcopt.logopt);
+ wcopt.logopt.ignore_merges = 0;
+ wcopt.logopt.combine_merges = 1;
+ wcopt.logopt.dense_combined_merges = 1;
+ wcopt.logopt.diffopt.recursive = 1;
+ return cmd_log_wc(ac, av, ep, &wcopt);
+}
+
static void handle_internal_command(int argc, const char **argv, char **envp)
{
const char *cmd = argv[0];
{ "version", cmd_version },
{ "help", cmd_help },
{ "log", cmd_log },
+ { "show", cmd_show },
{ "whatchanged", cmd_whatchanged },
};
int i;
int left = 1;
ac = setup_revisions(ac, av, rev, "HEAD");
+ if (!strcmp(av[0], "show"))
+ rev->no_walk = 1;
while (1 < ac) {
const char *arg = av[1];
if (!strncmp(arg, "--pretty", 8)) {
if (revs->prune_fn)
revs->prune_fn(revs, commit);
+ if (revs->no_walk)
+ return;
+
parent = commit->parents;
while (parent) {
struct commit *p = parent->item;
void prepare_revision_walk(struct rev_info *revs)
{
+ if (revs->no_walk)
+ return;
sort_by_date(&revs->commits);
if (revs->limited)
limit_list(revs);