author | Shawn O. Pearce <spearce@spearce.org> | |
Sun, 2 Sep 2007 19:38:04 +0000 (15:38 -0400) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Tue, 4 Sep 2007 03:03:52 +0000 (23:03 -0400) | ||
commit | 047d94d505c9837a60c28e121de65471dadce74b | |
tree | d6014afc11bc18746fb5207edb4744fca5084cd9 | tree | snapshot |
parent | 881d8f24cab5bf4e0fa71b17a3ab82e27b2e8ed7 | commit | diff |
git-gui: Properly set the state of "Stage/Unstage Hunk" action
Today I found yet another way for the "Stage Hunk" and "Unstage
Hunk" context menu actions to leave the wrong state enabled in
the UI. The problem this time was that I connected the state
determination to the value of $::current_diff_side (the side the
diff is from). When the user was last looking at a diff from the
index side and unstages everything the diff panel goes empty, but
the action stayed enabled as we always assumed unstaging was a
valid action.
This change moves the logic for determining when the action is
enabled away from the individual side selection, as they really
are two unrelated concepts.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Today I found yet another way for the "Stage Hunk" and "Unstage
Hunk" context menu actions to leave the wrong state enabled in
the UI. The problem this time was that I connected the state
determination to the value of $::current_diff_side (the side the
diff is from). When the user was last looking at a diff from the
index side and unstages everything the diff panel goes empty, but
the action stayed enabled as we always assumed unstaging was a
valid action.
This change moves the logic for determining when the action is
enabled away from the individual side selection, as they really
are two unrelated concepts.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
git-gui.sh | diff | blob | history |