Skip to content

Strip the line when matching for sections #22

Closed
wants to merge 1 commit into from

2 participants

@jkeating

The SECTCRE regex does not seem to ignore leading spaces before a
section in the config and will cause a traceback. However git itself
parses these files just fine. Stripping the line resolves the issue.
https://bugzilla.redhat.com/show_bug.cgi?id=706218

@jkeating jkeating Strip the line when matching for sections
The SECTCRE regex does not seem to ignore leading spaces before a
section in the config and will cause a traceback.  However git itself
parses these files just fine.  Stripping the line resolves the issue.
https://bugzilla.redhat.com/show_bug.cgi?id=706218
61d16f0
@Byron
gitpython-developers member
Byron commented May 28, 2011

Could you modify and existing fixture (like. git_config in test/fixtures) to contain lines that your change is fixing, maybe including some variations you make up that you think should be fine as well.
Then run the unit-tests (test_config.py) to be sure it actually works and doesn't break anything else.

Once that is verified, I will be glad to merge.
Thanks,
Sebastian

@jkeating
@Byron
gitpython-developers member
Byron commented May 29, 2011

I just use the nosetests executable from the git-python root dir or the ./git subdirectory, in your case you could specify the test suite, i.e. nosetests test/test_config.py.

With nosetests 1.0.0 and 0.10.4 the tests work flawlessly. For some tests, mock needs to be installed as well, maybe that's the cause of the issue.

@Byron
gitpython-developers member
Byron commented Jun 7, 2011

I have implemented the contents of this pull request and pushed the changes to the new 0.3 branch. This is to indicate that GitPython 0.3 reached the end of its life and is in maintenance mode. A proper release of 0.3 will follow.

Master now moved on to the latest stable development, which will be 0.4 one day. As master was reset, you will have to reset your local master as well.

Thanks for your participation,
Sebastian

@Byron Byron closed this Jun 7, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.