summaryrefslogtreecommitdiff
path: root/git/test
Commit message (Collapse)AuthorAgeFilesLines
...
* fix(encoding): in untracked_files() and indexSebastian Thiel2015-07-201-13/+15
| | | | | | | | | | | | * 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-0/+11
|
* Correct doc errorsMarian Wieczorek2015-07-161-1/+1
| | | | | | | | | revA..revB → revA...revB (three instead of two dots) [base.py, line 467](https://github.com/gitpython-developers/GitPython/blob/master/git/repo/base.py#L467) rorepo is a ~~a~~ Repo instance [test_docs.py, line 21](https://github.com/gitpython-developers/GitPython/blob/master/git/test/test_docs.py#L21) closes #314
* fix(travis): get py2.6 to workSebastian Thiel2015-07-031-1/+1
| | | | Seems like OSX is somewhat special here ... .
* fix(cmd): work with py3Sebastian Thiel2015-07-031-2/+6
| | | | | | Fixed additional test which seems to have different outcomes depending on the interpreter. This just makes it work withouth attempting to find the root cause of the issue.
* fix(cmd): don't open stdout when fetchingSebastian Thiel2015-07-032-11/+26
| | | | | | | This allows us to use the main thread to parse stderr to get progress, and resolve assertion failures hopefully once and for all. Relates to #301
* test(git): remove unnecessary fixtureSebastian Thiel2015-07-032-5015/+12
| | | | | Test was adjusted as well to parse only a single file which simulates stderr output.
* fix(cmd): line parsingSebastian Thiel2015-07-033-0/+10020
| | | | | | * Previously we could fail to parse the last line within a read buffer, which is now fixed. * Added a test to verify our *slow* line parsing works as expected.
* fix(git-test): assure test does works on linuxSebastian Thiel2015-06-261-1/+2
| | | | | | | It shows that the previous implementation was never really working on linux, and thus failed on travis as well for good reason. Closes #303
* 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(remote): assert fetch respec is setSebastian Thiel2015-06-101-0/+5
| | | | | | | | | | | | It turns out we can't deal do fetches if no refspec is set as git will change the format of the fetch return values, providing less information than usual. A test was added to show that such a case will fail, and an assertion will assure we don't attempt to fetch/pull if there is no refspec for 'fetch'. Closes #296
* fix(test_git): handle `select.poll()` missingSebastian Thiel2015-06-101-6/+10
| | | | | | | | | In that case, the handler for processing stdout and stderr of the git process is offloaded to threads. These currently don't return any exception they raise. We could easily fix this using an approach as shown [here](http://goo.gl/hnVax6).
* fix(config): selective cfg write;fix cfg parserSebastian Thiel2015-04-222-6/+12
| | | | | | | | | | | * config parser now handles quoted values correctly. This doesn't hamper multi-line support. * added regression test to travis to assure we will be warned if we rewrite and break the user's .gitconfig file * only rewrite configuration files if we actually called a mutating method on the writer. Previously it would always rewrite it. Fixes #285
* test: make git-daemon port configurable via envBenedikt Morbach2015-04-212-5/+10
| | | | | add a GIT_PYTHON_TEST_GIT_DAEMON_PORT to set a port other than 9418, for example for when you already have a daemon running on that port.
* test: Make git-daemon only listen on localhostBenedikt Morbach2015-04-211-1/+1
| | | | | | | | | | | | No reason to expose a daemon to all interfaces when it is only used for tests, which connect to localhost anyway. I'd love to use localhost here instead, but the git-daemon man page points out: If IPv6 is not supported, then --listen=hostname is also not supported and --listen must be given an IPv4 address. I don't know of a way to check if git has ipv6 support, but 127.0.0.1 should be around for the foreseeable future
* fix(test_docs): we are at major version 1 nowSebastian Thiel2015-04-161-1/+1
| | | | It expected to see major version 0 though.
* Merge branch 'teeberg-master'Sebastian Thiel2015-04-081-9/+0
|\
| * Replace GIT_SSH with GIT_SSH_COMMAND for SSH key management.Jonas Trappenberg2015-02-091-9/+0
| | | | | | | | | | | | Also move untestable documentation out of test. Related: #234, #242
* | fix(test_cmd): handle GitCommandNotFound in testSebastian Thiel2015-04-081-5/+2
| | | | | | | | Related to #248
* | fix(remote): allow to raise during push/fetchSebastian Thiel2015-04-081-2/+1
| | | | | | | | | | | | | | | | | | | | Do not swallow non-zero exit status during push and fetch unless we managed to parse head information. This behaviour will effetively handle cases were no work was done due to invalid refspecs or insufficient permissions. Fixes #271
* | fix(docs): be clear about exit code handlingSebastian Thiel2015-04-081-3/+11
| | | | | | | | | | | | | | | | When pushing/pulling, we ignore errors unless it's exit code 128. The reason for this is now made explicit to make clear that issues are handled by PushInfo flags accordingly. Related #271
* | 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.
* | fix(iter-commit): ambiguous argument errorSebastian Thiel2015-03-021-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Added 'insert_kwargs_after' flag for consumption by _call_process.Sebastian Thiel2015-02-212-0/+7
|/ | | | | | While at it, all other invocations of .git in remote.py were reviewed Fixes #262
* Minor Flake8 fixes.Sebastian Thiel2015-02-092-5/+7
| | | | Latest version of it is required to show the issues travis shows as well
* BF: skip unicode filename test in env not supporting unicode encodingsYaroslav Halchenko2015-02-071-0/+9
|
* ENH: respect GIT_PYTHON_TEST_GIT_REPO_BASE env var in testsYaroslav Halchenko2015-02-071-1/+1
|
* This should fix the test failure on travisSebastian Thiel2015-01-301-0/+5
|
* Added test to verify we can handle fetch prunes.Sebastian Thiel2015-01-301-0/+13
| | | | | | They are just skipped. Fixes #249
* Removed Git.sshkey() as it couldn't be distributed properly.0.3.6Sebastian Thiel2015-01-222-17/+11
| | | | | | | However, I kept information on how to achieve the same thing with `custom_environment()` in the test. Related to #234
* Bumped version to 0.3.6Sebastian Thiel2015-01-221-6/+1
| | | | | | Unfortunately, installation of a executable script has proven to be so difficult thanks setuptools gloriousness, which will force me to remove that feature
* Improved performance of rev-parse test.Sebastian Thiel2015-01-221-2/+9
| | | | | | Hoping to make this significantly faster on travis. Related to #245
* Minor improvements to submodule test for windows portabilitySebastian Thiel2015-01-221-4/+4
| | | | | | | | | However, most tests fail for reasons unknown - SHA cannot be found. For now, I will wait until someone complains, as I doubt too many people will use it on windows. Related to #244
* Added test for `sshkey` context manager.Sebastian Thiel2015-01-222-5/+20
| | | | | | | | It verifies that the script is actually called. Interestingly, the shell script version works within an msysgit environment on windows. Fixes #234
* Merge branch 'master' into teeberg-masterSebastian Thiel2015-01-226-13/+340
|\ | | | | | | | | | | Need latest master to proceed with test Conflicts: doc/source/tutorial.rst
| * This should finally fix travis ciSebastian Thiel2015-01-221-1/+1
| |
| * Fetch now deals with custom refspecs much better.Sebastian Thiel2015-01-224-2/+28
| | | | | | | | | | | | | | | | | | Even though the test-csae only verifies this spec: +refs/pull/*:refs/heads/pull/* I could locally verify that it indeed handles other ones just as well: +refs/pull/*:refs/pull/* Fixes #243
| * Overhauled all tutorials, and placed them in a unit-test.Sebastian Thiel2015-01-223-12/+304
| | | | | | | | | | | | That way they are protected from regression. Fixes #239
* | Intermediate commit on my way to get this finalized.Sebastian Thiel2015-01-221-12/+28
| | | | | | | | | | Renamed context manager 'with_environment' to 'custom_environment'. On my way to implement sshkey test.
* | Add a few testsJonas Trappenberg2015-01-211-0/+20
| |
* | Fix some typosJonas Trappenberg2015-01-211-2/+2
|/
* 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.
* Added advance usage examples to tutorial and made minor fixes.Sebastian Thiel2015-01-214-12/+144
| | | | | | 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-212-5/+46
| | | | | | Now travisci tests should work once again. Related to #239
* Merge branch 'issue-232-reproduction' - keep fetch/pull simplificationsSebastian Thiel2015-01-211-0/+1
|\ | | | | | | | | | | Make sure we keep the improvements made to fetch and pull Relates to #232
| * Remote.fetch|pull() will not use poll/threads anymore as only stderr is read.Sebastian Thiel2015-01-201-0/+1
| | | | | | | | | | | | | | This simplification should improve performance and remove issues like those in #232. NOTE: Debug code is still contained here
* | Assured that branch changes are properly handled.Sebastian Thiel2015-01-211-2/+65
| | | | | | | | | | | | | | | | | | 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-4/+4
| | | | | | | | | | 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-201-2/+5
| | | | | | | | Fixes #50