Why can't git fetch from a git-bundle in the current working directory

320 views Asked by At

Try this: Create a git-bundle like this:

git bundle create trash1.bundle some_branch^^..some_branch

Then try to fetch right back into the same git repo, but into a separate branch like this:

git fetch ./trash1.bundle some_branch:some_branch.1

See it fail like this:

fatal: './trash.bundle' does not appear to be a git repository

But move it into /tmp/trash1.bundle, and run it like this:

git fetch /tmp/trash1.bundle some_branch:some_branch.1

And it proceeds without issue, creating the some_branch.1 branch (which just so happens to point to the same commit as some_branch, as expected, since it is the same repo.

So why would git-fetch disallow specifyinf a bundle using standard file syntax of "./" in front? Why does the bundle file have to be fully-qualified?

0

There are 0 answers