summaryrefslogtreecommitdiff
path: root/git
Commit message (Collapse)AuthorAgeFilesLines
* Add test and fixture for diff index from raw formatJonathan Chu2016-03-162-0/+7
| | | | | | This tests the edge case of doing a diff against a single whitespace filename and returns the proper change type. All other normal usage of this diff classmethod should remain unchanged.
* Split diff line by '\t' for metadata and pathJonathan Chu2016-03-151-1/+2
| | | | | | | | | | | | | | | | | | | | | | This protects against `.split(None)` which uses consecutive whitespace as a separator to overlook paths where a single space is the filename. For example, in this diff line: line = ':100644 000000 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0000000000000000000000000000000000000000 D ' The deleted file is a file named ' ' (just one space). It's entirely possible to commit this, remove, and to produce the following output from `git diff`: git diff --name-status <SHA1> <SHA2> D M path/to/another/file.py ... This would cause the initial `.split(None, 5)` to fail as it will count all consecutive whitespace as a separator, disregarding the ' ' (single space) filename.
* config parsers as context mangers can now be reentered for locksRaphael Boidol2016-03-062-15/+38
|
* Merge pull request #389 from csnover/csnover-buffer-readsSebastian Thiel2016-02-251-0/+1
|\ | | | | fix(cmd): Use buffered reads
| * fix(cmd): Use buffered readsColin Snover2016-02-241-0/+1
| | | | | | Popen defaults to using unbuffered reads, which are extremely slow.
* | Merge pull request #385 from yarikoptic/skip-testSebastian Thiel2016-02-251-0/+4
|\ \ | |/ |/| ENH: skip test_is_ancestor on git versions < 1.8.0 not supporting git merge-base --is-ancestor
| * ENH: skip test_is_ancestor on git versions < 1.8.0 not supporting git ↵Yaroslav Halchenko2016-02-141-0/+4
| | | | | | | | merge-base --is-ancestor
* | enable config parsers to be used as context managersRaphael Boidol2016-02-203-42/+51
| | | | | | | | if used as context managers, the parsers will automatically release their file locks.
* | fix(cmd): allow improved errors during clone operationSebastian Thiel2016-02-143-6/+7
| | | | | | | | Related to #383
* | fix(cmd): focus !Sebastian Thiel2016-02-131-1/+1
| | | | | | | | Thanks travis, once again !
* | fix(cmd): safely read from stderrSebastian Thiel2016-02-131-1/+9
|/ | | | Fixes #383
* fix(refs): set fixture different versionSebastian Thiel2016-02-111-1/+1
|
* chore(version): set to next patch releaseSebastian Thiel2016-02-111-1/+1
|
* fix(cmd): prevent deadlock on clone/fetch/pullSebastian Thiel2016-02-073-12/+7
| | | | | | | | | | | | | | | We keep stdout closed, which seems to have the side-effect of stdout being connected to your TTY, in case you run a terminal. However, this shold also prevent deadlocks, as only stderr is used. The alternative would have been to try to fetch lines concurrently, and we have been there. For clone(), `communicate()` is used, and with some luck this will just do the right thing. Even though last time I checked, it didn't ... ? Lets see. Stab at #72
* chore(flake8): unnused importSebastian Thiel2016-02-072-2/+1
|
* fix(clone): call communicate if there is no progress handlerSebastian Thiel2016-02-072-1/+2
| | | | | | Previously, it could have happened that pipes ran full, deadlocking the operation Related to #72
* DOC: minor typosYaroslav Halchenko2016-01-082-2/+2
|
* Fixed a non-Windows importAshley Whetter2015-12-211-3/+5
| | | | | signal.SIGKILL is not available on Windows so use signal.SIGTERM as a backup when SIGKILL is not available.
* fix(tree): remove Tree.cache - use IndexFile.write_tree() insteadSebastian Thiel2015-12-141-85/+0
| | | | | | For more information, see CHANGES.rst Fixes #369
* fix(tree): show that fixing Tree.cache is not possibleSebastian Thiel2015-12-142-43/+64
| | | | | | | | | | The problem is that a per-tree modification API cannot work properly, as the sorting is based on full paths of all entries within the repository. This feat can only be achieved by the index, which to my knowledge already does it correctly. The only fix is to remove the misleading API entirely, which will happen in the next commit. Related to #369
* chore(tree): remove dead codeSebastian Thiel2015-12-131-1/+0
| | | | [skip ci]
* fix(tree): tree item sort now uses git-styleSebastian Thiel2015-12-132-1/+69
| | | | | | | | | Previously it was possible to generate trees which didn't appear legit to git as gitpython's sorting was a simple alpha-numeric sort. Git uses one that minimizes literal string comparisons though, and thus behaves slightly differently sometimes. Fixes #369
* Forgot to update _num_op_codesThibault Clerice2015-12-021-1/+1
|
* Added CHECKING_OUT as a logged operationThibault Clerice2015-12-021-1/+3
| | | | Closes #330
* fix(commit): respect daylight saving when computing utc-offsetSebastian Thiel2015-11-082-2/+6
| | | | Related to #362
* Merge pull request #354 from dpursehouse/execute-timeoutSebastian Thiel2015-10-161-1/+50
|\ | | | | Include 'timeout' parameter in Git execute
| * Run os.kill for all child pids even after some of them are downOswin Nathanial2015-10-131-1/+4
| | | | | | | | | | | | | | | | Right now, we come out of the iteration in case of failure while trying to kill a child pid. This may result in some of the child pids staying alive. Change-Id: I18d58fcefec2bbdae4ae9bf73594939ade241b52
| * Update docstring for 'kill_after_timeout' parameterOswin Nathanial2015-10-131-1/+5
| | | | | | | | | | | | | | | | Specify that this feature is not supported on Windows and mention about the negative side-effects of SIGKILL on a repository. Change-Id: Ibba2c3f51f84084b4637ae9aaafa87dd84000ef4
| * Rename execute param 'timeout' to 'kill_after_timeout'Oswin Nathanial2015-10-131-10/+10
| | | | | | | | Change-Id: I8ab3d5affb3f040dd9630687fb20aedbd7510070
| * Only create watchdog and event if timeout is specified in execute commandOswin Nathanial2015-10-091-8/+10
| | | | | | | | | | | | | | If the timeout is not specified, we don't need the overhead of creating a watchdog and event. Change-Id: I53ff891af24d4c27fb16bf4bb35910dd1d19d238
| * Raise exception when timeout is used in execute command on WindowsOswin Nathanial2015-10-091-0/+2
| | | | | | | | Change-Id: I2e081c606b75b7f8d3d1ee82d93c3d9f3bdcfcbe
| * Include 'timeout' parameter in Git executeOswin Nathanial2015-09-281-1/+39
| | | | | | | | | | | | | | | | | | This feature enables to set a timeout while executing a git command. After this timeout is over, the process will be killed. If not explicitly specified, the default functionality will not be affected. Change-Id: I2dd5f0de7cb1f5f1b4253dd7ce92d23551d5f9a7
* | fix(cmd): remove unused importSebastian Thiel2015-10-151-1/+0
| |
* | doc(cmd): make sure people know wait() may blockSebastian Thiel2015-10-151-0/+2
| | | | | | | | Related to #357
* | Revert "fix(cmd): fixed deadlock when stderr buffer overflow"revert-357-autointerrupt_deadlock_fixSebastian Thiel2015-10-151-4/+4
| |
* | fix(cmd): fixed deadlock when stderr buffer overflowIvan Ryabchenko2015-10-151-4/+4
|/ | | | | | | Fixed deadlock when using stderr=PIPE in Popen and Git generates enough output to a pipe such that it blocks waiting for the OS pipe buffer to accept more data (see https://docs.python.org/2/library/subprocess.html#subprocess.Popen.wait)
* fix(remote): assure only repository configurationSebastian Thiel2015-09-061-1/+1
| | | | | | | Previously it was possible for it to pick up non-repository branch configuration, even though it was unlikely. Closes #350
* fix(config): ignore empty values in config fileSebastian Thiel2015-09-063-6/+25
| | | | | | | | | | | Similar to git, we now ignore options which have no value. Previously it would not handle it consistently, and throw a parsing error the first time the cache was built. Afterwards, it was fully usable though. Now we specifically check for the case of no-value options instead. Closes #349
* fix(compat): make test work with git >= 2.5Sebastian Thiel2015-08-291-0/+3
|
* fix(repo): fail loudly if worktrees are usedSebastian Thiel2015-08-293-10/+39
| | | | | | | | | | | | | | | As GitPython is in maintenance mode, there will be no new features. However, I believe it's good idea to explicitly state we do not support certain things if this is the case. Therefore, when worktrees are encountered, we will throw an specific exception to indicate that. The current implementation is hacky to speed up development, and increases the risk of failing due to false-positive worktree directories. Related to #344
* fix(repo): use GitCmdObjectDB by defaultSebastian Thiel2015-08-222-6/+3
| | | | | | This should fix resource leaking issues once and for all. Related #304
* Merge pull request #341 from StyXman/masterSebastian Thiel2015-08-212-2/+2
|\ | | | | fix(cmd): make short options with arguments become two separate argum…
| * fix(test): update to changes.Marcos Dione2015-08-201-1/+1
| |
| * fix(cmd): make short options with arguments become two separate arguments ↵Marcos Dione2015-08-201-1/+1
| | | | | | | | for the executable.
* | fix(test_index): fix encodingSebastian Thiel2015-08-171-2/+2
| | | | | | | | | | | | | | | | | | | | I really never want to touch python again, and never deal with py2/3 unicode handling anymore. By now, it seems pretty much anything is better. Is python to be blamed for it entirely ? Probably not, but there are better alternatives. Nim ? Rust ? Ruby ? Totally
* | fix(commit): serialization timezone handlingSebastian Thiel2015-08-172-2/+2
| | | | | | | | | | | | | | | | | | Previously timezones which were not divisable by 3600s would be parsed correctly, but would serialize into a full hour, rounded up. Now floating point computation is used which fixes the issue. Related to #336
* | fix(tests): remove dependency on sort orderSebastian Thiel2015-08-081-1/+1
| | | | | | | | | | | | | | Now we select the submodule by name, not by index. The latter is not deterministic. Closes #335
* | tests(submodule): add new submodule commitsSebastian Thiel2015-08-081-1/+32
| | | | | | | | | | | | | | | | It's somewhat more complex to add new commits in submodules to the parent repository. The new test shows how to do that in a 'GitPythonic' way. Related to #335
* | fix(index):allow adding non-unicode paths to indexSebastian Thiel2015-07-292-2/+16
|/ | | | | | | | | This issue only surfaced in python 2, in case paths containing unicode characters were not actual unicode objects. In python 3, this was never the issue. Closes #331
* fix(diff): mode-assertions now deal with 0Sebastian Thiel2015-07-292-2/+34
| | | | | | | | If the file was not present, the mode seen in a diff can be legally '0', which previously caused an assertion to fail for no good reason. Now the assertion tests for None instead. Closes #323