summaryrefslogtreecommitdiff
path: root/git/test
Commit message (Collapse)AuthorAgeFilesLines
* BF: wrap map into list, since iterator is not well digested by GitConfigParserYaroslav Halchenko2017-11-271-1/+1
|
* BF: process included files before the restYaroslav Halchenko2017-11-274-3/+42
|
* Merge pull request #697 from cblegare/masterSebastian Thiel2017-11-191-1/+11
|\ | | | | Remove trailing slash on drive path
| * Remove trailing slash on drive pathCharles Bouchard-Légaré2017-11-161-1/+11
| |
* | Merge pull request #693 from satahippy/masterSebastian Thiel2017-11-191-29/+85
|\ \ | |/ |/| commit-msg hook support
| * IndexFile.commit() now runs pre-commit and post-commit and commit-msg hooks.satahippy2017-10-301-29/+85
| |
* | Converting path in clone and clone_from to str before any other operation in ↵Mikuláš Poul2017-10-071-0/+14
|/ | | | case eg pathlib.Path is passed
* Keeping env values passed to `clone_from`Piotr Babij2017-09-301-0/+9
|
* Merge branch 'master' into masterSebastian Thiel2017-09-281-0/+9
|\
| * Merge branch 'master' into adding_setup_for_git_executableSebastian Thiel2017-09-282-2/+4
| |\
| * | Renamed refresh to setup and removed alias function & added unittestOdegard, Ken2017-07-091-0/+9
| | | | | | | | | | | | | | | | | | Renamed to simplify and avoid issue with nose tests trying to use `setup` as a setup for testing. Unittest implements basic test for refreshing with a bad git path versus a good git path.
* | | Merge branch 'master' into masterSebastian Thiel2017-09-282-2/+4
|\ \ \ | | |/ | |/|
| * | Merge pull request #654 from vathpela/worktreesSebastian Thiel2017-09-281-0/+2
| |\ \ | | | | | | | | worktrees: make non-packed refs also work correctly.
| | * | worktrees: make non-packed refs also work correctly.Peter Jones2017-08-221-0/+2
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Turns out aec58a9 did the right thing for /packed/ refs, but didn't work correctly on /unpacked/ refs. So this patch gives unpacked refs the same treatment. Without the fix here, the test added will cause this traceback: ====================================================================== ERROR: Check that we find .git as a worktree file and find the worktree ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/pjones/devel/github.com/GitPython/git/test/lib/helper.py", line 92, in wrapper return func(self, path) File "/home/pjones/devel/github.com/GitPython/git/test/test_repo.py", line 938, in test_git_work_tree_dotgit self.assertIsInstance(repo.heads['aaaaaaaa'], Head) File "/home/pjones/devel/github.com/GitPython/git/util.py", line 893, in __getitem__ raise IndexError("No item found with id %r" % (self._prefix + index)) IndexError: No item found with id 'aaaaaaaa' Woops. Things I've learned: - test_remote doesn't work currently if you start on a branch. I think it never did? - Because of 346424da, all *sorts* of stuff in the test suite doesn't work if you name your development branch "packed-refs" (This seems like a bug...) Signed-off-by: Peter Jones <pjones@redhat.com>
| * | Fix test_docsSebastian Thiel2017-09-281-2/+2
| |/ | | | | | | It's not portable to test for a secific author name
* | test if it accepts environment variables in commandsAnson Mansfield2017-07-192-0/+15
|/
* Update changelog and improve docs on skipped testSebastian Thiel2017-07-011-1/+2
| | | | [skip ci]
* Try to ignore test on windows as it fails for the wrong reasonsSebastian Thiel2017-07-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Here is the error log we see: ====================================================================== ERROR: test_git_submodules_and_add_sm_with_new_commit (git.test.test_submodule.TestSubmodule) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\projects\gitpython\git\test\lib\helper.py", line 92, in wrapper return func(self, path) File "C:\projects\gitpython\git\test\test_submodule.py", line 709, in test_git_submodules_and_add_sm_with_new_commit smm.git.commit(m="new file added") File "C:\projects\gitpython\git\cmd.py", line 425, in <lambda> return lambda *args, **kwargs: self._call_process(name, *args, **kwargs) File "C:\projects\gitpython\git\cmd.py", line 877, in _call_process return self.execute(call, **exec_kwargs) File "C:\projects\gitpython\git\cmd.py", line 688, in execute raise GitCommandError(command, status, stderr_value, stdout_value) GitCommandError: Cmd('git') failed due to: exit code(128) cmdline: git commit -m new file added stderr: ' *** Please tell me who you are.
* Maybe work around AppVeyor setting a bad email?Peter Jones2017-07-011-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | One of the submodule tests says: Traceback (most recent call last): File "C:\projects\gitpython\git\test\lib\helper.py", line 92, in wrapper return func(self, path) File "C:\projects\gitpython\git\test\test_submodule.py", line 706, in test_git_submodules_and_add_sm_with_new_commit smm.git.commit(m="new file added") File "C:\projects\gitpython\git\cmd.py", line 425, in <lambda> return lambda *args, **kwargs: self._call_process(name, *args, **kwargs) File "C:\projects\gitpython\git\cmd.py", line 877, in _call_process return self.execute(call, **exec_kwargs) File "C:\projects\gitpython\git\cmd.py", line 688, in execute raise GitCommandError(command, status, stderr_value, stdout_value) git.exc.GitCommandError: Cmd('git') failed due to: exit code(128) cmdline: git commit -m new file added stderr: ' *** Please tell me who you are. Run git config --global user.email "you@example.com" git config --global user.name "Your Name" to set your account's default identity. Omit --global to set the identity only in this repository. fatal: unable to auto-detect email address (got 'appveyor@APPVYR-WIN.(none)')' Clearly this is failing because (none) isn't a valid TLD, but I figure I'll try to set a fake value and see if that works around it.
* Repo: handle worktrees betterPeter Jones2017-07-012-12/+51
| | | | | | | | | | | | | This makes Repo("foo") work when foo/.git is a file of the form created by "git worktree add", i.e. it's a text file that says: gitdir: /home/me/project/.git/worktrees/bar and where /home/me/project/.git/ is the nominal gitdir, but /home/me/project/.git/worktrees/bar has this worktree's HEAD etc and a "gitdir" file that contains the path of foo/.git . Signed-off-by: Peter Jones <pjones@redhat.com>
* Add base class for package exceptions.Konstantin Popov2017-05-291-0/+27
|
* Python 3.6 invalid escape sequence deprecation fixesVille Skyttä2017-04-096-9/+9
| | | | https://docs.python.org/3/whatsnew/3.6.html#deprecated-python-behavior
* Spelling fixesVille Skyttä2017-03-096-7/+7
|
* Add a fixture to test incremental blame output for git 2.11.1+George Hickman2017-03-072-18/+53
|
* chore(flake): satisfy linterSebastian Thiel2017-02-251-2/+0
|
* Merge branch 'git_work_tree' of https://github.com/tbhartman/GitPython into ↵Sebastian Thiel2017-02-251-0/+29
|\ | | | | | | tbhartman-git_work_tree
| * check for GIT_WORK_TREETimothy B. Hartman2017-02-241-0/+29
| |
* | Merge pull request #555 from ankostis/cntxtmmanSebastian Thiel2017-02-251-6/+10
|\ \ | |/ |/| Retrofit `repo` class as context-man to cleanup global mman on repo-delete
| * fix(leaks, TCs): attempt to cleanup mman before deleting tmp-dirsKostis Anagnostopoulos2016-12-081-6/+10
| |
* | fix(remote): testSebastian Thiel2016-12-221-1/+1
| | | | | | | | | | Should have paid more attention to the test-failure before pushing the fix.
* | chore(lint): flake8 pacificationSebastian Thiel2016-12-081-1/+0
| |
* | fix(refs): handle quoted branch namesSebastian Thiel2016-12-081-0/+12
|/ | | | Fixes #550
* Merge pull request #541 from andy-maier/py26_fixesSebastian Thiel2016-12-089-17/+48
|\ | | | | Fixes to support Python 2.6 again.
| * Fixes to support Python 2.6 again.Andreas Maier2016-10-249-17/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Details: - Added Python 2.6 again to .travis.yml (it was removed in commit 4486bcb). - Replaced the use of dictionary comprehensions in `git/cmd.py` around line 800 with the code before that change (in commit 25a2ebf). Reason: dict comprehensions were introduced only in Python 2.7. - Changed the import source for `SkipTest` and `skipIf` from `unittest.case` to first trying `unittest` and upon ImportError from `unittest2`. This was done in `git/util.py` and in several testcases. Reason: `SkipTest` and `skipIf` were introduced to unittest only in Python 2.7, and `unittest2` is a backport of `unittest` additions to Python 2.6. - In git/test/lib/helper.py, fixed the definition of `assertRaisesRegex` to work on py26. - For Python 2.6, added the `unittest2` dependency to `requirements.txt` and changed `.travis.yml` to install `unittest2`. Because git/util.py uses SkipTest from unittest/unittest2, the dependency could not be added to `test-requirements.txt`. - Fixed an assertion in `git/test/test_index.py` to also allow a Python 2.6 specific exception message. - In `is_cygwin_git()` in `git/util.py`, replaced `check_output()` with `Popen()`. It was added in Python 2.7. - Enabled Python 2.6 for Windows: - Added Python 2.6 for MINGW in .appveyor.yml. - When defining `PROC_CREATIONFLAGS` in `git/cmd.py`, made use of certain win32 and subprocess flags that were introduced in Python 2.7, dependent on whether we run on Python 2.7 or higher. - In `AutoInterrupt.__del__()` in `git/cmd.py`, allowed for `os` not having `kill()`. `os.kill()` was added for Windows in Python 2.7 (For Linux, it existed in Python 2.6 already).
* | chore(lint): flake8Sebastian Thiel2016-12-081-1/+1
|/ | | | | | | | Interestingly only shows in particular python versions on travis. Maybe some caching effect? Locally it is reproducible easily, with the latest flake8
* Merge branch 'win_mmap' of https://github.com/ankostis/GitPython into ↵Sebastian Thiel2016-10-223-23/+1
|\ | | | | | | ankostis-win_mmap
| * fix(win_mmap): unmark hidden win_errors due to smmap unicode foesKostis Anagnostopoulos2016-10-223-9/+0
| | | | | | | | | | | | | | Now 2 more TCs pass in Windows: + TestRepo.test_file_handle_leaks() + TestObjDbPerformance.test_random_access() See https://github.com/gitpython-developers/smmap/pull/30
| * submodule-TCs: stop monekypatching smmap.MapRegion with files in WindowsKostis Anagnostopoulos2016-10-221-14/+0
| | | | | | | | Obviously it is not needed anymore, or nothing is worse without this monkeypatch.
* | Merge remote-tracking branch 'origin/master' into exp_git_dirKostis Anagnostopoulos2016-10-222-4/+3
|\ \ | |/
| * Merge branch 'cygwin' of https://github.com/ankostis/GitPython into ↵Sebastian Thiel2016-10-2218-319/+433
| |\ | | | | | | | | | ankostis-cygwin
| * | Fix some typosSantiago Castro2016-10-202-2/+2
| | |
* | | Merge with latest branch 'exp_git_dir'Kostis Anagnostopoulos2016-10-192-18/+22
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | Conflicts: git/repo/base.py git/repo/fun.py git/test/test_submodule.py
| * | repo: minor code and doc correcions.Kostis Anagnostopoulos2016-10-191-2/+2
| |/ | | | | | | | | | | | | + Expansion of paths also `osp.normalize()` them. + Make Repo-fields --> class-fields to avoid initializations on construct. + Explain and rename `git.repo.fun.find_git_dir()` is for submodules (`find_submodule_git_dir()`).
| * Fix flake8 errorBenjamin Poldrack2016-10-191-1/+1
| |
| * Add a test for persistent git optionsBenjamin Poldrack2016-10-181-0/+14
| |
* | tc-helper: fix minor contexlib abuseKostis Anagnostopoulos2016-10-171-4/+3
| |
* | helper: minor fix prefix of temp-dirsKostis Anagnostopoulos2016-10-171-2/+2
| |
* | cygwin, appveyor, #533: Enable actual failures, hide certain 2+2 casesKostis Anagnostopoulos2016-10-163-8/+41
| |
* | Merge with #532, fix unicode filenames with escapesurogatesKostis Anagnostopoulos2016-10-162-8/+12
|\ \ | |/
| * fix(surrogateescape): enable on py2, fix testsSebastian Thiel2016-10-161-2/+10
| |