From 021f4543917db759f69def2e275c8634efac6208 Mon Sep 17 00:00:00 2001 From: "Kyle J. McKay" Date: Fri, 16 Feb 2018 20:38:27 -0800 Subject: [PATCH] topgit_deps.awk: strip trailing \r off .topdeps lines If, somehow, the .topdeps file ends up with \r\n line endings in it then awk will not strip that \r and the branch name will be considered invalid because it contains invalid characters. Tolerate this situation by stripping up to one and only one trailing \r from the end of the branch name field. Signed-off-by: Kyle J. McKay --- awk/topgit_deps.awk | 1 + 1 file changed, 1 insertion(+) diff --git a/awk/topgit_deps.awk b/awk/topgit_deps.awk index cd2b306..a42f140 100644 --- a/awk/topgit_deps.awk +++ b/awk/topgit_deps.awk @@ -140,6 +140,7 @@ NF == 3 && $2 != "missing" && $1 != "" && $2 ~ /^[0-9]+$/ && validbr($3) { err = 0 while (curlen < datalen && (err = getline) > 0) { curlen += length($0) + 1 + sub(/\r$/, "", $1) if (NF != 1 || $1 == "" || !validbr($1)) continue if (!isann && !ann[$1] && included($1) && wanted($1)) { if (rev) -- 2.11.4.GIT