bug: git failure when branch and filename collide
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 65/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- git, javascript
Research direction
Start at bin/release.js lines 316-323 and inspect the Git log invocation shown in the report. Reproduce the failure with a branch and file or directory sharing the same name, then verify the release command completes without Git's ambiguous-argument error.
Written by the indexing model from the issue text.
Description
I assume this is related to #186
When you have a file/directory with the same name as the branch you get an error.
ChildProcessError: Command failed: git log --simplify-by-decoration --pretty="%d;%H;%ci" --decorate=short HEAD --first-parent `git rev-parse --abbrev-ref HEAD`
fatal: ambiguous argument 'main': both revision and filename
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
ChildProcessError: Command failed: git log --simplify-by-decoration --pretty="%d;%H;%ci" --decorate=short HEAD --first-parent `git rev-parse --abbrev-ref HEAD`
fatal: ambiguous argument 'main': both revision and filename
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
`git log --simplify-by-decoration --pretty="%d;%H;%ci" --decorate=short HEAD --first-parent `git rev-parse --abbrev-ref HEAD`` (exited with error code 128)
at callback (/Users/robekoc/projects/personal/release/node_modules/child-process-promise/lib/index.js:33:27)
at ChildProcess.exithandler (node:child_process:395:5)
at ChildProcess.emit (node:events:527:28)
at maybeClose (node:internal/child_process:1090:16)
at Socket.<anonymous> (node:internal/child_process:449:11)
at Socket.emit (node:events:527:28)
at Pipe.<anonymous> (node:net:715:12) {
code: 128,
childProcess: {
_forkChild: [Function: _forkChild],
ChildProcess: [Function: ChildProcess],
exec: [Function: exec],
execFile: [Function: execFile],
execFileSync: [Function: execFileSync],
execSync: [Function: execSync],
fork: [Function: fork],
spawn: [Function: spawn],
spawnSync: [Function: spawnSync]
},
stdout: '',
stderr: "fatal: ambiguous argument 'main': both revision and filename\n" +
"Use '--' to separate paths from revisions, like this:\n" +
"'git <command> [<revision>...] -- [<file>...]'\n"
}
Error! Directory is not a Git repository.
- Dominant language
- JavaScript
- Stars
- 3.6k
- Forks
- 117
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
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 vercel/release
-
EvolutionX 10.8 Open
Difficulty 5/5 Over a week Newbie friendliness 10/100
-
released Open
Difficulty 5/5 Over a week Newbie friendliness 5/100
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 3/5 1-2 days Newbie friendliness 32/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
HarperFast/skills#96 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
sugarlabs/musicblocks#8847 ·
-
client-controller-update ta-bot-triage team-money-movement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
MetaMask/metamask-mobile#36594 ·