diff options
Diffstat (limited to 'diff-no-index.c')
-rw-r--r-- | diff-no-index.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/diff-no-index.c b/diff-no-index.c index 0320605a84..8e0fd270b5 100644 --- a/diff-no-index.c +++ b/diff-no-index.c @@ -136,15 +136,13 @@ static int queue_diff(struct diff_options *o, if (name1) { strbuf_addstr(&buffer1, name1); - if (buffer1.len && buffer1.buf[buffer1.len - 1] != '/') - strbuf_addch(&buffer1, '/'); + strbuf_complete(&buffer1, '/'); len1 = buffer1.len; } if (name2) { strbuf_addstr(&buffer2, name2); - if (buffer2.len && buffer2.buf[buffer2.len - 1] != '/') - strbuf_addch(&buffer2, '/'); + strbuf_complete(&buffer2, '/'); len2 = buffer2.len; } |