When unstaging the last cached hunk of a file, the file remained in the
"Staged Changes" column, with the notice "This file has no more changes"
and the "Unstage"-button remaining in the diff-view.
This fixes this behaviour by correctly distinguishing files in the
files-array not only by filename but also by unstaged/cached status,
s.t. for a file with unstaged and cached changes, there are two entries
in the files-array.
Signed-off-by: Johannes Gilger <heipei@hackvalue.de>
We used to change the PBFile status every time we found a
similarly named file. Because the unstagedFilesController
had a filter and sort predicate for these, the array was
rearranged every time an existing file was found. This quickly
leads to stalling.
We fix it by temporarily disabling the automatic rearranging
and then reenabling it when we're finished.
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 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.
This merges functionality that was previously stored in the
combination of PBGitCommitController / PBChangedFile to a
dedicated controller, PBGitIndexController.
This adds a div in the webview to display the current commit
state. It allows us to notify the user of new commits by
showing something in the webview, rather than a modal
dialog.
e2210f7306e4c1647ff068f660db1674ce0391e1 (CommitView: Add a better reflog entry)
created a bug where an exception was thrown if you enter a one-lined commit
message.
This adds an entry in the form of
commit: CommitView: Add a better reflog entry
to the reflog upon commit, rather than
Commit from GitX
which isn't very informative