aboutsummaryrefslogtreecommitdiff
path: root/git/index/base.py
AgeCommit message (Collapse)Author
2018-03-18Rewrite unnecessary dict/list/tuple calls as literalsHugo
2017-10-30IndexFile.commit() now runs pre-commit and post-commit and commit-msg hooks.satahippy
2017-03-09Spelling fixesVille Skyttä
2016-10-22Merge branch 'cygwin' of https://github.com/ankostis/GitPython into ↵Sebastian Thiel
ankostis-cygwin
2016-10-20Fix some typosSantiago Castro
2016-10-16src: reduce needless deps to `gitdb.util`Kostis Anagnostopoulos
2016-10-16src: import os.path as ospKostis Anagnostopoulos
2016-10-04src: No PyDev warningsKostis Anagnostopoulos
+ 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
2016-10-01Win, #519: FIX repo TCs.Kostis Anagnostopoulos
+ 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.
2016-09-28Proc, #519: Rework error-exc msgs & log thread-pumps errorsKostis Anagnostopoulos
+ No WindowsError exception. + Add `test_exc.py` for unicode issues. + Single-arg for decoding-streams in pump-func.
2016-09-28src: constify is_<platform>() callsKostis Anagnostopoulos
+ TCs: unittest-asserts for git-tests.
2016-09-27src, #519: collect all is_<platform>() callsKostis Anagnostopoulos
2016-09-25fix(index): improve LockedFD handlingSebastian Thiel
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
2016-06-20Commit without executing hooks, fixes #468Peter Bengtsson
2016-04-13fix(index): avoid recursing endlessly in add()Piotr Pietraszkiewicz
Issue #407
2016-01-08DOC: minor typosYaroslav Halchenko
2015-07-20fix(index): remove invalid keyword argumentSebastian Thiel
It was a left-over of some prior hacking that was not removed by accident.
2015-07-20fix(encoding): in untracked_files() and indexSebastian Thiel
* 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
2015-07-17added tests for commits with datesavi
2015-07-17Added two extra paramaters for commit to take author date and commit dateavi
2015-06-26fix(index): handle adding symlinks to dirsSebastian Thiel
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
2015-04-08fix(index): _store_path() now closes it's streamSebastian Thiel
This should prevent a resource warning given in py3 Fixes #263
2015-04-08fix(index): don't write extension data by defaultSebastian Thiel
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
2015-02-23Improved documentation on IndexFile.add(...)Sebastian Thiel
Related to #224 [ci skip]
2015-01-21Fixed regression in test-suite for IndexFileSebastian Thiel
Previously, it checked for AssertionErrors, now we have to implement need-unbare-repo check ourselves.
2015-01-12IndexFile.commit() now runs pre-commit and post-commit hooks.Sebastian Thiel
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
2015-01-12Removed os.path.realpath invocations as they are not necessary if paths are ↵Sebastian Thiel
used consistently. This will save IOPs, and make the code easier to understand (I suppose). Related to #224
2015-01-12Removed all previously added invocations of os.path.realpath as it wasn't ↵Sebastian Thiel
required afterall. Turns out that the now removed `read_gitfile` functions applied os.path.realpath which caused the issue described in #224. Fixes #224
2015-01-12Repo paths are now converted to real paths, as well as all paths involved in ↵Sebastian Thiel
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
2015-01-07Implemented non-blocking operations using poll()Sebastian Thiel
Next up is using threads
2015-01-06test_index worksSebastian Thiel
2015-01-05Fixed io types to make tests work on PY2 once again.Sebastian Thiel
Now it's about going through PY3 issues
2015-01-04Dum brute force conversion of all types.Sebastian Thiel
However, StringIO really is ByteIO in most cases, and py2.7 should run but doesn't. This should be made work first.
2015-01-04initial set of adjustments to make (most) imports work.Sebastian Thiel
More to come, especially when it's about strings
2015-01-04Bumped version, updated changelog, reduced code smellSebastian Thiel
There is more work to do though, as many imports are still incorrect. Also, there are still print statements
2014-11-19Applied autopep8Sebastian Thiel
Commandline was autopep8 -j 8 --max-line-length 120 --in-place --recursive --exclude "*gitdb*,*async*" git/
2014-11-17Allow Index.add() on bare repositoriesSebastian Thiel
2014-11-17Merge branch '0.3' of https://github.com/firm1/GitPython into firm1-0.3Sebastian Thiel
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
2014-11-16pep8 linting (trailing whitespace)Antoine Musso
W291 trailing whitespace
2014-11-16pep8 linting (double spaces before comment)Antoine Musso
E261 at least two spaces before inline comment
2014-11-16pep8 linting (whitespace before/after)Antoine Musso
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
2014-11-16pep8 linting (blank lines expectations)Antoine Musso
E301 expected 1 blank line, found 0 E302 expected 2 blank lines, found 1 E303 too many blank lines (n)
2014-11-16pep8 linting (whitespaces)Antoine Musso
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
2014-04-09fix syntax errorfirm1
2014-03-24update commit functionfirm1
2014-02-09tabs to 4 spaces - this won't make integrating the patches easier, but it's ↵Sebastian Thiel
probably a good idea to go a little more pep8 (and fix sins of my youth ;) )
2011-06-07Fixed index test which didn't work anymore due to changes in the way the git ↵Sebastian Thiel
command communicates
2011-01-12sleep ui hack fix: removed platform.system() to use sys.platform instead, as ↵Sebastian Thiel
platform.system makes a system call itself
2010-11-25Moved everything into the git subdirectory - some tests still need to be ↵Sebastian Thiel
adjusted