This restores the "Revert Changes.." functionality
that was removed when changing the file list stuff.
It's now possible to revert multiple files. Also, it
now uses 'git checkout-index', which should be a bit
more robust.
We used to read in a completely new array when refreshing
the index. The problem with this is that the selection
changes when reading in the new array. We avoid this
by changing the current array, rather than loading in
a completely new one.
We used to output a line for every lane after the
lane in which the current commit is in, and also
make it have the wrong color. This fixes the buglet
and also makes sure not to draw a line when
the commit has no parents.
This was somewhat unfortunate, as we don't check
on if we have at least a single parent when adding
new parents. That would cause a wild pointer, or null
dereference when creating a new lane.
We previously used some cool git syntax to display changes in the index.
The unfortunate side-effect of this was that the diff headers weren't correct,
so the unstage button didn't work anymore.
Seems like File.copy doesn't do directories (as source, that is),
only files (as far as I can tell from reading the docs and trying
it in irb, punch me if I'm wrong). It only creates a zero byte file
in the target directory on my system.
Replaced File.copy with a system call to 'cp -R ...' to do the job.
Seems like FileUtils could have done it just as well (with cp_r),
but I figured making a system call was better than introducing a
new dependency.
This keeps the subviews in memory, which means that switching views will
be faster if a view has already been opened. This also allows you to type
a commit message, switch to the history view, and then switch back to
continue typing.
Previously, the diff hilighter was a bit odd in that it would
just search for elements with a diff and highlight those. While
useful in theory, this wasn't used at all. We change it to
receive the diff to hilight, which makes the code somewhat simpler.
A list of files included in a commit are listed below the
commit message. The list are links which will take you to
that file in the diff display below.
The title of each fileHeader is now just the path to the file
instead of the full diff command.
While the focus is in the commit ctrl-down_arrow and up_arrow
will navigate to to next and previous file in that commit.