-
-
Notifications
You must be signed in to change notification settings - Fork 934
Add an output_nostrip kwarg to Git.execute #75
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
Closed
znerol
wants to merge
103
commits into
gitpython-developers:0.3
from
znerol:feature/master/cmd-output-nostrip
Closed
Add an output_nostrip kwarg to Git.execute #75
znerol
wants to merge
103
commits into
gitpython-developers:0.3
from
znerol:feature/master/cmd-output-nostrip
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…plementation, including related types. It doesn't yet work, and the omnipresence of the repo imposes a problem right now, as the required ref functionality is not yet part of the gitdb specification. theoretically, the whole ref implementation has to move into gitdb
…re the git command. everything else was moved to GitDB. None of the tests is yet expected to run, although git-python should have less trouble getting the tests back up running than GitDB. plenty of code needs to be de-duplicated though in case of the tests, which will be some work
…ubmodule implementation is left in git-python as it requires some advanced features. No tests where run yet
…placed by its gitdb counterpart through inheritance. All items which are part of gitdb but used by gitpython need their own verification within gitpython
…, which is still to be fixed of course
…e changes when doing the merge
…alid submodule just yet)
…work. Then the tests will need some work
…se changed drastically. Now the actual work begins
…isting repo interface. Added submodule interface ... goal is to provide all of the extra repo functionality in custom interfaces
…a methods on the default Repo implementation into interfaces or something that can be abstracted. It shows that it would indeed be good to keep the differentiation between Repositories which contain an object database as it is clearly easier to setup any combination of repositories that use git and those that do not, with just the addition of one more level of indirection. Lets see how it will end up
…nd implementations. It seems theoretically work together now, although it clearly is much more complex than ever before. The repo package was slimmed down to being a module once again, which is only there for compatability actually
…to any of the new database types. This reduces code duplication to the mere minimum, but allows custom tests to be added on top easily and flexibly
…s what the test suggests. Pure python implementation still has some trouble, but this should be very fixable
…h needs more work as the amount of submodules changed in fact. Maybe I should just generate a test repository with gitpython as submodule to get the recursion depth required to satisfy the test
…odule tests need some more work. Also, the tests need to be reorganized and move closer to their actual location within gitpython. Hence the refs tests go to git.test.refs, etc
…ive false positives in repositories that are freshly checked out
…w future implementations to use the test as well
…ions to be tested as well at some point
…d command implementations. The previous performance test was truncated a bit as it compared directly with the git hash_object write performance. This is out, and if we wanted it we could implement it , but its actually slower for us
… indicate what it tests
…g things after all
…everything from the existing implementation, but one by one things can be reimplmented to use dulwich. It also shows that py 2.6 is quite plagued from its new feature, which is actually a bug, as objects inability to accept any args makes mixins hard to use ...
…ing at least, which implicitly includes pack handling. For the pack specific tests to work, one would need a pack interface though, which is currently not planned to be specifically exposed
…ry inefficient, but can't help it. Basic repo tests don't work as dulwich ignores alternate files
…all be enough for the first batch of work
… implemented now - depending on the performance, it might actually receive some more work
…ormance tests only work reliably in a patched up version, or the next point release.
This fixes a bug when parsing blame -p output: Full commit info headers only appear for the first line from a particular commit, but other lines were ignored as the blame info dict was reset after each line. This patch handles both multiple consecutive lines from a commit and interleaved lines from multiple commits. Added real test to verify blame works against the actual commit, not only a mock of what was produced by blame in old git releases
Currently if command is called with as_proces=True, pipes for the command will not be closed. This change makes sure to close command file descriptors.
When command run as subprocess, AutoInterrupt will kill the process on destructor. However, if process already finished, it raise OSError exception. This fix just ignore OSError on os.kill.
Fixes on cmd.py (fd leak and signal exception) Currently if command is called with as_proces=True, pipes for the command will not be closed. cb68f36 makes sure to close command file descriptors. Ignore signal exception on AutoInterrupt destructor. When command run as subprocess, AutoInterrupt will kill the process on destructor. However, if process already finished, it raise OSError exception.
Fixed 'Inappropriate ioctl for device' problem on posix systems Without an active login shell on linux or osx, we now use the password database to obtain the active login, instead of relying on environment variables).
Incorrect handling of backslashes and quotes in GitConfigParser Steps to reproduce the issue: import git config = git.Repo().config_writer() config.add_section('test') config.set_value('test', 'test', r'some\data') Now if you try to read this value using a regular (non Python) git config, Git complains that the configuration file is invalid: fatal: bad config file line 11 in .git/config Indeed, if you open .git/config you can see that the value is written as: [test] test = some\data While the git-config configuration states that: String values may be entirely or partially enclosed in double quotes. You need to enclose variable values in double quotes if you want to preserve leading or trailing whitespace, or if the variable value contains comment characters (i.e. it contains # or ;). Double quote " and backslash \ characters in variable values must be escaped: use \" for " and \ for . That is, the backslashes are not escaped in the configuration file. This also causes issues while reading, because values are not un-escaped. This pull request fixes both those issues and also fixes unescaped quotes pairs. A test-case has been provided along with the fixes.
potentially fixes #36
detect renames in "git diff --raw" output
Fix GitPython on systems with language != english
The last line of the output normally is stripped if it is empty. If output_nostrip is True, this behavior is disabled. This can be important when constructing patches e.g. using the diff command.
damn, wrong branch. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The last line of the output normally is stripped if it is empty. If
output_nostrip
isTrue
, this behavior is disabled. This can be important when constructing patches e.g. using thediff
command.