PBWebChanges: Allow discarding of hunks

This enables a "discard" button for unstaged hunks which simply gets rid of the
changes (by using "git apply --reverse").

To avoid repetition, the stageHunk method was split into a more generic
processHunk method. The "discard" functionality is called through
discardHunk.

The NSAlert shown when discarding can be bypassed by pressing "Alt"
while clicking the discard-button.

Signed-off-by: Johannes Gilger <heipei@hackvalue.de>
This commit is contained in:
Johannes Gilger
2009-05-29 14:08:35 +02:00
committed by Pieter de Bie
parent 76f1469f52
commit 7b6393570f
5 changed files with 73 additions and 9 deletions
+3 -2
View File
@@ -60,11 +60,12 @@ table.diff {
float: right;
}
.diff a.stagebutton {
.diff a.hunkbutton {
width: 40px;
padding: 0 2px 0 2px;
margin-bottom: 4px;
margin-right: 10px;
margin-right: 1px;
float: right;
border: 1px solid #3465a4;
background-color: #cce5ff;