summaryrefslogtreecommitdiff
path: root/git/repo/base.py
Commit message (Collapse)AuthorAgeFilesLines
...
* git/repo/base.py: is_dirty(): Fix pathspec handlingArnaud Patard2020-09-281-1/+1
| | | | | | | | | | | | | 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>
* Add reference to repository to config.Jeremy Retailleau2020-09-021-2/+2
| | | | | | | This is necessary when working with conditional include sections as it requires the git directory or active branch name. https://git-scm.com/docs/git-config#_conditional_includes
* Fixed all warnings in documentation and updated Makefile to treat warnings ↵Kian Cross2020-07-131-3/+3
| | | | as errors.
* Fix exception causes in 7 modulesRam Rachum2020-06-131-2/+2
|
* Fix param format of Repo.commitChenxiong Qi2020-02-241-1/+3
| | | | Signed-off-by: Chenxiong Qi <qcxhome@gmail.com>
* Fix Repo.__repr__ when subclassedJan Matějka2020-02-081-1/+2
|
* Remove and replace compat.text_typeHarmon2020-02-081-3/+2
|
* Remove checks for Python 2 and/or 3Harmon2020-02-081-6/+2
|
* Remove compat.rangeHarmon2020-02-081-1/+0
|
* Remove str import from builtinsHarmon2020-02-081-1/+0
|
* Avoids env var warning when path contains $/%; fix #832Rob Kimball2019-12-061-1/+2
|
* removed Unnecessary “else” after “return”Pratik Anurag2019-10-151-6/+3
|
* git: repo: base: update clone_from env argument descriptionpawel2019-09-301-0/+5
|
* Returning commit object instead of hash valueArthur Milchior2019-08-141-2/+2
|
* Snack case as requested in #903Arthur Milchior2019-08-141-1/+1
|
* Method stating which commit is being played during an halted rebaseArthur Milchior2019-08-141-0/+11
| | | | | | This will be useful to me at least. This way, I know that I can tell my script to omit some specific commits. If you accept to merge it, I may also do similar method for merges and cherry pick.
* Fix performance regression, see #906Sebastian Thiel2019-08-141-40/+16
| | | | | | | | | Revert "use git rev-parse to look for config file" This reverts commit 0b6b90f9f1e5310a6f39b75e17a04c1133269e8f. Fix #906 Reopen #719
* Fix typo in documentationLoïc Antoine Gombeaud2019-08-111-1/+1
| | | `mutli_options` -> `multi_options`
* Drop python 2 support, again (revert previous revert)Sebastian Thiel2019-08-111-0/+1
| | | | This reverts commit 913d806f02cf50250d230f88b897350581f80f6b.
* use git rev-parse to look for config fileBenjamin Dauvergne2019-08-111-16/+40
|
* Revert "Drop python 2.7 support and help with encodings"Sebastian Thiel2019-07-291-1/+0
| | | | This reverts commit dac619e4917b0ad43d836a534633d68a871aecca.
* Drop python 2.7 support and help with encodingsSebastian Thiel2019-07-201-0/+1
| | | | Fixes #312
* Revert "This time, use test-requirements."Sebastian Thiel2019-07-201-1/+0
| | | | | | This reverts commit 74a0507f4eb468b842d1f644f0e43196cda290a1. https://travis-ci.org/gitpython-developers/GitPython/jobs/561334516#L634
* This time, use test-requirements.Sebastian Thiel2019-07-201-0/+1
|
* Revert "Merge branch 'PR-non-ascii-filenames' of ↵Sebastian Thiel2019-07-201-1/+0
| | | | | | | | | | https://github.com/xarx00/GitPython into xarx00-PR-non-ascii-filenames" This reverts commit 3b13c115994461fb6bafe5dd06490aae020568c1, reversing changes made to da8aeec539da461b2961ca72049df84bf30473e1. It doesn't pass, unfortunately. Is it a travis issue? https://travis-ci.org/gitpython-developers/GitPython/jobs/561333763#L340
* Merge branch 'PR-non-ascii-filenames' of https://github.com/xarx00/GitPython ↵Sebastian Thiel2019-07-201-0/+1
|\ | | | | | | into xarx00-PR-non-ascii-filenames
| * builtins module is part of the future packagexarx002019-04-061-1/+1
| |
| * Fix for: No module named builtins (CI tests error)xarx002019-04-061-1/+1
| |
| * added support for non-ascii directories and file namesxarx002019-04-051-0/+1
| |
* | Add support to pass clone options that can be repeated multiple timesSteven Whitman2019-07-061-6/+14
| |
* | Fix typo in docstringAurelio Jargas2019-06-171-2/+2
|/
* Added usage example to Repo __init__.py call for Windows usersAlex2019-03-151-0/+1
|
* read workdir from git.config as referenced in man 1 git-configBjörn Lässig2018-12-221-1/+15
| | | | | | | | Edited-by: Florian Scherf <f.scherf@pengutronix.de> added the remaining feedback in https://github.com/gitpython-developers/GitPython/pull/801/files
* The proper way is return, not raise StopIterationMichael Käufl2018-10-211-3/+12
| | | | | | | See PEP 479[1] which is part of Python 3.7[2]. [1]: https://www.python.org/dev/peps/pep-0479/ [2]: https://docs.python.org/3/whatsnew/3.7.html#changes-in-python-behavior
* Respect _common_dir when finding repository config fileLuc Ritchie2018-10-131-1/+1
| | | | | Among other things, remotes are now correctly identified when in a separate worktree.
* Allow pathlib.Path in Repo.__init__oldPadavan2018-07-151-0/+7
|
* Fix small typoRiley Martine2018-07-151-2/+1
| | | Fix small typo and slightly reword docstring.
* Rewrite unnecessary dict/list/tuple calls as literalsHugo2018-03-181-8/+8
|
* Fix doc typossamuela2018-03-041-12/+12
|
* Remove redundant Python 2.4 codeHugo2017-12-111-8/+2
|
* RF: primarily flake8 lints + minor RF to reduce duplication in PATHEXTYaroslav Halchenko2017-11-271-1/+1
| | | | | I did keep some "bare" except with catch all Exception: , while tried to disable flake8 complaints where clearly all exceptions are to be catched
* Merge pull request #692 from Dreamsorcerer/patch-1Sebastian Thiel2017-11-191-2/+2
|\ | | | | Fix broken progress in clone_from()
| * Update base.pySam Bull2017-10-301-1/+1
| |
| * Update base.pySam Bull2017-10-301-1/+1
| |
* | Merge pull request #686 from jeblair/issue-605Sebastian Thiel2017-11-021-2/+10
|\ \ | | | | | | Only gc.collect() under windows
| * | Only gc.collect() under windowsJames E. Blair2017-10-091-2/+10
| |/ | | | | | | | | | | | | | | | | | | | | | | Under Windows, tempfile objects are holding references to open files until the garbage collector closes them and frees them. Explicit calls to gc.collect() were added to the finalizer for the Repo class to force them to be closed synchronously. However, this is expensive, especially in large, long-running programs. As a temporary measure to alleviate the performance regression on other platforms, only perform these calls when running under Windows. Fixes #553
* | Converting path in clone and clone_from to str before any other operation in ↵Mikuláš Poul2017-10-071-0/+4
|/ | | | case eg pathlib.Path is passed
* Keeping env values passed to `clone_from`Piotr Babij2017-09-301-1/+5
|
* Merge pull request #654 from vathpela/worktreesSebastian Thiel2017-09-281-4/+18
|\ | | | | worktrees: make non-packed refs also work correctly.
| * worktrees: make non-packed refs also work correctly.Peter Jones2017-08-221-4/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>