mirror of
https://github.com/go-gitea/git.git
synced 2026-07-25 04:35:24 -04:00
[PR #114] [MERGED] Added FollowLink() method to TreeEntry #120
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/go-gitea/git/pull/114
Author: @tf198
Created: 4/18/2018
Status: ✅ Merged
Merged: 4/19/2018
Merged by: @lafriks
Base:
master← Head:follow_links📝 Commits (3)
9b09ca2Added FollowLink() method to TreeEntry46f8f2fFixed lint warningb439e76Comment cleanup📊 Changes
16 files changed (+92 additions, -1 deletions)
View changed files
📝
error.go(+10 -0)➕
tests/repos/repo1_bare/objects/21/6bf54c2f2e2916b830ebe09e8c58a6ed52d86b(+0 -0)➕
tests/repos/repo1_bare/objects/50/13716a9da8e66ea21059a84f1b4311424d2b7f(+0 -0)➕
tests/repos/repo1_bare/objects/59/dfb0bb505a601006e31fed53d2e24e44fca9ca(+0 -0)➕
tests/repos/repo1_bare/objects/62/d735f9efa9cf5b7df6bac9917b80e4779f4315(+0 -0)➕
tests/repos/repo1_bare/objects/64/3a35374408002fcf2f0e8d42d262a1e0e2f80e(+0 -0)➕
tests/repos/repo1_bare/objects/6f/bd69e9823458e6c4a2fc5c0f6bc022b2f2acd1(+1 -0)➕
tests/repos/repo1_bare/objects/80/06ff9adbf0cb94da7dad9e537e53817f9fa5c0(+0 -0)➕
tests/repos/repo1_bare/objects/82/26f571dcc2d2f33a7179d929b10b9c39faa631(+0 -0)➕
tests/repos/repo1_bare/objects/98/1ff127cc331753bba28e1377c35934f1ca9b56(+0 -0)➕
tests/repos/repo1_bare/objects/b1/4df6442ea5a1b382985a6549b85d435376c351(+0 -0)➕
tests/repos/repo1_bare/objects/c8/c90111bdc18b3afd2b2906007059e95ac8fdc3(+0 -0)➕
tests/repos/repo1_bare/objects/d0/845fe2f85710b50d673dafe98236bf9f2023da(+0 -0)📝
tests/repos/repo1_bare/refs/heads/master(+1 -1)📝
tree_entry.go(+40 -0)📝
tree_entry_test.go(+40 -0)📄 Description
Solution for #63.
As symlinks are all mode 120000 we have to traverse the tree which is more expensive than a straight check so I've implemented it as a FollowLink() method and the caller can determine the type
Have a patch ready for go-gitea/gitea#1416 if this is accepted...
For testing I had to add files directly to the tests/repo1_bare and include them in the commit. If there is a cleaner way to do this I'm happy to resubmit.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.