summaryrefslogtreecommitdiff
path: root/git/test/test_index.py
Commit message (Collapse)AuthorAgeFilesLines
...
* fix(compat): make test work with git >= 2.5Sebastian Thiel2015-08-291-0/+3
|
* 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(index):allow adding non-unicode paths to indexSebastian Thiel2015-07-291-0/+13
| | | | | | | | | 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
* added tests for commits with datesavi2015-07-171-0/+11
|
* fix(index): handle adding symlinks to dirsSebastian Thiel2015-06-261-12/+16
| | | | | | | | | | 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): don't write extension data by defaultSebastian Thiel2015-04-081-15/+0
| | | | | | | | | | | | | | | | | | | | | | | | | 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
* test(index): test for #265Sebastian Thiel2015-04-071-0/+15
| | | | | However, it doesn't reproduce on the latest version of GitPython. Maybe it's on an older one.
* Fixed regression in test-suite for IndexFileSebastian Thiel2015-01-211-4/+8
| | | | | Previously, it checked for AssertionErrors, now we have to implement need-unbare-repo check ourselves.
* Improved unicode handling when using os.environ or GitConfigParserSebastian Thiel2015-01-191-1/+2
| | | | | | | Assured unicode values are supported when reading the configuration, and when getting author/committer information from the environment. Fixes #237
* IndexFile.commit() now runs pre-commit and post-commit hooks.Sebastian Thiel2015-01-121-0/+21
| | | | | | | | | 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-1/+1
| | | | | | | | used consistently. This will save IOPs, and make the code easier to understand (I suppose). Related to #224
* Made sure commits accept unicode or unicode charactersSebastian Thiel2015-01-071-6/+8
|
* fix pep8firm12015-01-071-2/+3
|
* add tests for commit by actorfirm12015-01-071-0/+16
|
* test_repo worksSebastian Thiel2015-01-061-0/+1
|
* test_index worksSebastian Thiel2015-01-061-18/+19
|
* Fixed io types to make tests work on PY2 once again.py3Sebastian Thiel2015-01-051-3/+3
| | | | Now it's about going through PY3 issues
* Dum brute force conversion of all types.Sebastian Thiel2015-01-041-1/+2
| | | | | | 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
* Replaced ordered dict with standard version; used logging moduleSebastian Thiel2015-01-041-1/+0
| | | | All performance tests still print to stderr, but do so in a py3 compatible way
* Removed 'from X import *' whereever possibleSebastian Thiel2015-01-041-2/+17
|
* Bumped version, updated changelog, reduced code smellSebastian Thiel2015-01-041-19/+18
| | | | | There is more work to do though, as many imports are still incorrect. Also, there are still print statements
* Applied autopep8Sebastian Thiel2015-01-041-1/+1
| | | | autopep8 -v -j 8 --max-line-length 120 --in-place --recursive
* Fixed all remaining non-performance testsSebastian Thiel2015-01-031-2/+8
| | | | | | | * travis configuration adjusted to hopefully work better than before Performance traversal still fails when using git-python as standard repository. It naturally wants a larger one. On travis these tests are skipped though.
* Applied autopep8Sebastian Thiel2014-11-191-8/+11
| | | | | Commandline was autopep8 -j 8 --max-line-length 120 --in-place --recursive --exclude "*gitdb*,*async*" git/
* Allow Index.add() on bare repositoriesSebastian Thiel2014-11-171-0/+34
|
* pep8 linting (trailing whitespace)Antoine Musso2014-11-161-26/+26
| | | | W291 trailing whitespace
* pep8 linting (whitespace before/after)Antoine Musso2014-11-161-19/+19
| | | | | | | | | | | | | E201 whitespace after '(' E202 whitespace before ')' E203 whitespace before ':' E225 missing whitespace around operator E226 missing whitespace around arithmetic operator E227 missing whitespace around bitwise or shift operator E228 missing whitespace around modulo operator E231 missing whitespace after ',' E241 multiple spaces after ',' E251 unexpected spaces around keyword / parameter equals
* pep8 linting (blank lines expectations)Antoine Musso2014-11-161-6/+2
| | | | | | E301 expected 1 blank line, found 0 E302 expected 2 blank lines, found 1 E303 too many blank lines (n)
* pep8 linting (whitespaces)Antoine Musso2014-11-161-110/+108
| | | | | | | | | | | W191 indentation contains tabs E221 multiple spaces before operator E222 multiple spaces after operator E225 missing whitespace around operator E271 multiple spaces after keyword W292 no newline at end of file W293 blank line contains whitespace W391 blank line at end of file
* tabs to 4 spaces - this won't make integrating the patches easier, but it's ↵Sebastian Thiel2014-02-091-651/+651
| | | | probably a good idea to go a little more pep8 (and fix sins of my youth ;) )
* Moved everything into the git subdirectory - some tests still need to be ↵Sebastian Thiel2010-11-251-0/+669
adjusted