mackyle/topgit

git cat-file commands have extra "--"

JonathanRRogers opened this issue · 7 comments

I upgraded to topgit 0.19.11 and "tg update" no longer worked. I found that calls to "git cat-file" in function stash_now_if_requested() ended with "--", which git doesn't like and seems unnecessary. I removed them and "tg update" worked.

Can you tell me please what is the output of:

git version --build-options

That extra -- should be harmless and does get exercised at least a little bit during the test suite so I would like to see if I can reproduce the problem by using the same version of Git that you have because apparently the issue is Git version specific.

I'm using git version 2.2.0.

Now that I've had some time available, I ran the TopGit test suite (make test) using a build of Git v2.2.0 and several test failures appear that appear to be caused by this issue; I will investigate further as those failures do not happen with current Git versions.

Apparently this commit:

git/git@b48158a

which first appeared in the Git v2.5.0 release, changed the way options are parsed by git cat-file so that the end-of-options delimiter -- started being interpreted as such. As you point out, however, it's not strictly necessary when using git cat-file.

It looks like the problem was first introduced as part of the topgit-0.19.4 release.

I will take care of removing it.

Thanks.

I just pushed up some fixes; these two will probably interest you the most:

They will be in the next TopGit release but I do not have an ETA for that.

TopGit 0.19.12 contains this fix.