summaryrefslogtreecommitdiff
path: root/test/test_repo.py
Commit message (Collapse)AuthorAgeFilesLines
* Add test to verify GitCommandError is raised when check-ignore is run ↵Axel Aguado2023-01-211-1/+12
| | | | against a file behind a symlink
* Add test_ignored_items_reportedAxel Aguado2023-01-211-0/+16
|
* fix clone_from_unsafe_protocol testsFC Stegerman2023-01-081-5/+30
|
* replace tempfile.mkdtemp w/ tempfile.TemporaryDirectoryFC Stegerman2023-01-081-133/+143
|
* Updates from reviewSantos Gallegos2022-12-281-1/+13
|
* Update/add tests for Repo.clone*Santos Gallegos2022-12-271-27/+121
|
* Block unsafe options and protocols by defaultSantos Gallegos2022-12-231-2/+3
|
* Forbid unsafe protocol URLs in Repo.clone{,_from}()Steve Kowalik2022-12-231-0/+36
| | | | | | | | | Since the URL is passed directly to git clone, and the remote-ext helper will happily execute shell commands, so by default disallow URLs that contain a "::" unless a new unsafe_protocols kwarg is passed. (CVE-2022-24439) Fixes #1515
* Add testSantos Gallegos2022-12-211-0/+26
|
* feat(blame): Support custom `rev_opts` for blameJoseph Hale2022-08-301-0/+7
| | | | | | | | | | | | | | | | The `git blame` CLI offers a repeated `-C` option that can be used to detect lines that move within/between files. While a slower operation, it yields more accurate authorship reports. https://git-scm.com/docs/git-blame#Documentation/git-blame.txt--Cltnumgt While GitPython does enable passing custom kwargs to the command line `git` invocation, the fact that kwargs is a dictionary (i.e. no duplicate keys) means that there was no way to request the `-C` option in `git blame` more than once. This commit adds an optional `rev_opts` parameter to the `blame` method which accepts a list of strings to propagate to the CLI invocation of `git blame`. By using a `List[str]` for `rev_opts`, users of GitPython can pass now the `-C` option multiple times to get more detailed authorship reports from `git blame`.
* TST: Mark test_repo.TestRepo.test_submodules as xfail on CygwinDWesl2022-06-201-0/+8
|
* reformat according to 'black' configuration file.Sebastian Thiel2022-05-181-57/+19
|
* Run everything through 'black'Sebastian Thiel2022-05-181-191/+286
| | | | | That way people who use it won't be deterred, while it unifies style everywhere.
* chore: `s/strip_newline/&_in_stdout`Hiroki Tokunaga2022-04-071-2/+2
|
* feat(cmd): add the `strip_newline` flagHiroki Tokunaga2022-04-061-0/+10
| | | | | | | | This commit adds the `strip_newline` flag to the `Git.execute` method. When this flag is set to `True`, it will trim the trailing `\n`. The default value is `True` for backward compatibility. Setting it to `False` is helpful for, e.g., the `git show` output, especially with the binary file, as the missing `\n` may invalidate the file.
* Added support of spaces for clone multi_optionsIgor Lakhtenkov2021-07-271-1/+3
|
* 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
|
* add initial types to remote.pyyobmod2021-05-031-0/+15
|
* 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>
* tests: move to root dirKonrad Weihmann2020-07-121-0/+1031
| | | | | | | | | 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-121-1031/+0
|
* tests: move to root dirKonrad Weihmann2020-07-121-0/+1031
| | | | | | | | | 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-251-604/+0
| | | | adjusted
* Adjusted remaining usages of set_reference and set_commit to set a logmessageSebastian Thiel2010-11-241-1/+1
|
* Improved refparse error handling in case of out-of-bound indicesSebastian Thiel2010-11-241-1/+8
|
* repo.rev_parse: Added support for simple log parsing - dates are not yet ↵Sebastian Thiel2010-11-231-3/+20
| | | | supported, mainly because I don't need it
* Updated MANIFEST and setup to include fixtures. Adjusted includes in all ↵Sebastian Thiel2010-11-211-1/+1
| | | | tests to work with the new directory structure
* flattened test folder structure, didn't adjust any file content yetSebastian Thiel2010-11-211-0/+580