Open coffebar opened 1 year ago
I see this command is used to get staged files:
git --name-only --cached --relative
I have tested it on my repo and find out that if my CWD is below that dir of the changed file, it will not show that file.
For example structure is:
- Readme.md *
- SRC/
- --Files/
In the root directory - git --name-only --cached --relative
shows Readme.md
in Files
or in SRC
directory - nothing.
If remove "--relative" param - it will show path from anywhere relative to the WorkingDirectory
Stale issue message
@coffebar was this actually completed, do you want to reopen?
not sure, currently not using
thanks
Opencommit Version
v3.0.3
Node Version
v20.6.0
NPM Version
9.8.1
What OS are you seeing the problem on?
Other Linux Distro
What happened?
When I use dotfiles bare repo, oco does not detect git when CWD is not in the top level of the work-tree.
Expected Behavior
Generate a commit message
Current Behavior
Possible Solution
No response
Steps to Reproduce
GIT_WORK_TREE=/absolute-path/WORKDIR GIT_DIR=/absolute-path/REPODIR oco
Note: it will work if you do the same except step 3 (if your CWD is WORKDIR)
Relevant log output
No response