-
Notifications
You must be signed in to change notification settings - Fork 2.4k
txtar: handle crlf line endings #595
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
txtar: handle crlf line endings #595
Conversation
3c0fd10 to
c4ff229
Compare
|
This PR (HEAD: c4ff229) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/tools/+/706676. Important tips:
|
|
Message from Gopher Robot: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/706676. |
c4ff229 to
111e911
Compare
|
This PR (HEAD: 111e911) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/tools/+/706676. Important tips:
|
111e911 to
dc8e29d
Compare
|
This PR (HEAD: dc8e29d) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/tools/+/706676. Important tips:
|
|
Message from Paško Zdilar: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/706676. |
dc8e29d to
336ddb7
Compare
|
This PR (HEAD: 336ddb7) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/tools/+/706676. Important tips:
|
|
Message from Sean Liao: Patch Set 4: Code-Review+1 Commit-Queue+1 (3 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/706676. |
|
Message from Go LUCI: Patch Set 4: Dry run: CV is trying the patch. Bot data: {"action":"start","triggered_at":"2025-09-28T19:12:13Z","revision":"6bdb8cd44bcd04cf1ba3bdd63608d24542c100ba"} Please don’t reply on this GitHub thread. Visit golang.org/cl/706676. |
|
Message from Sean Liao: Patch Set 4: -Commit-Queue Please don’t reply on this GitHub thread. Visit golang.org/cl/706676. |
|
Message from Go LUCI: Patch Set 4: This CL has passed the run Please don’t reply on this GitHub thread. Visit golang.org/cl/706676. |
|
Message from Go LUCI: Patch Set 4: LUCI-TryBot-Result+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/706676. |
Function isMarker detects a file marker line by checking if the data before the first '\n' has a marker prefix and suffix. In the case of CRLF line endings, the data before the first '\n' ends with '\r', so the suffix check fails. Here, '\r' is trimmed before checking the suffix. Fixes golang/go#59264.
336ddb7 to
69a9348
Compare
|
This PR (HEAD: 69a9348) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/tools/+/706676. Important tips:
|
|
Message from Paško Zdilar: Patch Set 5: (3 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/706676. |
|
Message from Sean Liao: Patch Set 5: Auto-Submit+1 Code-Review+2 Please don’t reply on this GitHub thread. Visit golang.org/cl/706676. |
|
Message from Michael Matloob: Patch Set 5: Code-Review+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/706676. |
|
Message from Michael Matloob: Patch Set 5: Code-Review+2 Please don’t reply on this GitHub thread. Visit golang.org/cl/706676. |
Function isMarker detects a file marker line by checking if the data before the first '\n' has a marker prefix and suffix. In the case of CRLF line endings, the data before the first '\n' ends with '\r', so the suffix check fails. Here, '\r' is trimmed before checking the suffix. Fixes golang/go#59264. Change-Id: I030357915abaa61f492b9d3d81a7edbd5d09d78e GitHub-Last-Rev: 69a9348 GitHub-Pull-Request: #595 Reviewed-on: https://go-review.googlesource.com/c/tools/+/706676 Reviewed-by: Sean Liao <sean@liao.dev> Reviewed-by: Michael Matloob <matloob@golang.org> Auto-Submit: Sean Liao <sean@liao.dev> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Michael Matloob <matloob@google.com> Reviewed-by: Carlos Amedee <carlos@golang.org>
|
This PR is being closed because golang.org/cl/706676 has been merged. |
Function isMarker detects a file marker line by checking if the data before
the first '\n' has a marker prefix and suffix.
In the case of CRLF line endings, the data before the first '\n' ends with
'\r', so the suffix check fails.
Here, '\r' is trimmed before checking the suffix.
Fixes golang/go#59264.