mirror of
https://gitlab.gnome.org/GNOME/gitg
synced 2024-10-02 14:13:48 +00:00
Fixed last issue with file being removed from the commit list when unstaging changes in a new file
This commit is contained in:
parent
80524bd4cc
commit
c7451a1815
|
@ -1396,7 +1396,6 @@ on_unstage_changes(GtkAction *action, GitgCommitView *view)
|
|||
return;
|
||||
|
||||
gitg_commit_unstage(view->priv->commit, file, NULL, NULL);
|
||||
g_object_unref(file);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -536,8 +536,13 @@ refresh_changes(GitgCommit *commit, GitgChangedFile *file)
|
|||
update_index_staged(commit, file);
|
||||
update_index_unstaged(commit, file);
|
||||
|
||||
GitgChangedFileChanges changes = gitg_changed_file_get_changes(file);
|
||||
|
||||
if (changes == GITG_CHANGED_FILE_CHANGES_NONE)
|
||||
gitg_changed_file_set_status(file, GITG_CHANGED_FILE_STATUS_NEW);
|
||||
|
||||
if (gitg_changed_file_get_status(file) == GITG_CHANGED_FILE_STATUS_NEW &&
|
||||
!(gitg_changed_file_get_changes(file) & GITG_CHANGED_FILE_CHANGES_CACHED))
|
||||
!(changes & GITG_CHANGED_FILE_CHANGES_CACHED))
|
||||
{
|
||||
gitg_changed_file_set_changes(file, GITG_CHANGED_FILE_CHANGES_UNSTAGED);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue