author | Shawn O. Pearce <spearce@spearce.org> | |
Tue, 21 Aug 2007 06:22:53 +0000 (02:22 -0400) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Tue, 21 Aug 2007 06:22:53 +0000 (02:22 -0400) | ||
commit | ce015c213fbef39140b6192db28110bc666dc6c8 | |
tree | d8f1ac62bf5e888da5307d6f604acafe4b7cc652 | tree | snapshot |
parent | 18a01a0da428c9e1034247e2b40c62e506b73580 | commit | diff |
git-gui: Paper bag fix "Stage Hunk For Commit" in diff context menu
In a13ee29b975d3a9a012983309e842d942b2bbd44 I totally broke the
"Stage Hunk For Commit" feature by making this menu item always
appear in a disabled state, so it was never invokable. A "teaser
feature", just sitting there taunting the poor user who has become
used to having it available.
The issue caused by a13ee was I added a test to look at the data
in $file_states, but I didn't do that test correctly as it was
always looking at a procedure local $file_states array, which is
not defined, so the test was always true and we always disabled
the menu entry.
Instead we only want to disable the menu entry if the current file
we are looking at has no file state information (git-gui is just a
very confused little process) or it is an untracked file (and we
cannot stage individual hunks).
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
In a13ee29b975d3a9a012983309e842d942b2bbd44 I totally broke the
"Stage Hunk For Commit" feature by making this menu item always
appear in a disabled state, so it was never invokable. A "teaser
feature", just sitting there taunting the poor user who has become
used to having it available.
The issue caused by a13ee was I added a test to look at the data
in $file_states, but I didn't do that test correctly as it was
always looking at a procedure local $file_states array, which is
not defined, so the test was always true and we always disabled
the menu entry.
Instead we only want to disable the menu entry if the current file
we are looking at has no file state information (git-gui is just a
very confused little process) or it is an untracked file (and we
cannot stage individual hunks).
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
git-gui.sh | diff | blob | history |