summaryrefslogtreecommitdiff
path: root/git/repo/base.py
Commit message (Collapse)AuthorAgeFilesLines
...
* Add incremental blame supportVincent Driessen2016-04-131-2/+64
| | | | | | | | | | | | | | | This adds a sibling method to Repo's blame method: Repo.blame_incremental(rev, path, **kwargs) This can alternatively be called using: Repo.blame(rev, path, incremental=True) The main difference is that blame incremental is a bit more efficient and does not return the full file's contents, just the commits and the line number ranges. The parser is a bit more straight-forward and faster since the incremental output format is defined a little stricter.
* enable config parsers to be used as context managersRaphael Boidol2016-02-201-1/+1
| | | | if used as context managers, the parsers will automatically release their file locks.
* fix(cmd): allow improved errors during clone operationSebastian Thiel2016-02-141-2/+2
| | | | Related to #383
* fix(clone): call communicate if there is no progress handlerSebastian Thiel2016-02-071-0/+1
| | | | | | Previously, it could have happened that pipes ran full, deadlocking the operation Related to #72
* fix(repo): use GitCmdObjectDB by defaultSebastian Thiel2015-08-221-5/+2
| | | | | | This should fix resource leaking issues once and for all. Related #304
* Implement is_ancestorSandy Carter2015-07-211-0/+15
| | | | | Wrap `git merge-base --is-ancestor` into its own function because it acts as a boolean check unlike base `git merge-base call`
* fix(flake8): remove unused importSebastian Thiel2015-07-201-1/+0
| | | | | | I knew that flake would eventually get me, especially when least suspected. This time it's even useful, as it is a non-whitespace related issue.
* fix(encoding): in `untracked_files()`Sebastian Thiel2015-07-201-2/+9
| | | | | | | I have no idea why PY3 requires such a mess of encoding/decoding statements, but let's just be happy it works. Also let's be sure I never ever write python code again ... EVER.
* fix(encoding): in untracked_files() and indexSebastian Thiel2015-07-201-1/+1
| | | | | | | | | | | | * untracked_files could, if there were spaces in the path returned, re-rencode the previously decoded unicode string thanks to a `decode("string_escape")` call. Now re-encode into utf-8 afterwards - added test to assure this works indeed * IndexFile.add() didn't handle unicode correctly and would write broken index files. The solution was to compute the path length after encoding it into utf-8 bytes, not before ... . Closes #320
* Correct doc errorsMarian Wieczorek2015-07-161-1/+1
| | | | | | | | | revA..revB → revA...revB (three instead of two dots) [base.py, line 467](https://github.com/gitpython-developers/GitPython/blob/master/git/repo/base.py#L467) rorepo is a ~~a~~ Repo instance [test_docs.py, line 21](https://github.com/gitpython-developers/GitPython/blob/master/git/test/test_docs.py#L21) closes #314
* Add env parameter to Repo.clone_from() for setting environment variablesJon Lund Steffensen2015-06-301-2/+6
| | | | | | | Adds the optional keyword parameter env to Repo.clone_from(). The parameter is a dictionary containing the desired environment variables for the git clone invocation. The environment is applied to the temporary Git instance before calling Repo._clone().
* Fix docstring of Repo.clone_from()Jon Lund Steffensen2015-06-291-0/+1
|
* Merge pull request #291 from hvnsweeting/support-init-choosing-backendSebastian Thiel2015-06-101-2/+7
|\ | | | | support passing odbt for using with Repo
| * add docstring for new argHung Nguyen Viet2015-06-011-0/+5
| |
| * support passing odbt for using with RepoHung Nguyen Viet2015-06-011-2/+2
| |
* | refactor(repo): parameter renaming and cleanupSebastian Thiel2015-06-101-6/+3
| | | | | | | | | | | | | | | | | | | | * renamed `consider_submodules` to `submodules` to be in line with the existing parameters. Nowadays I would prefer the `consider_` prefix, but can't change the existing API and thus stick to the current naming scheme. * reduced amount of code in one portion to make it more maintainable. Related to #294
* | Allow submodules to be ignored in is_dirtyjavex2015-06-051-4/+14
|/ | | | | | There are cases when might not consider a directory dirty when a submodule has changes. Particular case was git-up stashing changes where submodules are irrelevant.
* Added previously missing parameter documentation for Repo.__init__ .Sebastian Thiel2015-02-091-0/+5
| | | | Related to #255
* Added test for `sshkey` context manager.Sebastian Thiel2015-01-221-2/+1
| | | | | | | | It verifies that the script is actually called. Interestingly, the shell script version works within an msysgit environment on windows. Fixes #234
* Overhauled all tutorials, and placed them in a unit-test.Sebastian Thiel2015-01-221-7/+13
| | | | | | That way they are protected from regression. Fixes #239
* Added advance usage examples to tutorial and made minor fixes.Sebastian Thiel2015-01-211-4/+2
| | | | | | GIT_PYTHON_TRACE would actually fail (now) if we debugged archive operations. Related to #239
* Improved installation docs to mention `pip`, not `easy_install`Sebastian Thiel2015-01-191-2/+3
| | | | | Fixes #235 [ci skip]
* Implemented Submodule.rename()Sebastian Thiel2015-01-191-0/+9
| | | | | | A test verifies it's truly working. Related to #238
* Submodule.remove() now seems to work properly, nearly all tests are back.Sebastian Thiel2015-01-171-2/+2
| | | | | | This also means that now we seem to be able to properly handle .git files in submodules Related to #233
* Submodule.remove() now deals with .git files correctly.Sebastian Thiel2015-01-171-2/+6
| | | | A simple test verifies this at least.
* Fixed some doc strings to build correctly with sphinxSebastian Thiel2015-01-141-14/+12
| | | | | | Fixes #7 [ci skip]
* Added 'path' keyword argument to Repo.archive().Sebastian Thiel2015-01-141-2/+9
| | | | | | | This allows sub-trees to be archived as well, and makes `.archive()` feature complete. Fixes #67
* GitConfigParser now respects and merges 'include' sectionsSebastian Thiel2015-01-141-2/+2
| | | | | | | | | | | | | We implement it as described in this article: http://stackoverflow.com/questions/1557183/is-it-possible-to-include-a-file-in-your-gitconfig Thus we handle * cycles * relative and absolute include paths * write-backs in case of writable GitConfigParser instances Fixes #201
* Added `Repo.merge_base(...)` implementation, including test-case.Sebastian Thiel2015-01-131-1/+35
| | | | Fixes #169
* Removed all previously added invocations of os.path.realpath as it wasn't ↵Sebastian Thiel2015-01-121-3/+3
| | | | | | | | | required afterall. Turns out that the now removed `read_gitfile` functions applied os.path.realpath which caused the issue described in #224. Fixes #224
* Repo paths are now converted to real paths, as well as all paths involved in ↵Sebastian Thiel2015-01-121-4/+4
| | | | | | | | | index related work. That way, we don't try to compare a real-path to a non-real one, which would make the implementation think a file is not actually part of the repository. Fixes #224
* Added specific test for roughly checking configuration paths.Sebastian Thiel2015-01-121-1/+1
| | | | | | | For some reason, I didn't trust the existing one as it tests that code more indirectly. Related to #160
* Re-implemented 'user' config level based on suggestion by @jzempelSebastian Thiel2015-01-121-6/+2
| | | | | | | The point is that XDG_CONFIG_HOME is meant to point at the '.config' directory, whereas '.config' has to be added only if HOME is used instead. Fixes #160
* Added 'user' configuration level.Sebastian Thiel2015-01-101-1/+8
| | | | Fixes #160
* Repo.init() now supports paths with a '~' in it, or environment variables in ↵Sebastian Thiel2015-01-101-3/+8
| | | | | | general. Fixes #83
* Added search_parent_directories keyword argument to Repo type.Sebastian Thiel2015-01-101-6/+4
| | | | | | | | Now by default, we will not walk up the directory structure and possibly find git directories that the user didn't intend to find. If required, that kind of behaviour can be turned back on. Fixes #65
* Added test to assure blame can deal with binary patches.Sebastian Thiel2015-01-091-7/+29
| | | | Fixes #74
* Fixed PY3 support.Sebastian Thiel2015-01-081-1/+1
| | | | | | | | Apparently, thanks to an incorrect version check, PY3 ended up using a git command object database by default. This is now fixed. Additionally, the update_cache code was adjusted to check for method-existence, as it's valid to use object databases which simply don't have a caching mechanism (like the git command object database)
* Added Remote.exists() method, and test. Fixes #229Sebastian Thiel2015-01-081-1/+4
|
* Improve error handling of fetch/pull line parsingSebastian Thiel2015-01-081-1/+1
| | | | Fixes #48
* Made improvements to assure test-cases don't leak file handlesSebastian Thiel2015-01-071-0/+4
| | | | | | | | At least leakage is considerably reduced. Additionally, a test-case was added which triggers failure if auto-disposal of resources wouldn't work. Fixes #60
* Implemented non-blocking operations using poll()Sebastian Thiel2015-01-071-5/+8
| | | | Next up is using threads
* test_repo worksSebastian Thiel2015-01-061-2/+3
|
* test_index worksSebastian Thiel2015-01-061-1/+4
|
* test_commit works once againSebastian Thiel2015-01-051-7/+10
|
* Dum brute force conversion of all types.Sebastian Thiel2015-01-041-4/+5
| | | | | | However, StringIO really is ByteIO in most cases, and py2.7 should run but doesn't. This should be made work first.
* initial set of adjustments to make (most) imports work.Sebastian Thiel2015-01-041-1/+1
| | | | More to come, especially when it's about strings
* Removed unnecessary (non-gitpython) tests and fixed flake80.3.3Sebastian Thiel2015-01-041-3/+12
|
* Bumped version, updated changelog, reduced code smellSebastian Thiel2015-01-041-4/+1
| | | | | There is more work to do though, as many imports are still incorrect. Also, there are still print statements
* Applied autopep8Sebastian Thiel2014-11-191-28/+33
| | | | | Commandline was autopep8 -j 8 --max-line-length 120 --in-place --recursive --exclude "*gitdb*,*async*" git/