From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Adam Simpkins <adam@adamsimpkins.net>, git@vger.kernel.org
Subject: [PATCH] graph.c: fix padding
Date: Wed, 14 May 2008 15:22:38 +0100 (BST) [thread overview]
Message-ID: <alpine.DEB.1.00.0805141522060.30431@racer> (raw)
There were two instances of "%*s" which want to be "%.*s" instead.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
graph.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/graph.c b/graph.c
index 9d6ed30..f3e2eed 100644
--- a/graph.c
+++ b/graph.c
@@ -422,7 +422,7 @@ static void graph_pad_horizontally(struct git_graph *graph, struct strbuf *sb)
return;
extra = graph->width - sb->len;
- strbuf_addf(sb, "%*s", (int) extra, "");
+ strbuf_addf(sb, "%.*s", (int) extra, "");
}
static void graph_output_padding_line(struct git_graph *graph,
@@ -496,7 +496,7 @@ static void graph_output_pre_commit_line(struct git_graph *graph,
struct column *col = &graph->columns[i];
if (col->commit == graph->commit) {
seen_this = 1;
- strbuf_addf(sb, "| %*s", graph->expansion_row, "");
+ strbuf_addf(sb, "| %.*s", graph->expansion_row, "");
} else if (seen_this) {
strbuf_addstr(sb, "\\ ");
} else {
--
1.5.5.1.375.g1becb
next reply other threads:[~2008-05-14 14:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-14 14:22 Johannes Schindelin [this message]
2008-05-15 8:50 ` [PATCH] graph.c: fix padding Johannes Schindelin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.1.00.0805141522060.30431@racer \
--to=johannes.schindelin@gmx.de \
--cc=adam@adamsimpkins.net \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox