diff options
author | Russell Belfer <rb@github.com> | 2013-07-03 15:08:54 -0700 |
---|---|---|
committer | Vicent Marti <tanoku@gmail.com> | 2013-07-10 20:50:32 +0200 |
commit | 5a169711fa9875bc98c30c49b5e9ea06ebbbcfeb (patch) | |
tree | c3705bdd2bc4fdb7e321ee99690290fd34806884 /examples/log.c | |
parent | 2b3bd8ecd88a403f9d034aa3a4d1e14c5e904255 (diff) | |
download | libgit2-5a169711fa9875bc98c30c49b5e9ea06ebbbcfeb.tar.gz |
fix bug with order args and no revision
Diffstat (limited to 'examples/log.c')
-rw-r--r-- | examples/log.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/examples/log.c b/examples/log.c index 61b789263..f7aabf0b4 100644 --- a/examples/log.c +++ b/examples/log.c @@ -86,9 +86,12 @@ static int add_revision(struct log_state *s, const char *revstr) "Could not open repository", s->repodir); } - if (!revstr) + if (!revstr) { push_rev(s, NULL, hide); - else if (*revstr == '^') { + return 0; + } + + if (*revstr == '^') { revs.flags = GIT_REVPARSE_SINGLE; hide = !hide; if (!git_revparse_single(&revs.from, s->repo, revstr + 1)) |