summaryrefslogtreecommitdiff
path: root/git/refs/head.py
Commit message (Collapse)AuthorAgeFilesLines
* reformat according to 'black' configuration file.Sebastian Thiel2022-05-181-29/+9
|
* Run everything through 'black'Sebastian Thiel2022-05-181-26/+61
| | | | | That way people who use it won't be deterred, while it unifies style everywhere.
* Fix typing issues with delete_head and Remote.addRuss Allbery2021-09-201-1/+1
| | | | | | | | | | | | | | delete_head and Head.delete historically accept either Head objects or a str name of a head. Adjust the typing to match. This unfortunately requires suppressing type warnings in the signature of RemoteReference.delete, since it inherits from Head but does not accept str (since it needs access to the richer data of RemoteReference). Using assignment to make add an alias for create unfortunately confuses mypy, since it loses track of the fact that it's a classmethod and starts treating it like a staticmethod. Replace with a stub wrapper instead.
* Add type to refs.head.delete()Yobmod2021-07-311-3/+2
|
* Add type to symbolicreference.references()Yobmod2021-07-311-1/+0
|
* Add type to symbolicreference.reference()Yobmod2021-07-311-0/+1
|
* Fix more missing types in Symbolic.py, cos GuthubActions pytest stuckYobmod2021-07-281-6/+7
|
* Fix SymbolicReference reference typingYobmod2021-07-281-1/+1
|
* Add types to refs/head.pyYobmod2021-07-191-15/+22
|
* Make bytesIO forwardrefYobmod2021-07-051-3/+8
|
* Type Traversable.traverse() better, start types of submoduleYobmod2021-06-301-2/+6
|
* removed Unnecessary “else” after “return”Pratik Anurag2019-10-151-2/+1
|
* Rewrite unnecessary dict/list/tuple calls as literalsHugo2018-03-181-1/+1
|
* fix(refs): handle quoted branch namesSebastian Thiel2016-12-081-1/+7
| | | | Fixes #550
* Fix some typosSantiago Castro2016-10-201-3/+2
|
* io: Wrap (probably) allconfig_writers in `with` blocksKostis Anagnostopoulos2016-10-041-12/+9
|
* fix(Head): checkout() handles detached headSebastian Thiel2016-09-111-1/+6
| | | | | | | | | It's not optimal, as we can now return one of two types which are only compatible in the most basic ways. However, it is better than before, I presume. Fixes #510
* Always add '--' to git resetJames E. Blair2015-07-171-6/+1
| | | | | | | | | | | | | | | | | | | | | | If a git repo has the misfortune to have a file with the name "HEAD" at the root level of the repo, git will return an error because it is unsure whether the file or ref is meant: File "/usr/local/lib/python2.7/dist-packages/git/refs/head.py", line 81, in reset self.repo.git.reset(mode, commit, add_arg, paths, **kwargs) File "/usr/local/lib/python2.7/dist-packages/git/cmd.py", line 440, in <lambda> return lambda *args, **kwargs: self._call_process(name, *args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/git/cmd.py", line 834, in _call_process return self.execute(make_call(), **_kwargs) File "/usr/local/lib/python2.7/dist-packages/git/cmd.py", line 627, in execute raise GitCommandError(command, status, stderr_value) GitCommandError: 'git reset --hard HEAD' returned with exit code 128 stderr: 'fatal: ambiguous argument 'HEAD': both revision and filename Use '--' to separate filenames from revisions' Implement its suggested fix by always passing '--' as an argument to "git reset". It is fine to pass it with no file specifiers afterwords. In that case, git knows that "HEAD" is always meant as the ref.
* Fixed some doc strings to build correctly with sphinxSebastian Thiel2015-01-141-0/+1
| | | | | | Fixes #7 [ci skip]
* test_repo worksSebastian Thiel2015-01-061-0/+1
|
* initial set of adjustments to make (most) imports work.Sebastian Thiel2015-01-041-5/+3
| | | | More to come, especially when it's about strings
* Removed unnecessary (non-gitpython) tests and fixed flake80.3.3Sebastian Thiel2015-01-041-1/+3
|
* Bumped version, updated changelog, reduced code smellSebastian Thiel2015-01-041-2/+1
| | | | | There is more work to do though, as many imports are still incorrect. Also, there are still print statements
* Applied autopep8Sebastian Thiel2014-11-191-1/+1
| | | | | Commandline was autopep8 -j 8 --max-line-length 120 --in-place --recursive --exclude "*gitdb*,*async*" git/
* pep8 linting (trailing whitespace)Antoine Musso2014-11-161-11/+11
| | | | W291 trailing whitespace
* pep8 linting (whitespace before/after)Antoine Musso2014-11-161-2/+2
| | | | | | | | | | | | | E201 whitespace after '(' E202 whitespace before ')' E203 whitespace before ':' E225 missing whitespace around operator E226 missing whitespace around arithmetic operator E227 missing whitespace around bitwise or shift operator E228 missing whitespace around modulo operator E231 missing whitespace after ',' E241 multiple spaces after ',' E251 unexpected spaces around keyword / parameter equals
* pep8 linting (blank lines expectations)Antoine Musso2014-11-161-2/+2
| | | | | | E301 expected 1 blank line, found 0 E302 expected 2 blank lines, found 1 E303 too many blank lines (n)
* pep8 linting (whitespaces)Antoine Musso2014-11-161-46/+44
| | | | | | | | | | | W191 indentation contains tabs E221 multiple spaces before operator E222 multiple spaces after operator E225 missing whitespace around operator E271 multiple spaces after keyword W292 no newline at end of file W293 blank line contains whitespace W391 blank line at end of file
* tabs to 4 spaces - this won't make integrating the patches easier, but it's ↵Sebastian Thiel2014-02-091-225/+225
| | | | probably a good idea to go a little more pep8 (and fix sins of my youth ;) )
* Moved everything into the git subdirectory - some tests still need to be ↵Sebastian Thiel2010-11-251-0/+246
adjusted