git-commit-vandalism/lib
Johannes Sixt fa6b5b3944 git-gui: Fix "Stage/Unstage Line" with one line of context.
To "Stage/Unstage Line" we construct a patch that contains exactly one
change (either addition or removal); the hunk header was forged by counting
the old side and adjusting the count by +/-1 for the new side. But when we
counted the context we never counted the changed line itself. If the hunk
had only one removal line and one line of context, like this:

    @@ -1,3 +1,2 @@
     context 1
    -removal
     context 2

We had constructed this patch:

    @@ -1,2 +1,1 @@
     context 1
    -removal
     context 2

which does not apply because git apply deduces that it must apply at the
end of the file. ("context 2" is considered garbage and ignored.) The fix
is that removal lines must be counted towards the context of the old side.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-07-26 16:43:08 -07:00
..
about.tcl git-gui: Ensure all spellchecker 'class' variables are initialized 2008-02-21 00:22:06 -05:00
blame.tcl Add a menu item to invoke full copy detection in blame. 2008-07-16 22:09:28 -04:00
branch_checkout.tcl Mark strings for translation. 2007-09-02 16:54:48 +01:00
branch_create.tcl git-gui: Setup branch.remote,merge for shorthand git-pull 2008-05-08 20:20:27 -04:00
branch_delete.tcl git-gui: Delete branches with 'git branch -D' to clear config 2008-05-08 20:29:42 -04:00
branch_rename.tcl git-gui: Paper bag fix missing translated strings 2007-09-14 01:51:18 -04:00
branch.tcl git-gui: Always use absolute path to all git executables 2007-07-09 01:17:09 -04:00
browser.tcl git-gui: if a background colour is set, set foreground colour as well 2008-03-05 23:47:11 -05:00
checkout_op.tcl git-gui: Setup branch.remote,merge for shorthand git-pull 2008-05-08 20:20:27 -04:00
choose_font.tcl git-gui: if a background colour is set, set foreground colour as well 2008-03-05 23:47:11 -05:00
choose_repository.tcl git-gui: Vertically align textboxes with labels 2008-05-26 21:05:20 -04:00
choose_rev.tcl git-gui: Work around random missing scrollbar in revision list 2008-01-22 23:37:15 -05:00
class.tcl git-gui: Fix window manager problems on ion3 2007-08-20 00:38:13 -04:00
commit.tcl git-gui: (i18n) Fix a bunch of still untranslated strings. 2008-02-03 21:25:29 -05:00
console.tcl git-gui: if a background colour is set, set foreground colour as well 2008-03-05 23:47:11 -05:00
database.tcl git-gui: Report less precise object estimates for database compression 2008-04-14 19:34:23 -04:00
date.tcl git-gui: Localize commit/author dates when displaying them 2007-09-10 01:54:16 -04:00
diff.tcl git-gui: Fix "Stage/Unstage Line" with one line of context. 2008-07-26 16:43:08 -07:00
encoding.tcl git-gui: Translate standard encoding names to Tcl ones 2007-07-19 01:27:17 -04:00
error.tcl git-gui: if a background colour is set, set foreground colour as well 2008-03-05 23:47:11 -05:00
git-gui.ico git-gui: Improve the application icon on Windows. 2007-12-02 23:05:10 -05:00
index.tcl git-gui: (i18n) Fix a bunch of still untranslated strings. 2008-02-03 21:25:29 -05:00
logo.tcl git-gui: Refactor Henrik Nyh's logo into its own procedure 2007-10-10 01:12:15 -04:00
merge.tcl git-gui: MERGE_RR lives in .git/ directly with newer Git versions 2008-07-13 17:58:40 -04:00
option.tcl Add options to control the search for copies in blame. 2008-07-16 22:09:28 -04:00
remote_branch_delete.tcl git-gui: add some strings to translation 2007-09-13 20:43:26 -04:00
remote.tcl git-gui: Consolidate the Fetch and Push menus into a Remote menu 2007-10-10 01:12:17 -04:00
shortcut.tcl git-gui: Use proper Windows shortcuts instead of bat files 2007-10-12 23:07:58 -04:00
spellcheck.tcl git-gui: Don't use '$$cr master' with aspell earlier than 0.60 2008-04-23 21:34:58 -04:00
status_bar.tcl Merge branch 'maint' 2007-10-20 20:43:36 -04:00
transport.tcl git-gui: Allow forced push into remote repository 2007-10-03 00:21:50 -04:00
win32_shortcut.js git-gui: Use proper Windows shortcuts instead of bat files 2007-10-12 23:07:58 -04:00
win32.tcl git-gui: Use proper Windows shortcuts instead of bat files 2007-10-12 23:07:58 -04:00