Skip to content

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
wants to merge 103 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
103 commits
Select commit Hold shift + click to select a range
8af9416
Moved push and fetch methods partly from remote to the gitcmdobjdb im…
Byron Apr 5, 2011
e77d2d0
Removed all parts of the reference implementation which doesn't requi…
Byron Apr 7, 2011
a12a761
Updated objects to use the ones defined in gitdb as basis. Only the s…
Byron Apr 7, 2011
a80f9af
configparser is now part of gitdb. Test still remains until it was re…
Byron Apr 25, 2011
3fe1a7f
Moved rev_parse code into gitdb, this probably broke pretty much here…
Byron Apr 29, 2011
9fc7b9a
Made most primal imports work, but stopped here as there are many mor…
Byron May 5, 2011
f54546a
Added async submodule, formerly required by gitdb (which is still a v…
Byron May 5, 2011
4177eef
Added all code from gitdb to gitpython. Next is to make it generally …
Byron May 5, 2011
56da804
removed gitdb submodule
Byron May 6, 2011
acf5e6e
replaced all gitdb strings with git
Byron May 6, 2011
7ae36c3
Started to fix imports - tests still have no chance to work as databa…
Byron May 6, 2011
cd26aae
Made repository paths methods a property to be compatible with the ex…
Byron May 10, 2011
0996049
Intermediate commit with quite some progress in order to put all extr…
Byron May 29, 2011
112bb16
Finished moving all repository methods to the respective interfaces a…
Byron May 29, 2011
024adf3
Fixed tests far enough to allow basic repository tests to be applied …
Byron May 30, 2011
1f71ed9
git cmd implementation of repository appears to work, at least this i…
Byron May 30, 2011
4ea529d
Fixed pure python implementation to run the default repository tests
Byron May 30, 2011
09a11c7
Fixed test_git.py
Byron May 30, 2011
2bfc2e9
Fixed test_loose.py
Byron May 30, 2011
c192638
Fixed all remaining python repository tests
Byron May 30, 2011
7fab60c
Fixed all of the object tests, except for the submodule handling whic…
Byron May 30, 2011
6f96058
Fixed remaining tests as good as possible. remote/fetch/pull and subm…
Byron May 30, 2011
4298468
Fixed ref-log related issue in the test suite to assure it will not g…
Byron Jun 1, 2011
cee55cb
Fixed symref tests to work on osx
Byron Jun 1, 2011
5426890
Fixed odb performance tests
Byron Jun 6, 2011
d103257
Fixed packed ODB test, in preparation for separating the type to allo…
Byron Jun 6, 2011
155158e
Added PackedDB test with generalized type to allows other implementat…
Byron Jun 6, 2011
47f14d5
Added loose object writing and reading performance tessts, in pure an…
Byron Jun 6, 2011
79b9dbd
Fixed performance commit object testing
Byron Jun 6, 2011
56a004b
Moved performance commit object test into the respective subfolder to…
Byron Jun 6, 2011
ce79835
Fixed performance pack writing tests. As they are actually depent on …
Byron Jun 6, 2011
a5497c4
Streams returned by git cmd db are now containing all the data right …
Byron Jun 6, 2011
3c12de3
Improved pack writing test to show that the pack generation can be li…
Byron Jun 6, 2011
65f2dd0
Fixed fetch/push/pull implementation. Next up is to integrate the con…
Byron Jun 7, 2011
63a0bbe
Added version_info property to git command
Byron Jun 7, 2011
09517bd
clone and clone_from methods now support the RemoteProgress interface…
Byron Jun 7, 2011
9bf3fde
First run in order to fix the remote handling. Cleaned up interfaces …
Byron Jun 7, 2011
93668b0
Fixed index checkout return code parsing to work with latest git version
Byron Jun 7, 2011
f7ca1ce
Submodule tests are nearly working. Only root module needs more atten…
Byron Jun 7, 2011
82793e5
Submodule tests are fully back and working
Byron Jun 7, 2011
fd5c46e
submodule now doesn't use hardcoded repository implementations anymor…
Byron Jun 7, 2011
410cf1e
The --progress flag will now automatically be used if possible when d…
Byron Jun 7, 2011
4786d19
Making comparisons with non-GitPython objects more tolerant.
May 19, 2011
ecd0fd4
Match any number of leading spaces in config values
jkeating Feb 14, 2011
ba825ea
Greatly improved robustness of config parser - it can now take pretty…
Byron Jun 7, 2011
f6897c7
Added additional opcodes to remote progress to make it compatible to …
Byron Jun 7, 2011
58a930a
Merge branch 'gitdbmerger'
Byron Jun 7, 2011
90e780a
log: non-existing logs no longer throw an exception, but are ignored.…
Byron Jun 7, 2011
24bc841
git.version_info now returns exactly 4 numbers
Byron Jun 7, 2011
7bc59ab
Improved debug assertion to provide proper path on which to run a git…
Byron Jun 7, 2011
4772fe0
pre-emptively moved all reference related tests into own package, to …
Byron Jun 8, 2011
ee9d6b9
util: Added test for iterable list, and implemented __contains__ and …
Byron Jun 8, 2011
74b13c5
symbolic reference handles different types for comparison more gracef…
Byron Jun 8, 2011
095013f
Fixed critical issue that would cause a string to be passed to metho…
Byron Jun 8, 2011
7076f43
Fixed submodule tests to go with either the old or the new version of…
Byron Jun 10, 2011
e00bf79
root submodule: Added parent_commit parameter for convenience. Fixed …
Byron Jun 13, 2011
4bf372d
test_submodule: Will now load everything into memory if smmap is pres…
Byron Jun 13, 2011
963bbd7
Made remote line parsing more stable. On windows it can be that we en…
Byron Jun 13, 2011
5a3b731
Submodule now uses a specialized method to remove its trees to allow …
Byron Jun 13, 2011
6660f61
fixed submodule test to work on windows
Byron Jun 13, 2011
a7ff2f0
Fixed incorrect gitmodules file which used gitdb once again, instead …
Byron Jun 13, 2011
b7ae99c
Fixed implementation of _version_info which didn't work for python 2.…
Byron Jun 13, 2011
87aa78c
refs: added constructor flag to allow refs to be instatiated from any…
Byron Jul 4, 2011
87c7a6f
Basic remote functionality moved to Reference type, as it can in fact…
Byron Jul 4, 2011
3379127
Fetch info can now deal much better with non-default ref specs, see #…
Byron Jul 4, 2011
da12df9
Merge branch 'remote-fixes'
Byron Jul 4, 2011
d37ef77
Added smmap as submodule, package initialization adjusted to assure i…
Byron Jul 5, 2011
21499d9
util: added global sliding memory manager
Byron Jul 5, 2011
f0c05ea
util: pick the type of memory manager based on the python version, to…
Byron Jul 5, 2011
bf638fd
Merge branch 'smmap'
Byron Jul 5, 2011
6507e4e
fixes python 2.6 compatibility issues
Byron Jul 5, 2011
f1a2a4c
Implemented GIT_PYTHON_GIT_EXECUTABLE including test and docs
Byron Jul 5, 2011
2baf8a4
cmd: on windows, we will now fallback to using git.cmd, as the defaul…
Byron Jul 6, 2011
690828c
Added basis for initial dulwich integration. Many basic issues should…
Byron Jul 6, 2011
80aa405
Added auto-skip mixin metacls, some serious brainfuck, if the require…
Byron Jul 7, 2011
d5038eb
removed now superfluous InstanceDecorator, as it was just complicatin…
Byron Jul 7, 2011
4bb5107
Initial version of the DulwichType inheritance. For now, it inherits …
Byron Jul 7, 2011
8b3b222
Added default performance tests - these should help to measure someth…
Byron Jul 7, 2011
b56764b
Fixed submodule related issues once again - is it ever going to end ?
Byron Jul 7, 2011
0906450
Added trivial implementation for info and stream methods - info is ve…
Byron Jul 7, 2011
6a10c8a
Removed cache in PureCompoundDB as it had the tendency to slow things…
Byron Jul 7, 2011
f4f330f
Added store support. Now the basic object IO is implemented, which sh…
Byron Jul 7, 2011
023dc12
Merge branch 'dulwich'
Byron Jul 7, 2011
16a1327
Added basic frame for pygit2 - it just needs some basic methods to be…
Byron Jul 8, 2011
a5a0fa2
Fixed up tests to actually use pygit2. Its worth noting that the perf…
Byron Jul 8, 2011
a848569
Merge branch 'pygit2'
Byron Jul 8, 2011
6e86f8a
Fixed consecutive lines with same blame info not appearing in blame.
devnev Jul 17, 2011
f362d10
Fixed 'Inappropriate ioctl for device' problem on posix systems
swallat Feb 2, 2012
d78a82d
Added test for backslahed/quoted values
ereOn Feb 8, 2012
2b7975c
Fixed quotes and backslashes handling in GitConfigParser
ereOn Feb 8, 2012
3cadd6f
Fixed a case were values containing \\" were not properly escaped
ereOn Feb 8, 2012
cb68f36
Fix fd leak on git cmd.
sugi May 8, 2012
f467834
Ignore signal exception on AutoInterrupt destructor.
sugi May 8, 2012
95878d2
Merge pull request #58 from sugi/cmd-fd-leak-fix
Byron May 8, 2012
91c04a1
Merge pull request #43 from swallat/master
Byron May 17, 2012
cd72d78
Merge pull request #46 from ereOn/master
Byron May 30, 2012
8dc98aa
detect renames in "git diff --raw" output
Jun 15, 2012
3da67f3
add tests for git.diff.Diff._index_from_raw_format()
Jun 16, 2012
864cf1a
Merge pull request #62 from P2000/p2000
Byron Jun 16, 2012
6b5f70c
submodules now use the http protocol to faciliate use in corporate ne…
Jul 23, 2012
c08f435
Make GitPython work on non English systems
FlorianLudwig Jul 24, 2012
011d89d
Merge pull request #68 from FlorianLudwig/master
Byron Jul 24, 2012
0703be6
Add an output_nostrip kwarg to Git.execute
znerol Oct 12, 2012
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix fd leak on git cmd.
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.
  • Loading branch information
sugi committed May 8, 2012
commit cb68f36c9a2cd18a38e2b2c4630fd2131bfa3879
5 changes: 5 additions & 0 deletions git/cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ def __init__(self, proc, args ):
self.args = args

def __del__(self):
self.proc.stdout.close()
self.proc.stderr.close()

# did the process finish already so we have a return code ?
if self.proc.poll() is not None:
return
Expand Down Expand Up @@ -100,6 +103,8 @@ def wait(self):

:raise GitCommandError: if the return status is not 0"""
status = self.proc.wait()
self.proc.stdout.close()
self.proc.stderr.close()
if status != 0:
raise GitCommandError(self.args, status, self.proc.stderr.read())
# END status handling
Expand Down