summaryrefslogtreecommitdiff
path: root/git/index/base.py
Commit message (Collapse)AuthorAgeFilesLines
* First attempt to fix failing test of #1103fix-1103Sebastian Thiel2021-01-071-4/+10
| | | | | | | | | | | | However, the test asserts on the provided context to be correct, which is hard to do in this branch while it's easy to doubt the value of this. Lastly, there seems to be no way to ignore errors in `git` without muting all output, which is in fact parsed. Maybe it's possible to ignore errors while parsing the new kind of error message.
* Fixed all warnings in documentation and updated Makefile to treat warnings ↵Kian Cross2020-07-131-4/+4
| | | | as errors.
* Fix exception causes all over the codebaseRam Rachum2020-06-141-3/+3
|
* Fix flake8 errorsSebastian Thiel2020-05-281-2/+2
|
* Only resolve globs if path does not exist on diskSebastian Thiel2020-03-081-2/+2
| | | | Fixes #994
* Remove and replace compat.string_typesHarmon2020-02-081-5/+4
|
* Remove and replace compat.izipHarmon2020-02-081-3/+2
|
* Remove and replace compat.xrangeHarmon2020-02-081-2/+1
|
* Remove and replace compat.mviterHarmon2020-02-081-5/+4
|
* removed trailing whitespacesPratik Anurag2019-10-151-1/+1
|
* removed trailing whitespacesPratik Anurag2019-10-151-1/+1
|
* renamed unused variablesPratik Anurag2019-10-151-2/+2
|
* As string is iterable, changed to isinstance checkMarcel2019-10-151-8/+4
| | | | test now works
* fixed code repetitionMarcel2019-10-151-30/+29
|
* allow calling index.add, index.move and index.remove with single itemsMarcel2019-10-151-17/+29
| | | | | added testing for it closes #813
* git: index: base: use os.path.relpathRuslan Kuprieiev2018-04-041-3/+2
| | | | | | Fixes #743 Signed-off-by: Ruslan Kuprieiev <kupruser@gmail.com>
* Merge pull request #737 from hugovk/rm-2.6Sebastian Thiel2018-03-241-16/+16
|\ | | | | Drop support for EOL Python 2.6 and 3.3
| * Rewrite unnecessary dict/list/tuple calls as literalsHugo2018-03-181-16/+16
| |
* | Allow mmap not just for py2.6/2.7/3.6+ but also 3.0+Hugo2018-03-181-9/+1
|/
* IndexFile.commit() now runs pre-commit and post-commit and commit-msg hooks.satahippy2017-10-301-0/+19
|
* Spelling fixesVille Skyttä2017-03-091-2/+2
|
* Merge branch 'cygwin' of https://github.com/ankostis/GitPython into ↵Sebastian Thiel2016-10-221-40/+36
|\ | | | | | | ankostis-cygwin
| * src: reduce needless deps to `gitdb.util`Kostis Anagnostopoulos2016-10-161-2/+2
| |
| * src: import os.path as ospKostis Anagnostopoulos2016-10-161-39/+35
| |
* | Fix some typosSantiago Castro2016-10-201-6/+6
|/
* src: No PyDev warningsKostis Anagnostopoulos2016-10-041-7/+6
| | | | | | | | + Mark all unused vars and other non-pep8 (PyDev) warnings + test_utils: + enable & fix forgotten IterableList looped path. + unittestize all assertions. + remote: minor fix progress dispatching unknown err-lines
* Win, #519: FIX repo TCs.Kostis Anagnostopoulos2016-10-011-8/+7
| | | | | | | | | | | | | | | + FIX TestRepo.test_submodule_update(): + submod: del `.git` file prior overwrite; Windows denied otherwise! + FIX TestRepo.test_untracked_files(): + In the `git add <file>` case, it failed with unicode args on PY2. Had to encode them with `locale.getpreferredencoding()` AND use SHELL. + cmd: add `shell` into `execute()` kwds, for overriding USE_SHELL per command. + repo: replace blocky `communicate()` in `_clone()` with thread-pumps. + test_repo.py: unittestize (almost all) assertions. + Replace open --> with open for index (base and TC). + test_index.py: Enabled a dormant assertion.
* Proc, #519: Rework error-exc msgs & log thread-pumps errorsKostis Anagnostopoulos2016-09-281-0/+1
| | | | | + No WindowsError exception. + Add `test_exc.py` for unicode issues. + Single-arg for decoding-streams in pump-func.
* src: constify is_<platform>() callsKostis Anagnostopoulos2016-09-281-1/+1
| | | + TCs: unittest-asserts for git-tests.
* src, #519: collect all is_<platform>() callsKostis Anagnostopoulos2016-09-271-3/+4
|
* fix(index): improve LockedFD handlingSebastian Thiel2016-09-251-2/+12
| | | | | | | | | | Relying on the destructor will not work, even though the code used to rely on it. Now we handle failures more explicitly. Far from perfect, but a good start for a fix. Fixes #514
* Commit without executing hooks, fixes #468Peter Bengtsson2016-06-201-3/+8
|
* fix(index): avoid recursing endlessly in add()Piotr Pietraszkiewicz2016-04-131-3/+11
| | | | Issue #407
* DOC: minor typosYaroslav Halchenko2016-01-081-1/+1
|
* fix(index): remove invalid keyword argumentSebastian Thiel2015-07-201-1/+1
| | | | | It was a left-over of some prior hacking that was not removed by accident.
* fix(encoding): in untracked_files() and indexSebastian Thiel2015-07-201-2/+2
| | | | | | | | | | | | * 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
* added tests for commits with datesavi2015-07-171-1/+2
|
* Added two extra paramaters for commit to take author date and commit dateavi2015-07-171-2/+3
|
* fix(index): handle adding symlinks to dirsSebastian Thiel2015-06-261-0/+11
| | | | | | | | | | When expanding directories, check if it is a symlink and don't expand them at all. Previously, we followed symlinks and expanded their contents, which could lead to weird index files. Fixes #302
* fix(index): _store_path() now closes it's streamSebastian Thiel2015-04-081-0/+1
| | | | | | This should prevent a resource warning given in py3 Fixes #263
* fix(index): don't write extension data by defaultSebastian Thiel2015-04-081-12/+25
| | | | | | | | | | | | | | | | | | | | | | | | | It turned out that the index is not actually corrupted, which is good news. What happens is that `git` writes `TREE` extension data into the index, which causes it to write out the given tree *as is* next time a `git commit` is executed. When using `git add`, this extension data is maintained automatically. However, GitPython doesn't do that ... . Usually this is no problem at all, as you are supposed to use `IndexFile.commit(...)` along with `IndexFile.add(...)`. Thanks to a shortcoming in the GitPython API, the index was automatically written out whenever files have been added, without providing control over whether or not *extension data* will be written along with it. My fix consists of an additional flag in `IndexFile.add(...)`, which causes extension data not to be written by default, so commits can be safely done via `git commit` or `IndexFile.commit(...)`. However, this might introduce new subtle bugs in case someone is relying on extension data to be written. As this can be controlled through the said flag though, a fix is easily done in that case. Fixes #265
* Improved documentation on IndexFile.add(...)Sebastian Thiel2015-02-231-0/+4
| | | | | Related to #224 [ci skip]
* Fixed regression in test-suite for IndexFileSebastian Thiel2015-01-211-1/+7
| | | | | Previously, it checked for AssertionErrors, now we have to implement need-unbare-repo check ourselves.
* IndexFile.commit() now runs pre-commit and post-commit hooks.Sebastian Thiel2015-01-121-2/+6
| | | | | | | | | However, it does so only on posix. The test-case will run on posix only as well. Please note that in theory, even on windows we will attempt to run hooks, even though I am not sure that this will actually work. Fixes #81
* Removed os.path.realpath invocations as they are not necessary if paths are ↵Sebastian Thiel2015-01-121-2/+8
| | | | | | | | used consistently. This will save IOPs, and make the code easier to understand (I suppose). Related to #224
* Removed all previously added invocations of os.path.realpath as it wasn't ↵Sebastian Thiel2015-01-121-1/+0
| | | | | | | | | 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-0/+1
| | | | | | | | | 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
* Implemented non-blocking operations using poll()Sebastian Thiel2015-01-071-11/+8
| | | | Next up is using threads
* test_index worksSebastian Thiel2015-01-061-11/+12
|
* Fixed io types to make tests work on PY2 once again.py3Sebastian Thiel2015-01-051-2/+4
| | | | Now it's about going through PY3 issues