1
0
mirror of git://projects.qi-hardware.com/eda-tools.git synced 2024-11-05 03:38:05 +02:00

eeshow/gui.c: limit = 0 means "no limit", not "no revisions"

This commit is contained in:
Werner Almesberger 2016-08-12 10:42:03 -03:00
parent 62ca12c2da
commit d1fdcaeab4
2 changed files with 4 additions and 3 deletions

View File

@ -1234,7 +1234,8 @@ static void add_hist(void *user, struct hist *h)
if (!ahc->limit)
return;
ahc->limit--;
if (ahc->limit > 0)
ahc->limit--;
prev = NULL;
for (anchor = &ctx->hist; *anchor; anchor = &(*anchor)->next) {
@ -1263,7 +1264,7 @@ static void get_revisions(struct gui_ctx *ctx,
.n_args = n_args,
.args = args,
.recurse = recurse,
.limit = limit < 0 ? -limit : limit,
.limit = limit ? limit < 0 ? -limit : limit : -1,
};
if (!vcs_git_try(sch_name)) {

View File

@ -56,7 +56,7 @@ void usage(const char *name)
" -v increase verbosity of diagnostic output\n"
" -C 'cat' the file to standard output\n"
" -H show history of repository on standard output\n"
" -N n limit history to n revisions\n"
" -N n limit history to n revisions (unlimited if omitted or 0)\n"
"\n"
"No driver spec: enter GUI\n"
"\n"