diff --git a/stagit.c b/stagit.c index 9527b01..3693efe 100644 --- a/stagit.c +++ b/stagit.c @@ -1008,6 +1008,7 @@ main(int argc, char *argv[]) if (fpread) { if (!fgets(cloneurl, sizeof(cloneurl), fpread)) cloneurl[0] = '\0'; + cloneurl[strcspn(cloneurl, "\n")] = '\0'; fclose(fpread); }