diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-06-27 14:37:55 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-06-27 14:37:56 -0700 |
commit | a0bf40ddc94d8ec57c2422b29ba82f3450211300 (patch) | |
tree | 830f20f92ef7463a1a0b539d36c9afb828237de4 /combine-diff.c | |
parent | 81de16a5d5d1efffb472eac9d2a7f373cdcd906b (diff) | |
parent | aac385717a62bfa6889151d191e08b9725587912 (diff) | |
download | git-a0bf40ddc94d8ec57c2422b29ba82f3450211300.tar.gz git-a0bf40ddc94d8ec57c2422b29ba82f3450211300.tar.xz |
Merge branch 'mk/combine-diff-context-horizon-fix' into maint
* mk/combine-diff-context-horizon-fix:
combine-diff.c: Fix output when changes are exactly 3 lines apart
Diffstat (limited to 'combine-diff.c')
-rw-r--r-- | combine-diff.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/combine-diff.c b/combine-diff.c index 77d7872aa..3e8bb1783 100644 --- a/combine-diff.c +++ b/combine-diff.c @@ -518,8 +518,11 @@ static int give_context(struct sline *sline, unsigned long cnt, int num_parent) unsigned long k; /* Paint a few lines before the first interesting line. */ - while (j < i) - sline[j++].flag |= mark | no_pre_delete; + while (j < i) { + if (!(sline[j].flag & mark)) + sline[j].flag |= no_pre_delete; + sline[j++].flag |= mark; + } again: /* we know up to i is to be included. where does the |