This repository has been archived by the owner on May 8, 2024. It is now read-only.
:Gina commit
fails in repo with multiple remotes
#202
Labels
Hi! First of all, nice plugin, enjoying it, thanks a lot.
Now, the "usual" simple commit works just fine for me from Gina. However I've just needed to do funny stuff with git remotes, and consequently get this on
:Gina commit
:It looks to me as if the
git rev-list
cmdline has got embedded newlines in it.I'll explain the "funny stuff" with git remotes next — assuming that the reader understands the basic concepts of git remotes.
TL;DR: if my repo has two remotes —
:Gina commit
doesn't work.We use a private GitLab instance. It has a repository called
main
. I also have two local clones on my machine,~/src/main
and~/src/main2
. Both of them have the default post-clone remote renamedorigin
→gitlab
. An example of a remote branch is thengitlab/master-4.4
; with this I can do things likegit rebase gitlab/master-4.4
. So far so good.Now, I'm not a huge fan of keeping two separate clones around, but sometimes that comes as a real time-saver. Long story short, I ended up with commits in
main2
repo which I needed to pull intomain
. Those commits are the branchsnmp-agent
.Git is perfectly capable to treat a "neighbour" clone as a remote (that's what the
file://
remote URIs essentially are). So I did:If you follow me, this output would appear just as expected:
Two remotes, alright? One
gitlab
, onelocal-main2
.Next, I get to pinpoint my work made in repo
main2
as a branchsnmp-agent
in repomain
:It's been a while, so I replay the changes on top of the updated
gitlab/master-4.6
, just as I always do.Great! Here, the "funny git stuff" ends. So I went back into vim, made some changes, invoked
:Gina status
, staged the changes and proceeded with:Gina commit
, again as usual. Upon filling out the commit message, however I see the traceback as above (and no commit happens, and the long long commit message is lost):That
local-main2/master-4.4
looks really weird in the traceback. It shouldn't appear there at all — as I've definitely switched the upstream ofsnmp-agent
togitlab/master-4.6
. Thegit rev-list
invokation is totally borked. From the/bin/sh: ...: not found
stderr, I deduce that the last three lines are not wrapping artifact, but two newlines embedded ingit rev-list
cmdline.I hope, you can already guess what's wrong with Gina source 😃
:Gina commit
works again as soon as I dogit remote remove local-main2
.The text was updated successfully, but these errors were encountered: