aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
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);