summaryrefslogtreecommitdiff
path: root/git-gui/lib/diff.tcl
diff options
context:
space:
mode:
authorJohannes Sixt <johannes.sixt@telecom.at>2008-06-27 07:22:01 (GMT)
committerShawn O. Pearce <spearce@spearce.org>2008-07-02 05:06:38 (GMT)
commit5821988f97b827f6ba81dfeebff932067c88ba6c (patch)
treef12d10aef8c33298e95b6a7234d7732509833571 /git-gui/lib/diff.tcl
parentf531e463f0471ce41c51e19074a118482f36910f (diff)
downloadgit-5821988f97b827f6ba81dfeebff932067c88ba6c.zip
git-5821988f97b827f6ba81dfeebff932067c88ba6c.tar.gz
git-5821988f97b827f6ba81dfeebff932067c88ba6c.tar.bz2
git-gui: Implement "Stage/Unstage Line"
This adds a context menu entry below "Stage/Unstage Hunk" that stages or unstages just the line under the mouse pointer. This is by itself useful, for example, if there are unrelated changes in the same hunk and the hunk cannot be split by reducing the context. The feature can also be used to split a hunk by staging a number of additions (or unstaging a number of removals) until there are enough context lines that the hunk gets split. The implementation reads the complete hunk that the line lives in, and constructs a new hunk by picking existing context lines, removing unneeded change lines and transforming other change lines to context lines. The resulting hunk is fed through 'git apply' just like in the "Stage/Unstage Hunk" case. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'git-gui/lib/diff.tcl')
0 files changed, 0 insertions, 0 deletions