summaryrefslogtreecommitdiff
path: root/lib/merge.tcl
diff options
context:
space:
mode:
authorLibravatar Johannes Sixt <johannes.sixt@telecom.at>2008-06-27 09:22:01 +0200
committerLibravatar Shawn O. Pearce <spearce@spearce.org>2008-07-02 01:06:38 -0400
commit5821988f97b827f6ba81dfeebff932067c88ba6c (patch)
treef12d10aef8c33298e95b6a7234d7732509833571 /lib/merge.tcl
parentgit-gui: Don't select the wrong file if the last listed file is staged. (diff)
downloadtgif-5821988f97b827f6ba81dfeebff932067c88ba6c.tar.xz
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 'lib/merge.tcl')
0 files changed, 0 insertions, 0 deletions