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.
graph: uncomment is_boundary propagation

This code came into being commented out in 607cfb1 (Rewrite
the revision graph renderer, 2009-12-11), but it is not
clear why (perhaps because of the s/->/./ compile error, and
was meant to be looked at later?).

As a result, we would lose the is_boundary flag, leading to
them being displayed as normal commits.  Probably nobody
noticed, though, because boundary commits were otherwise
broken until the previous commit.
Add "auto" vertical-split

This patch adds a new option to control the vertical split.
If the value of the "vertical-split" option is set to "auto" (which is
the default behavior as of this commit), Tig will choose either vertical
or horizontal split depending on the window size.

Forcing the "vertical-split" option to "yes" or "no" naturally disables
the auto feature.

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Fix issue with creation of .deps directory after upgrade to Mac OS 10.9

Executing `mkdir .deps/.` gives the error message:

	mkdir: .deps/.: No such file or directory

... so use $(abspath ...) to remove the ending '.'.
Align the view scroll percentage to the right

This also rewrites update_view_title to output directly instead of using
buffers.
Add toggle=vertical=split action to dynamically change the split orientation
Fix diff stat hightlighting for files with no changes

Fixes #215
Fix run request ID offset to never conflict with internal request IDs

They were offset from REQ_NONE after which internal request IDs are
defined.
Add mouse support
Fix diff stat highlighting of file with no changes

This fixes the case where there are files with 10 or more lines of changes
as pointed out by @majutsushi in #215.

  test1.txt |    0
  test2.txt | 1236 +++++++++++++++++++++++++++++++++++++++++++++++++
Disable mouse support by default since it breaks copying text from the terminal
Actually disable mouse support

... and also improve docs slightly.
Fix off-by-one error for status code message lookup
Fix lookup of run requests

The change to use REQ_RUN_REQUESTS as the offset was not propagated to
the method doing the actual lookup. Only to the preliminary checks.
Add ZSH autocomplete compatibility

Backwards compatability in ZSH is described here
http://zshwiki.org/home/convert/bash. Most relevant is the line that
states ``To use it all you need to do is run bashcompinit at any time
after compinit. It will define complete and compgen functions
corresponding to the bash builtins.''

Tested with tig version 1.2.1 and ZSH version 5.0.2.

Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Rewrite much of the graph code

This patch reimplements much of the logic used to produce the graph in
the main view. A set of git log inputs and expected outputs was created
in test/test-graph-samples/, and a script to automatically evaluate
these examples was made in tools/unit-test-graph.sh. Please update these
samples if you find a new edge case or if you make changes to the
graphing code.

There are two aspects to the displayed graph which were not included in
this patch as the scope of the changes was deemed too large.

1. Commits that are both merge commits and branch points (or merge
commits and below a commit that is a branch point) can display a bit
ambiguously. The ideal fix for this is creating non-commit lines in the
main view when the graph is displayed. Example input and output can be
found in the samples folder.

2. Line colouring for lines crossing over other lines. Currently, each
pair of symbols (eg. '-|') shares a colour attribute. However, if the
two portions of the symbol are not connected, they should most likely
not share a colour. There are no unit tests implemented for this.

[ Minor include and configure.ac improvements. ]

Fixes #46
Fixes #144
Closes #240

Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Preprocess known toggleable options arguments in filter_options

This ensures that options defined in ~/.tigrc won't override arguments
passed on the command line. For example, `tig --date-order` will disable
reading of `commit-order` from ~/.tigrc.

Furthermore, toggling will now toggle based on what was passed on the
command line. For example, `tig --ignore-all-space` will toggle to
`--ignore-some-space`.
Disable graph drawing for reverse log order

Fixes #127
Parse -U argument and update internal diff context state
Pass arguments in filter_options()

Commit 80f9dff ("Parse -U argument and update internal diff context
state") accidently dropped the passing of arguments, breaking for
example calling tig with branch name as argument.

Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>