mackyle / topgit

TopGit - A different patch queue manager
https://repo.or.cz/topgit/pro.git
Other
67 stars 7 forks source link

git cat-file commands have extra "--" #9

Closed JonathanRRogers closed 5 years ago

JonathanRRogers commented 6 years ago

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.

mackyle commented 6 years ago

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.

JonathanRRogers commented 6 years ago

I'm using git version 2.2.0.

mackyle commented 6 years ago

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.

mackyle commented 6 years ago

Apparently this commit:

https://github.com/git/git/commit/b48158ac94cf725834b70b4a5ab7f2d152a741d4

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.

JonathanRRogers commented 6 years ago

Thanks.

mackyle commented 6 years ago

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.

mackyle commented 5 years ago

TopGit 0.19.12 contains this fix.