git-meta icon indicating copy to clipboard operation
git-meta copied to clipboard

git meta push doesn't work with local filesystem

Open jhedwardyang opened this issue 6 years ago • 3 comments

git init foo
git init bar
cd foo
touch .gitmodules
git add .gitmodules
git commit -m 'first commit'
git meta push ../bar HEAD:refs/heads/tmp

Expected: (try running with "meta" to find this output)

Enumerating objects: 3, done.
Counting objects: 100% (3/3), done.
Writing objects: 100% (3/3), 214 bytes | 214.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To ../bar
 * [new branch]      HEAD -> tmp

Actual:

[master (root-commit) 0000000] first commit
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 .gitmodules
No remote named ../bar.

jhedwardyang avatar Feb 22 '19 17:02 jhedwardyang

Also doesn't work with a full file URL

$ git push file:///home/edy/tmp/bar HEAD:refs/heads/foobar
Total 0 (delta 0), reused 0 (delta 0)
To file:///home/edy/tmp/bar
 * [new branch]      HEAD -> foobar
$ git meta push file:///home/edy/tmp/bar HEAD:refs/heads/foobar
No remote named file:///home/edy/tmp/bar.

jhedwardyang avatar Feb 22 '19 17:02 jhedwardyang

This doesn't seem like valid usage. There is no submodule structure to begin with.

jhdub23 avatar Sep 05 '19 15:09 jhdub23

I think the given example just omits adding submodules for brevity. The actual bug here is that the push won't succeed when the remote is a local path (whether there are submodules or not).

abliss avatar Sep 05 '19 21:09 abliss