From: git@jeffhostetler.com Date: Wed, 08 Mar 2017 18:50:30 GMT Subject: [PATCH 01/10] pack-objects: eat CR in addition to LF after fgets. Message-ID: <1488999039-37631-2-git-send-email-git@jeffhostetler.com> In-Reply-To: <1488999039-37631-1-git-send-email-git@jeffhostetler.com> From: Jeff Hostetler Signed-off-by: Jeff Hostetler --- builtin/pack-objects.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c index f294dcf..7e052bb 100644 --- a/builtin/pack-objects.c +++ b/builtin/pack-objects.c @@ -2764,6 +2764,8 @@ static void get_object_list(int ac, const char **av) int len = strlen(line); if (len && line[len - 1] == '\n') line[--len] = 0; + if (len && line[len - 1] == '\r') + line[--len] = 0; if (!len) break; if (*line == '-') { -- 2.7.4