summaryrefslogtreecommitdiff
path: root/git/objects
Commit message (Collapse)AuthorAgeFilesLines
...
* config, #525: polish more config-urlsKostis Anagnostopoulos2016-10-121-0/+4
|
* FIX #526: Do not depend on test-sourcesKostis Anagnostopoulos2016-10-111-1/+1
| | | | | | + Move `HIDE_WINDOWS_KNOWN_ERRORS` flag from `git.test.lib.helper-->git.util`; regular modules in main-sources folder also depend on that flag. + Use unittest.SkipTest instead of from non-standard `nose` lib.
* config: FIX regression by prev commit "wrap all conf..."Kostis Anagnostopoulos2016-10-041-2/+2
| | | | | | + Bug appeared as last 5 TCs (test_commit & test_stream) said: OSError: [WinError 6] The handle is invalid
* io: Wrap (probably) allconfig_writers in `with` blocksKostis Anagnostopoulos2016-10-041-39/+27
|
* src: No PyDev warningsKostis Anagnostopoulos2016-10-045-15/+17
| | | | | | | | + 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
* hidden win-errs: Let leaking TCs run till end, then hideKostis Anagnostopoulos2016-10-041-5/+19
| | | | | | | | | + Detect code breaking the body of TCs eventually hidden win-errors by raising SkipTest ALAP. + submodule.base.py: import classes from `git.objects` instead of `utils`. + had to ++ ulimit 100->110 for the extra code tested (more leaks :-) + Centralize is_win detection.
* BF: Allow to remove a submodule with a remote without refsYaroslav Halchenko2016-10-031-1/+1
|
* io, #519: ALL open() --> with open()Kostis Anagnostopoulos2016-10-011-0/+2
| | | + Some cases had restructuring of code.
* Win, #519: FIX repo TCs.Kostis Anagnostopoulos2016-10-011-9/+12
| | | | | | | | | | | | | | | + 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.
* FIX hook TC on PY3+Win & indeterministic lock timing.Kostis Anagnostopoulos2016-09-291-0/+2
| | | | | | | | | + Cannot `index.path` into ENV, it is bytes! + The hook TC never runs on linux! + Unblock removal of odbfile in perf-large streams TC. + Attempt to unblock removal of submodule file by intensive cleaning. more unblock files
* fix(commit): handle gpgsig properlySebastian Thiel2016-08-211-5/+10
| | | | | | | Assure that gpgsig is not initialized with None to allow the automatic deserialization to kick in. Fixes #500
* Fixed 'TypeError: decode() takes no keyword arguments' on Python 2.6Andreas Maier2016-06-011-3/+3
|
* Ignore invalid data when decoding commit objectsfix-for-invalid-data-in-commitsVincent Driessen2016-05-301-3/+3
| | | | | | Previously, GitPython chokes on this while decoding. Rather than choking, instead accept the error and replace the invalid bytes by the � (\x80) char.
* Add support for getting "aware" datetime infoVincent Driessen2016-04-192-2/+39
| | | | | | | | | | | | | | | | This adds 2 properties to commits. Their values are derived from the existing data stored on them, but this makes them more conveniently queryable: - authored_datetime - committed_datetime These return "aware" datetimes, so they are effectively companions to their raw timestamp equivalents, respectively `authored_date` and `committed_date`. These datetime instances are convenient structures since they show the author-local commit date and their UTC offset.
* fix(tree): show that fixing Tree.cache is not possibleSebastian Thiel2015-12-141-23/+29
| | | | | | | | | | The problem is that a per-tree modification API cannot work properly, as the sorting is based on full paths of all entries within the repository. This feat can only be achieved by the index, which to my knowledge already does it correctly. The only fix is to remove the misleading API entirely, which will happen in the next commit. Related to #369
* chore(tree): remove dead codeSebastian Thiel2015-12-131-1/+0
| | | | [skip ci]
* fix(tree): tree item sort now uses git-styleSebastian Thiel2015-12-131-1/+49
| | | | | | | | | Previously it was possible to generate trees which didn't appear legit to git as gitpython's sorting was a simple alpha-numeric sort. Git uses one that minimizes literal string comparisons though, and thus behaves slightly differently sometimes. Fixes #369
* fix(commit): respect daylight saving when computing utc-offsetSebastian Thiel2015-11-081-2/+6
| | | | Related to #362
* fix(commit): serialization timezone handlingSebastian Thiel2015-08-171-1/+1
| | | | | | | | | Previously timezones which were not divisable by 3600s would be parsed correctly, but would serialize into a full hour, rounded up. Now floating point computation is used which fixes the issue. Related to #336
* gic {init,clone} --separate-git-dir is supported only since 1.7.5Julien Pivotto2015-07-221-1/+1
| | | | | Without this commit the update() function of a submodule does not work in CentOS 6.
* typo in submodules api documentationJulien Pivotto2015-07-171-1/+1
|
* Added two extra paramaters for commit to take author date and commit dateavi2015-07-171-3/+10
|
* Added NullHandlers to all loggers to preven "No handler" messagesJames Nowell2015-06-253-0/+3
| | | | | | | | When the code is run without setting up loggers, the loggers have no handlers for the emitted messages. The logging module displays: `No handlers could be found for logger "git.cmd"` on the console. By adding a NullHandler (a no-op) the message disappears, and doesn't affect logging when other handlers are configured.
* Fix type error (startswith expects bytes)John L. Walker2015-05-131-1/+1
|
* Fix problem with submodules on WindowsMarkus Siemens2015-04-071-1/+2
| | | | | | | | On Windows, `repo.create_submodule(...)` failed because git didn't recognize the worktree path set in `.git/modules/sub/config` (`fatal: bad config file line 6 in ./config`). This commit makes `_write_git_file_and_module_config` convert the worktree path to the linux format (forward slashes) which git recognizes.
* Fix typoKyle P. Johnson2015-03-271-1/+1
|
* fix(iter-commit): ambiguous argument errorSebastian Thiel2015-03-021-2/+5
| | | | | | | | | | | | | | | In repositories like > git branch -a * test > ls test `repo.iter_commits` failed due to an ambigous argument (`'git rev-list test`). Now this cannot happen anymore. fixes #264
* Apparently, git 1.7.9 supports git-files too, lets assume it's starting at 1.7.0Sebastian Thiel2015-02-201-2/+1
|
* Adjust minimum git version with git-file support.Sebastian Thiel2015-02-191-1/+2
| | | | | | | As I am pretty sure to have tested it with 1.7.0, I assume they added the git file feature somewhere between .0 .10. Fixes #252
* Fix flake8 issue.Sebastian Thiel2015-02-191-4/+6
| | | | It's new in the latest version of flake - thanks travis for letting me know.
* Use uuid instead of tempfile.mkdtmp, which created an actual directory.Sebastian Thiel2015-02-191-2/+2
| | | | | | That, over time, could have caused slow downs due to file-system hassle. Fixes #258
* Overhauled all tutorials, and placed them in a unit-test.Sebastian Thiel2015-01-221-2/+2
| | | | | | That way they are protected from regression. Fixes #239
* Fixed regression in test-suite for IndexFileSebastian Thiel2015-01-212-17/+3
| | | | | Previously, it checked for AssertionErrors, now we have to implement need-unbare-repo check ourselves.
* Added advance usage examples to tutorial and made minor fixes.Sebastian Thiel2015-01-213-3/+10
| | | | | | GIT_PYTHON_TRACE would actually fail (now) if we debugged archive operations. Related to #239
* Initial set of documentation improvements, and a fix to the submodule tests.Sebastian Thiel2015-01-211-2/+5
| | | | | | Now travisci tests should work once again. Related to #239
* Assured that branch changes are properly handled.Sebastian Thiel2015-01-213-28/+11
| | | | | | | | | Previously we could try to remove the branch we are on. Of course, we have a test-case elaborate enough to verify we don't destroy changes in submodules accidentally. Therefore I am confident that this implementation is correct. Fixes #49
* Fixed flake8 and a minor test regression.Sebastian Thiel2015-01-202-23/+26
| | | | | The latter happened as now BadName is thrown, instead of BadObject. Changes.rst was marked accordingly
* Impemented keep_going flag for `Submodule.update()`Sebastian Thiel2015-01-202-350/+376
| | | | Fixes #50
* Submodule.parent_commit() now automatically points to repo.head unless it ↵Sebastian Thiel2015-01-201-27/+38
| | | | | | | | was set before. That way, you don't always have to keep the parent commit uptodate when changing the repo, which can lead to errors which are hard to debug and make no sense to the user, who previously never set parent_commit (yet it matters thanks to the cache).
* Greatly improved possible safety of Submodule.update(), which is used by ↵Sebastian Thiel2015-01-202-25/+68
| | | | | | | | | | | | default. Previously, the implementation would gladly reset new commits in submodules, and/or reset a dirty working tree. Now the new force_reset/force flag has to be specified explicitly to get back to the old behaviour. All submodule tests except for one are working.
* Submodule.move() will auto-rename the submodule if the name was equal to the ↵Sebastian Thiel2015-01-191-0/+6
| | | | | | path Fixes #238
* Implemented Submodule.rename()Sebastian Thiel2015-01-191-4/+78
| | | | | | A test verifies it's truly working. Related to #238
* Submodule.move() fixed to deal with 'non-gitfile' clones appropriately.Sebastian Thiel2015-01-191-1/+1
| | | | | | | Improved a test to assure multiple update(init=False|True) calls don't throw. Fixes #93
* Basic submodule tests are working once again !Sebastian Thiel2015-01-191-10/+18
| | | | | | | | After all, it was easier than expected. It seems that previous assertions the test made should have never been true to begin with. Thus we might have improved the test thanks to our improved implementation. Fixes #233
* Submodule.remove() now seems to work properly, nearly all tests are back.Sebastian Thiel2015-01-171-18/+20
| | | | | | This also means that now we seem to be able to properly handle .git files in submodules Related to #233
* Made sure dry-run is properly implemented in Submodule.remove()Sebastian Thiel2015-01-171-7/+13
| | | | | The root-submodule test is still failing though, this time even earlier than before
* Submodule.remove() now deals with .git files correctly.Sebastian Thiel2015-01-171-15/+29
| | | | A simple test verifies this at least.
* Assured Submodule.(update|move) are dealing with .git files appropriately.Sebastian Thiel2015-01-171-60/+92
| | | | | However, a simple test-case still fails for reasons not yet understood. There is more to be fixed here - .remove() still fails.
* Implemented more tests and made use of .git files when adding submodulesSebastian Thiel2015-01-161-5/+34
| | | | | | | There is some more work to do, as renames and updates still have to be adjusted accordinlgy. Relates #233
* Fixed previously failing testSebastian Thiel2015-01-151-2/+2
| | | | | | It actually revealed a bug in the implementation of Submodule.add, which just showed in python 3 for the wrong reasons. Thankfully, failing tests after all allowed to get this issue fixed ... .