autogen.sh: Set WARNINGS in a more portable fashion
Don't call string_copy_rev() on empty string

graph_expand() calls graph_insert_column() with the empty string as id,
which in turns leads to string_copy_rev() reading outside the allowed
memory area looking for whitespace.

To avoid this, don't call string_copy_rev() if we know the string is
empty anyway.

Signed-off-by: Romain Francoise <romain@orebokech.com>

Moved the check to string_copy_rev().

Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Reload current branch name when reloading the stage view.

Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Don't clear the status/report line when finishing a piped update

This appears to be no longer necessary, and a hold over from when
updates were more verbose at the start of and during processing and
needed to be cleared when finished (refer to f97f401).

More importantly, the call to report_clear() when the view is done
updating can hide status messages from the beginning of the update which
should remain visible past the end (until some other action clears the
status line).

Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Report toggled option *after* refreshing/reloading the view

This ensures that the report is remains visible in all cases, rather
than immediately being cleared in some cases.  In particular, toggling
the diff whitespace behaviour (with W) no longer leaves you unsure of
the current state.

[ Changed to keep redraw logic in view_driver() ]

Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Added configure

Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Main view: fix diff view display for staged/unstaged changes

Shows actual diff of stage/unstaged state instead of just a blank diff
with "[diff] 0000000000000000000000000000000000000000" in the status
bar.

[ Set flags depending on whether the diff view is requested ]

Signed-off-by: Jonas Fonseca <fonseca@diku.dk>