Initial commit inside existing repository commits too many files
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 68/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript, vscode
- Domain
- developer-experience
Research direction
Start by locating the extension command that creates a standalone Lean project and the code that runs its initial Git commit. Check how the commit selects files when the project is created inside an existing repository. Done means the initial commit includes only files created for the new project, or the command refuses to commit when the repository already contains other files; add or update a focused test for that behavior.
Written by the indexing model from the issue text.
Description
Prerequisites
- Check that your issue is not already filed:
https://github.com/leanprover/vscode-lean4/issues - Check that the issue is in the VS Code extension and not in Lean itself.
Report issues in Lean itself (for example, a wrong error message or a crash of the Lean server) at
https://github.com/leanprover/lean4/issues - Reduce the issue to a minimal, self-contained, reproducible test case.
If possible, avoid dependencies on Mathlib or Batteries. - Test your test case with the latest version of the extension.
- If the issue is a security vulnerability, do not report it here.
Write to [email protected] for responsible disclosure.
Description
When creating a lean project using the extensions tool to do so and in an existing git repository, it will blanket commit all uncommitted files in the repository.
For me this resulted in a bunch of temporary files that I do not want committed being committed.
Context
I have a folder structure like so:
.
├── Day1
│ ├── Day1.md
│ └── Scratch Project.sb3
├── Day2
│ ├── Day2.md
│ └── day2.sh
├── Day3
│ ├── Day3.md
│ ├── .idea *
│ ├── index.js
│ ├── input.txt *
│ └── package.json
├── Day4
│ ├── Day4-display.png
│ ├── Day4.md
│ └── Day4.xlsx
├── .git
└── README.md
I used the extension's tool to create a project called Day5 in that folder, and it committed the files marked with a *, which aren't even in the folder the extension put files in and were not in the git index (they were merely unadded, and not ignored).
Steps to Reproduce
- Create a folder and initialize a git repository in it.
mkdir Test && cd Test && git init - Create a file in that folder that should not be commited
echo "Hello" > file.txt - Use the extension to create a project in a new folder in that folder using the ∀ button in the top right -> New Project -> Create Standalone Project
- See the extension committed the file.txt that it has no business touching.
git log --stat
Expected behavior: The extension to only commit the files it created, or the extension to refuse to commit to a repository that is not empty.
Actual behavior: The extension committed any file that wasn't bolted down by a .gitignore
The extension also created a .github folder inside the Day5 folder, which will not function when pushed to github as those need to be in the root of the repository. This is a separate issue though, however points to the extensions handling of git repositories potentially needing improvement.
Versions
vscode-lean4: v0.0.244
lean: irrelevant
Linux, EndeavourOS
Impact
Add 👍 to issues you consider important. If others are impacted by this issue, please ask them to add 👍 to it.
- Dominant language
- TypeScript
- Stars
- 327
- Forks
- 109
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 12
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing 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.
More from leanprover/vscode-lean4
-
Completion popup reopens after Esc in Lean files; caused by default quickSuggestionsDelay of 200Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
leanprover/vscode-lean4#800 · 1 comment ·
Maintainers usually reply within 2 days
-
Difficulty 3/5 1-2 days Newbie friendliness 58/100
leanprover/vscode-lean4#817 ·
Maintainers usually reply within 2 days
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 58/100
leanprover/vscode-lean4#799 ·
Maintainers usually reply within 2 days
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
leanprover/vscode-lean4#796 · 9 comments ·
Maintainers usually reply within 2 days
-
RFC
Difficulty 5/5 Over a week Newbie friendliness 35/100
leanprover/vscode-lean4#790 · 1 comment · 1 reaction ·
Maintainers usually reply within 2 days
All issues in leanprover/vscode-lean4
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
laststance/design-world#98 ·
Maintainers usually reply within 1 day
-
Add: KCM True crimeOpenapproved check:passed streams:add
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
triage: failed
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
oxc-project/tsrs#1277 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
ardia-browser/ardia#6798 ·
Maintainers usually reply within 1 day