Skip to content

Conversation

@epriestley
Copy link

Fixes issue #1056.

When you try to push master but also have a file named master, we run
git rev-list ... master. This is ambiguous, because rev-list accepts
paths or refs and git is unsure whether you mean the ref master or the
path master.

Instead, run git rev-list ... master --, which is unambiguous.

This adds a failing test (trying to push a file named master to LFS), then
fixes the test by appending -- to the command.

Fixes issue git-lfs#1056.

When you try to push `master` but also have a file named  `master`, we run
`git rev-list ... master`. This is ambiguous, because `rev-list` accepts
paths or refs and `git` is unsure whether you mean the ref `master` or the
path `master.

Instead, run `git rev-list ... master --`, which is unambiguous.

This adds a failing test (trying to push a file named `master` to LFS), then
fixes the test by appending `--` to the command.
@sinbad
Copy link
Contributor

sinbad commented Mar 22, 2016

🤘 thanks!

sinbad added a commit that referenced this pull request Mar 22, 2016
Fix `git rev-list` when a file exists with the same name as the branch
@sinbad sinbad merged commit 163c07e into git-lfs:master Mar 22, 2016
@technoweenie technoweenie mentioned this pull request Apr 11, 2016
17 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants