aboutsummaryrefslogtreecommitdiffstats
path: root/stagit-index.c
diff options
context:
space:
mode:
authorHiltjo Posthuma <[email protected]>2016-01-05 21:41:03 +0100
committerHiltjo Posthuma <[email protected]>2016-01-05 21:41:03 +0100
commitf17def25bed839664b3242b5f31792d3aa1f53c6 (patch)
treef62f2705477483cde69ff04a1554b5c93351671b /stagit-index.c
parent289ecda4aa8688b65300ae647912d791246e4abd (diff)
downloadstagit-f17def25bed839664b3242b5f31792d3aa1f53c6.tar.gz
stagit-f17def25bed839664b3242b5f31792d3aa1f53c6.zip
stagit-index: owner is one line, strip newline
Diffstat (limited to '')
-rw-r--r--stagit-index.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/stagit-index.c b/stagit-index.c
index 356f08c..7eb74ea 100644
--- a/stagit-index.c
+++ b/stagit-index.c
@@ -221,6 +221,7 @@ main(int argc, char *argv[])
if (fp) {
if (!fgets(owner, sizeof(owner), fp))
owner[0] = '\0';
+ owner[strcspn(owner, "\n")] = '\0';
fclose(fp);
}
writelog(stdout);