Skip to content
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

Closed
wants to merge 2 commits into from

Conversation

c10l
Copy link

@c10l c10l commented Sep 12, 2014

This fixes the issue by grepping out the branch information.

@mcornella
Copy link
Member

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 --porcelain flag will make git status output consistent regardless of the user configuration. Please update your change to use that instead of the grep solution.

Thanks for contributing!

@mcornella
Copy link
Member

Update: wait, don't do that yet because I need to test the consequences of using the porcelain flag on git submodules.

@c10l
Copy link
Author

c10l commented Sep 13, 2014

@mcornella yeah, sorry about the thing with the extra issue. closed.

Didn't know about the --porcelain flag. That does seem to be the best way to fix this. Let me know once you have tested it with submodules and I'll update this PR.

Thanks!

@mcornella
Copy link
Member

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

@c10l
Copy link
Author

c10l commented Sep 14, 2014

Done. I've tested it on my setup and it works as expected. Cheers!

@mcornella
Copy link
Member

/cc @robbyrussell: this seems harmless enough to merge

@mcornella
Copy link
Member

Apparently this was already posted #2928, but was closed in favor of #2386. Not sure how to proceed
How is your progress @simonbuchan?

This is good to merge while there are no other options available.
/cc @robbyrussell

@simonbuchan
Copy link
Contributor

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.

@rhong-fiksu
Copy link

Works like a charm for me. Moving all the git parsing stuff to using the porcelain flag seems prudent.

@mcornella
Copy link
Member

@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.

@c10l
Copy link
Author

c10l commented Oct 26, 2014

👍

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. :)

@simonbuchan
Copy link
Contributor

@mcornella, @cassianoleal - done, though note I have been running on my merge of #2386 since August, so it only got a couple months use.

@mcornella
Copy link
Member

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?

@c10l
Copy link
Author

c10l commented Oct 30, 2014

Closing in favour of #2928

@c10l c10l closed this Oct 30, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants