Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
notes: avoid leaking duplicate entries
[gitweb.git]
/
git-add--interactive.perl
diff --git
a/git-add--interactive.perl
b/git-add--interactive.perl
index 20eb81cc92f947d872b31a179d43d97772ff25e4..da5b4ec4bc50e4e3adaba0f25820262b6a7436a0 100755
(executable)
--- a/
git-add--interactive.perl
+++ b/
git-add--interactive.perl
@@
-972,7
+972,11
@@
sub coalesce_overlapping_hunks {
next;
}
if ($ofs_delta) {
- $n_ofs += $ofs_delta;
+ if ($patch_mode_flavour{IS_REVERSE}) {
+ $o_ofs -= $ofs_delta;
+ } else {
+ $n_ofs += $ofs_delta;
+ }
$_->{TEXT}->[0] = format_hunk_header($o_ofs, $o_cnt,
$n_ofs, $n_cnt);
}