summaryrefslogtreecommitdiff
path: root/git/refs
Commit message (Collapse)AuthorAgeFilesLines
* Use automatic formattersHugo2018-03-181-7/+7
|
* Rewrite unnecessary dict/list/tuple calls as literalsHugo2018-03-185-5/+5
|
* 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
* recognize the new packed-ref header formatBrenda J. Butler2017-10-131-1/+9
| | | | | | | as long as line contains "peeled", accept it fixes the PackingType of packed-Refs not understood: # pack-refs with: peeled fully-peeled sorted problem
* worktrees: make non-packed refs also work correctly.Peter Jones2017-08-222-24/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Repo: handle worktrees betterPeter Jones2017-07-011-3/+24
| | | | | | | | | | | | | This makes Repo("foo") work when foo/.git is a file of the form created by "git worktree add", i.e. it's a text file that says: gitdir: /home/me/project/.git/worktrees/bar and where /home/me/project/.git/ is the nominal gitdir, but /home/me/project/.git/worktrees/bar has this worktree's HEAD etc and a "gitdir" file that contains the path of foo/.git . Signed-off-by: Peter Jones <pjones@redhat.com>
* Spelling fixesVille Skyttä2017-03-091-2/+2
|
* fix(refs): don't assume linux path separatorSebastian Thiel2017-02-251-1/+1
| | | | | | Instead, work with os.sep. Fixes #586
* chore(lint): fixSebastian Thiel2016-12-221-2/+2
|
* fix(tag): improve tag resolution handlingSebastian Thiel2016-12-221-2/+5
| | | | | | | The handling is similar, but the error message makes clear what is happening, and what can be done to handle such a case. Related to #561
* fix(refs): handle quoted branch namesSebastian Thiel2016-12-081-1/+7
| | | | Fixes #550
* Merge branch 'cygwin' of https://github.com/ankostis/GitPython into ↵Sebastian Thiel2016-10-223-52/+45
|\ | | | | | | ankostis-cygwin
| * src: reduce needless deps to `gitdb.util`Kostis Anagnostopoulos2016-10-163-46/+37
| |
| * src: import os.path as ospKostis Anagnostopoulos2016-10-161-6/+8
| |
* | Fix some typosSantiago Castro2016-10-205-11/+10
|/
* io: Wrap (probably) allconfig_writers in `with` blocksKostis Anagnostopoulos2016-10-041-12/+9
|
* src: No PyDev warningsKostis Anagnostopoulos2016-10-042-4/+4
| | | | | | | | + Mark all unused vars and other non-pep8 (PyDev) warnings + test_utils: + enable & fix forgotten IterableList looped path. + unittestize all assertions. + remote: minor fix progress dispatching unknown err-lines
* io, #519: ALL open() --> with open()Kostis Anagnostopoulos2016-10-011-38/+42
| | | + Some cases had restructuring of code.
* 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
* fix(tag): resolve `commit` objects deeply.Sebastian Thiel2016-09-111-7/+7
| | | | | | | As TagObjects can point to other TagObjects, we need to keep going in order to resolve the final commit. Fixes #503
* Merge remote-tracking branch 'upstream/master'Barry Scott2016-07-291-1/+1
|\
| * Use binary string constant for concatenation.Bert Wesarg2016-07-191-1/+1
| |
| * Add missing newline when writing a symbolic ref.Bert Wesarg2016-07-191-1/+1
| |
* | Fix corruption of the ref logs fileBarry Scott2016-06-131-2/+3
|/ | | | | It must only have the first line of the commit messages, not the while multiple line log.
* fix(refs): don't raise StopIterationSebastian Thiel2016-03-281-1/+1
| | | | Fixes #394
* Ensure file resources are releasedDavid García Garzón2015-07-261-17/+17
|
* 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.
* Assure to not iterate packed-refs file, ever.Sebastian Thiel2015-02-191-0/+3
| | | | Related to #252
* Overhauled all tutorials, and placed them in a unit-test.Sebastian Thiel2015-01-221-1/+1
| | | | | | That way they are protected from regression. Fixes #239
* Added advance usage examples to tutorial and made minor fixes.Sebastian Thiel2015-01-211-1/+4
| | | | | | GIT_PYTHON_TRACE would actually fail (now) if we debugged archive operations. Related to #239
* Fixed some doc strings to build correctly with sphinxSebastian Thiel2015-01-142-1/+3
| | | | | | Fixes #7 [ci skip]
* Now finally, tests should be working on travis too.Sebastian Thiel2015-01-081-3/+6
| | | | Now handling the new exception BadName as well
* Made improvements to assure test-cases don't leak file handlesSebastian Thiel2015-01-071-0/+1
| | | | | | | | At least leakage is considerably reduced. Additionally, a test-case was added which triggers failure if auto-disposal of resources wouldn't work. Fixes #60
* Made sure commits accept unicode or unicode charactersSebastian Thiel2015-01-071-3/+14
|
* fix pep8firm12015-01-071-2/+8
|
* add support of utf8firm12015-01-071-5/+2
|
* Fixed log implementation for py3Sebastian Thiel2015-01-061-0/+1
| | | | When merging, I accidentally removed the py3 adjustments
* Merge branch 'py3' into 0.3Sebastian Thiel2015-01-066-27/+43
|\ | | | | | | | | Conflicts: git/refs/log.py
| * Make flake8 happySebastian Thiel2015-01-062-2/+2
| |
| * test_repo worksSebastian Thiel2015-01-061-0/+1
| |
| * test_refs worksSebastian Thiel2015-01-061-2/+4
| |
| * test_reflog worksSebastian Thiel2015-01-061-9/+13
| |
| * test_commit works once againSebastian Thiel2015-01-051-1/+1
| |
| * Intermediate commit: test_config and test_actor worksSebastian Thiel2015-01-051-6/+9
| | | | | | | | | | Kind of tackling the tasks step by step, picking low-hanging fruit first, or the ones that everyone depends on
| * Fixed io types to make tests work on PY2 once again.py3Sebastian Thiel2015-01-051-1/+1
| | | | | | | | Now it's about going through PY3 issues
| * Dum brute force conversion of all types.Sebastian Thiel2015-01-042-2/+7
| | | | | | | | | | | | However, StringIO really is ByteIO in most cases, and py2.7 should run but doesn't. This should be made work first.
| * initial set of adjustments to make (most) imports work.Sebastian Thiel2015-01-045-9/+10
| | | | | | | | More to come, especially when it's about strings
* | BF: allow log line to have no msg (Close #225)Yaroslav Halchenko2015-01-051-5/+9
|/
* Removed unnecessary (non-gitpython) tests and fixed flake80.3.3Sebastian Thiel2015-01-043-14/+5
|
* Replaced ordered dict with standard version; used logging moduleSebastian Thiel2015-01-041-2/+2
| | | | All performance tests still print to stderr, but do so in a py3 compatible way