We used to unconditionally set the title of the branch
to the current branch. This worked fine in most cases
where the current branch was already known, but failed
when you use 'gitx -c' and then switch to the HistoryView,
because then the currentBranch isn't known yet.
The simple fix is to check if we know it. If we don't,
it'll be set later on.
This adds a slider in the commit view with
which the user can change the context size.
This is useful for example if the hunks are too
big; by changing the context size, a hunk can be
split and then the changes can be committed.
The message that the commit was succesful used to disappear
because after the commit, the index would refresh and another
file would be shown. We fix this by never requiring a file to be
selected.
We used to fall back on the ASCII encoding if UTF-8 did not work out. However,
this causes its own problems; ASCII is only valid for the lower 7 bytes. We
solve this by using Latin-1, which should have a valid character for every
byte sequence
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.