[PR #110] [MERGED] Fix tree entry parsing #113

Closed
opened 2026-02-16 10:24:09 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-gitea/git/pull/110
Author: @ethantkoenig
Created: 2/8/2018
Status: Merged
Merged: 2/9/2018
Merged by: @lunny

Base: masterHead: fix/parse


📝 Commits (3)

📊 Changes

3 files changed (+140 additions, -82 deletions)

View changed files

parse.go (+81 -0)
parse_test.go (+58 -0)
📝 tree.go (+1 -82)

📄 Description

Fixes the parsing of filenames with escaped characters, which did not previously handled escaped characters such as \n correctly. Also adds unit tests.

This PR also exposes the parsing functionality as public, so that it can be reused (see https://github.com/go-gitea/gitea/blob/a89592d4abfef01e68e3c53a3cdb3846b03abd2b/models/repo_indexer.go#L234)


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-gitea/git/pull/110 **Author:** [@ethantkoenig](https://github.com/ethantkoenig) **Created:** 2/8/2018 **Status:** ✅ Merged **Merged:** 2/9/2018 **Merged by:** [@lunny](https://github.com/lunny) **Base:** `master` ← **Head:** `fix/parse` --- ### 📝 Commits (3) - [`34f6977`](https://github.com/go-gitea/git/commit/34f69770a2703272c18deb7bdf80038b5c47945e) Fix tree entry parsing - [`515c084`](https://github.com/go-gitea/git/commit/515c08456614388eea759a55d41d6511aa5fdcef) nits - [`d999b86`](https://github.com/go-gitea/git/commit/d999b86b72e1bd4db14d2fa1d0563fdf357ca06a) populate TreeEntry.ptree ### 📊 Changes **3 files changed** (+140 additions, -82 deletions) <details> <summary>View changed files</summary> ➕ `parse.go` (+81 -0) ➕ `parse_test.go` (+58 -0) 📝 `tree.go` (+1 -82) </details> ### 📄 Description Fixes the parsing of filenames with escaped characters, which did not previously handled escaped characters such as `\n` correctly. Also adds unit tests. This PR also exposes the parsing functionality as public, so that it can be reused (see https://github.com/go-gitea/gitea/blob/a89592d4abfef01e68e3c53a3cdb3846b03abd2b/models/repo_indexer.go#L234) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 10:24:09 -05:00
yindo closed this issue 2026-02-16 10:24:09 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: go-gitea/git#113