libgit2 / libgit2/libgit2sharp
The set filemode is incorrect
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 3.5k
- Forks
- 925
- PR merge metrics
- No merged PRs in 30d
Description
Reproduction steps
Azure DevOps
-
Create YAML Pipeline just for monitoring filemode (show all files with filemode, script:
git ls-files --stage) and create build validation policy for main branch -
Create file "test1.sh" in folder "folder1", create PR to main and complete it
-
On new branch make changes, push it, hard reset to previous commit, create "folder2", move "test1.sh" to this folder, change filemode to 100755 (
git update-index --chmod=+x file_name), force push, create PR to main and complete it -
Switch to previous commit (before changing folder and file mode), push any changes, create PR to main and check build validation pipeline logs on the PR
Expected behavior
File mode is 100755 (new)
Actual behavior
File mode is 100644 (old)
Version of LibGit2Sharp (release number or SHA1)
14.0.29222.1
Operating system(s) tested; .NET runtime tested
Windows 10, .NET 4.8
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the Azure DevOps scenario using git ls-files --stage, the move to folder2, and git update-index --chmod=+x. Then trace LibGit2Sharp's handling of file modes across the described commit and push sequence. Done means the validation pipeline reports file mode 100755 rather than 100644 for the affected file.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, git
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100