summaryrefslogtreecommitdiff
path: root/git/index
Commit message (Collapse)AuthorAgeFilesLines
...
* fix(encoding): in untracked_files() and indexSebastian Thiel2015-07-202-3/+4
| | | | | | | | | | | | * 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]
* Merge branch 'bf/run_hooks_from_working_dir' of ↵Sebastian Thiel2015-02-091-0/+1
|\ | | | | | | https://github.com/yarikoptic/GitPython into yarikoptic-bf/run_hooks_from_working_dir
| * BF: run commit hook with repo.working_dir as cwdYaroslav Halchenko2015-02-081-0/+1
| | | | | | | | | | | | | | | | Otherwise commit hook might rightfully fail, as happens if repository is e.g. git-annex repository. See e.g. now failing https://travis-ci.org/datalad/datalad/builds/49802394\#L1590 which seems to pass tests nicely with patch as this
* | Minor Flake8 fixes.Sebastian Thiel2015-02-091-3/+3
|/ | | | Latest version of it is required to show the issues travis shows as well
* Overhauled all tutorials, and placed them in a unit-test.Sebastian Thiel2015-01-221-1/+2
| | | | | | That way they are protected from regression. Fixes #239
* 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.
* Fixed some doc strings to build correctly with sphinxSebastian Thiel2015-01-141-5/+4
| | | | | | Fixes #7 [ci skip]
* IndexFile.commit() now runs pre-commit and post-commit hooks.Sebastian Thiel2015-01-122-5/+50
| | | | | | | | | 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-063-13/+14
|
* test_fun worksSebastian Thiel2015-01-051-4/+5
|
* Fixed io types to make tests work on PY2 once again.py3Sebastian Thiel2015-01-052-4/+6
| | | | Now it's about going through PY3 issues
* Dum brute force conversion of all types.Sebastian Thiel2015-01-041-5/+9
| | | | | | 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-043-15/+13
| | | | More to come, especially when it's about strings
* Removed unnecessary (non-gitpython) tests and fixed flake80.3.3Sebastian Thiel2015-01-041-1/+1
|
* Bumped version, updated changelog, reduced code smellSebastian Thiel2015-01-044-18/+16
| | | | | There is more work to do though, as many imports are still incorrect. Also, there are still print statements
* Applied autopep8Sebastian Thiel2014-11-194-93/+97
| | | | | 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-52/+65
|
* Merge branch '0.3' of https://github.com/firm1/GitPython into firm1-0.3Sebastian Thiel2014-11-171-2/+2
|\ | | | | | | | | | | | | | | | | | | Fixed most pressing issues, more to come in next commit as we introduced a regression here. Conflicts: git/objects/commit.py git/refs/log.py git/refs/symbolic.py
| * fix syntax errorfirm12014-04-091-1/+1
| |
| * update commit functionfirm12014-03-241-2/+2
| |
* | pep8 linting (trailing whitespace)Antoine Musso2014-11-164-52/+52
| | | | | | | | W291 trailing whitespace
* | pep8 linting (double spaces before comment)Antoine Musso2014-11-161-1/+1
| | | | | | | | E261 at least two spaces before inline comment
* | pep8 linting (whitespace before/after)Antoine Musso2014-11-164-27/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-164-8/+17
| | | | | | | | | | | | 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-165-64/+61
|/ | | | | | | | | | | 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-094-1601/+1601
| | | | probably a good idea to go a little more pep8 (and fix sins of my youth ;) )
* Fixed index test which didn't work anymore due to changes in the way the git ↵Sebastian Thiel2011-06-071-0/+4
| | | | command communicates
* sleep ui hack fix: removed platform.system() to use sys.platform instead, as ↵Sebastian Thiel2011-01-121-1/+1
| | | | platform.system makes a system call itself
* Moved everything into the git subdirectory - some tests still need to be ↵Sebastian Thiel2010-11-255-0/+1738
adjusted