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 | Merge branch 'kb/ancestry-path-threedots' into maint (diff) | |
parent | combine-diff.c: Fix output when changes are exactly 3 lines apart (diff) | |
download | tgif-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 77d7872aaf..3e8bb17831 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 |