Staging
v0.5.1
v0.5.1
Revision 4e27fb06f0fe4206606172f94a18e08d7d87c070 authored by Nicolas Pitre on 06 October 2006, 19:39:09 UTC, committed by Junio C Hamano on 10 October 2006, 03:23:09 UTC
This patch does 3 things: 1) Output the number of commits along with the name for each author (nice to know for long lists spending more than a screen worth of commit lines). 2) Provide a switch (-n) to sort authors according to their number of commits instead of author alphabetic order. 3) Provide a switch (-s) to supress commit lines and only keep a summary of authors and the number of commits for each of them. And for good measure a short usage is displayed with -h. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
1 parent 96779be
builtin-runstatus.c
#include "wt-status.h"
#include "cache.h"
extern int wt_status_use_color;
static const char runstatus_usage[] =
"git-runstatus [--color|--nocolor] [--amend] [--verbose]";
int cmd_runstatus(int argc, const char **argv, const char *prefix)
{
struct wt_status s;
int i;
git_config(git_status_config);
wt_status_prepare(&s);
for (i = 1; i < argc; i++) {
if (!strcmp(argv[i], "--color"))
wt_status_use_color = 1;
else if (!strcmp(argv[i], "--nocolor"))
wt_status_use_color = 0;
else if (!strcmp(argv[i], "--amend")) {
s.amend = 1;
s.reference = "HEAD^1";
}
else if (!strcmp(argv[i], "--verbose"))
s.verbose = 1;
else if (!strcmp(argv[i], "--untracked"))
s.untracked = 1;
else
usage(runstatus_usage);
}
wt_status_print(&s);
return s.commitable ? 0 : 1;
}
Computing file changes ...