New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #3126 - parse_git_dirty() always returns dirty if branch = 1 on .gitconfig #3127
Conversation
… 1 on .gitconfig
Hi @cassianoleal, you don't need to open a new issue detailing a problem if you already have an existing solution. That increments the number of open issues unnecessarily and makes it an artificial value with no real meaning. Please close the other issue. As per this change, just adding the Thanks for contributing! |
Update: wait, don't do that yet because I need to test the consequences of using the porcelain flag on git submodules. |
@mcornella yeah, sorry about the thing with the extra issue. closed. Didn't know about the Thanks! |
Hi @cassianoleal, I have checked the docs and it's confirmed that the porcelain flag doesn't affect the behavior (i.e., submodules aren't checked differently with or without the flag). It only affects the output format. You can go ahead and change it, we'll get more people to test this anyway. I made a commit to test this, you can borrow from it without worry: mcornella@a205c6c |
…he branch information
Done. I've tested it on my setup and it works as expected. Cheers! |
/cc @robbyrussell: this seems harmless enough to merge |
|
Bah, I hate github notifications. I would really like all the fixes in #2386 to go out, but it looks like @LFDM isn't tracking it. @mcornella, @robbyrussell would you like me to open my re-merge of #2386 as a new PR to try to get that merged? It's what I've been running since and it seems OK, though I've not been exhaustive. |
Works like a charm for me. Moving all the git parsing stuff to using the porcelain flag seems prudent. |
@simonbuchan yeah #2928 looks like has a deeper cleanup of the file and also was first to solve this one. If you open it we'll merge that one, if @cassianoleal is ok with it ;) You can also get #2386 rebased and posted as a separate PR, but there's no rush to getting it merged since it's a big refactor. |
👍 If it fixes my issue (which it seems to do from reading the code, even though I haven't actually tried it), I'm cool with it. :) |
@mcornella, @cassianoleal - done, though note I have been running on my merge of #2386 since August, so it only got a couple months use. |
Ok cool @simonbuchan, we'll do it this way then. I take note of your caution in regards to #2386 @cassianoleal can you please close this PR and go +1 #2928 by @simonbuchan? |
Closing in favour of #2928 |
This fixes the issue by grepping out the branch information.