summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* Update test_refs.pytypingDominic2021-07-311-7/+7
|
* Update test_refs.pyDominic2021-07-311-1/+1
|
* Update test_refs.pyDominic2021-07-311-3/+7
|
* Added support of spaces for clone multi_optionsIgor Lakhtenkov2021-07-271-1/+3
|
* Rmv old py2.7 __future__ importsYobmod2021-07-195-9/+0
|
* rmv python 3.5 checks from testsYobmod2021-07-198-24/+15
|
* Merge branch 'main' into Yobmod/mainSebastian Thiel2021-07-011-0/+66
|\
| * Added clone multi_options to SubmoduleIgor Lakhtenkov2021-06-301-0/+66
| |
* | Type Traversable.traverse() better, start types of submoduleYobmod2021-06-302-1/+14
|/
* Adds repo.is_valid_object checkRobert Westman2021-06-051-0/+28
|
* Conditionally throw an errorSebastian Thiel2021-06-041-1/+1
|
* Reverts auto format introduced with 2dbc2be8Robert Westman2021-06-031-10/+8
|
* Fixes test to not throw false negative resultsRobert Westman2021-06-031-1/+2
|
* Adds failing test for repo.tag() methodRobert Westman2021-06-031-7/+18
|
* improve index mode for files with executable bitTodd Zullinger2021-05-251-2/+13
| | | | | | | | | | | | | | | | | The fix for #430 in bebc4f56 (Use correct mode for executable files, 2016-05-19) is incomplete. It fails (in most cases) when files have modes which are not exactly 0644 or 0755. Git only cares whether the executable bit is set (or not). Ensure the mode we set for the index is either 100644 or 100755 based on whether the executable bit is set for the file owner. Do this similarly to how upstream git does it in cache.h¹. Add a test covering various file modes to help catch regressions. Fixes #1253 ¹ https://github.com/git/git/blob/v2.31.1/cache.h#L247
* add initial types to remote.pyyobmod2021-05-035-1/+73
|
* add newlinesyobmod2021-02-281-0/+0
|
* add newlineyobmod2021-02-281-1/+1
|
* add testrunner.py to run all tests (as hook for static analysis)yobmod2021-02-281-0/+7
|
* add replace method to git.CommitLars Kellogg-Stedman2021-02-151-0/+20
| | | | | | | | | | | This adds a replace method to git.Commit. The replace method returns a copy of the Commit object with attributes replaced from keyword arguments. For example: >>> old = repo.head.commit >>> new = old.replace(message='This is a test') closes #1123
* Fix inheritance issue at commit.iter_itemsYuri Volchkov2021-02-051-0/+7
| | | | | | | The iterator used to yield Commit() objects, which does not play well with inheritance. Yield cls() instead. Signed-off-by: Yuri Volchkov <yuri@volch.org>
* fix tests the fast waySebastian Thiel2021-01-081-8/+10
|
* try fixing up test fixtures and implementationSebastian Thiel2021-01-061-4/+8
|
* Fix default actor name handlingAthos Ribeiro2020-10-231-4/+14
| | | | | | | | In c96476b, the new default_name nested function does not contain a retun statement. This leads to an issue when the environment variables are not present, where the actor name would not be set. Signed-off-by: Athos Ribeiro <athos@redhat.com>
* Get system user id in a lazy mannerAthos Ribeiro2020-10-221-1/+24
| | | | | | | | | | | | | | | | Calling getpass.getuser may lead to breakage in environments where there is no entries in the /etc/passwd file for the current user. Setting the environment variables for the git user configurations should prevents GitPython from using values from /etc/passwd. However, doing so will not prevent reading /etc/passwd and looking for an entry with the current user UID. This patch changes the behavior described above so GitPython will perform a lazy evaluation of /etc/passwd, only doing so when the environment variables for the git user configuration are not available. Signed-off-by: Athos Ribeiro <athos@redhat.com>
* Keep flake happyXavier Verges2020-10-051-3/+5
|
* Do not break convention when updating sys.pathXavier Verges2020-10-051-0/+6
|
* git/repo/base.py: is_dirty(): Fix pathspec handlingArnaud Patard2020-09-281-0/+14
| | | | | | | | | | | | | It's possible to specify a pathspec (eg :!foo) to git diff/status/... but it currently fails with: git.exc.GitCommandError: Cmd('/usr/bin/git') failed due to: exit code(128) cmdline: /usr/bin/git diff --abbrev=40 --full-index --raw :!foo stderr: 'fatal: ambiguous argument ':!foo': unknown revision or path not in the working tree. Add missing '--' to the arguments to fix this ambiguity Signed-off-by: Arnaud Patard <apatard@hupstream.com>
* Fix typoEric Dill2020-09-091-1/+1
|
* Ensure that detached HEAD does not raise when comparing branch name.Jeremy Retailleau2020-09-031-0/+17
|
* Add missing rules to match hierarchy pathJeremy Retailleau2020-09-021-0/+8
|
* Add unit testsJeremy Retailleau2020-09-021-0/+99
|
* accept datetime instances as datesAlba Mendez2020-08-311-0/+5
| | | | | | There's no easy way to re-create a commit (i.e. for rewriting purposes), because dates must be formatted as strings, passed, then parsed back. This patch allows parse_date() to accept datetime instances, such as those produced by from_timestamp() above.
* test: add installation testKonrad Weihmann2020-07-121-0/+29
| | | | | | | | | which installs the current codebase in a venv and runs 'import git' to test if codebase can be installed properly. This adds virtualenv to the test requirements Signed-off-by: Konrad Weihmann <kweihmann@outlook.com>
* tests: move to root dirKonrad Weihmann2020-07-1298-0/+17463
| | | | | | | | | This should ensure that tests are NOT packaged into release package by setuptools, as tests are development only + fixtures after moving Signed-off-by: Konrad Weihmann <kweihmann@outlook.com>
* Revert moving tests out of 'git' folder, related to #1030Sebastian Thiel2020-07-1298-17463/+0
|
* tests: move to root dirKonrad Weihmann2020-07-1298-0/+17463
| | | | | | | | | This should ensure that tests are NOT packaged into release package by setuptools, as tests are development only + fixtures after moving Signed-off-by: Konrad Weihmann <kweihmann@outlook.com>
* Moved everything into the git subdirectory - some tests still need to be ↵Sebastian Thiel2010-11-2567-8668/+0
| | | | adjusted
* Implemented dry_run mode including tests for RootModule.update and SubmoduleSebastian Thiel2010-11-251-8/+61
|
* submodule.update: previous_commit is now set according to the stored reflog ↵Sebastian Thiel2010-11-241-0/+3
| | | | value, and is not using ORIG_HEAD anymore
* Adjusted remaining usages of set_reference and set_commit to set a logmessageSebastian Thiel2010-11-241-1/+1
|
* Fixed doc strings, improved error checking on RefLog.write methodSebastian Thiel2010-11-241-0/+3
|
* RefLog: added entry_at method, which is a faster way of reading single ↵Sebastian Thiel2010-11-241-0/+13
| | | | entries, including test
* Renamed msg named parameter to logmsg, as it describes the purpose of the ↵Sebastian Thiel2010-11-241-10/+7
| | | | | | message much better Added test for deletion of reflog file when the corresponding ref is deleted
* Added tests for creation and adjustments of reference, verifying the log ↵Sebastian Thiel2010-11-241-32/+41
| | | | gets written
* Fixed remaining issues, all tests work as expectedSebastian Thiel2010-11-243-12/+17
|
* Unified object and commit handling which should make the reflog handling ↵Sebastian Thiel2010-11-243-11/+12
| | | | much easier. There is some bug in it though, it still needs fixing
* Made previously protected methods public to introduce a method with reflog ↵Sebastian Thiel2010-11-241-3/+14
| | | | support which cannot be exposed using the respective property. Ref-Creation is now fully implemented in python. For details, see doc/source/changes.rst
* Improved refparse error handling in case of out-of-bound indicesSebastian Thiel2010-11-241-1/+8
|
* Implemented revlog.append_entry as classmethod, to assure we will always ↵Sebastian Thiel2010-11-231-8/+3
| | | | | | actually write_append the new entry, instead of rewriting the whole file. Added file-locking and directory handling, so the implementation should be similar (enough) to the git reference implementation. Next up is to implement a way to update the reflog when changing references, which is going to be a little more complicated