parse commit marks more leniently
commit48552c52e6c6ce57a371fb5e9a697945a8e27985
authorJeff King <peff@peff.net>
Tue, 29 Oct 2013 21:02:02 +0000 (29 17:02 -0400)
committerJeff King <peff@peff.net>
Tue, 29 Oct 2013 21:45:58 +0000 (29 17:45 -0400)
treea8a91633c8dda0904a5e656a421a0f597ab6b003
parentbc911786d75680d0fa28ac81c846775f6a7c894f
parse commit marks more leniently

Older versions of git-log would print marked commits (like
boundary commits) like this:

  commit -bc911786d75680d0fa28ac81c846775f6a7c894f

However, since git v1.7.5, it now outputs:

  commit - bc911786d75680d0fa28ac81c846775f6a7c894f

As a result, we pass the extra space into `main_register_commit`,
which ends up copying the null sha1 as the commit id. As a result,
we would fail to match it with a later call to `main_add_commit`,
and would omit the marked commit from the graph.

Since we do not know which git version we are using, let's cover
both cases by simply skipping past any non-alphanumeric content,
including spaces and marks, which should put as at the commit id.

Note that we can just drop the "is_boundary" check in our loop,
as it is only a special case of "!isalnum". We need the latter to
also move past --left-right marks.
tig.c