Skip to content

Commit 7d30e08

Browse files
committed
Merge remote-tracking branch 'upstream/master' into tmp-unicode-path
* upstream/master: (83 commits) Remove trailing slash on drive path Further update for machines without ssh installed or on the path Update remote.py to fix issue #694 IndexFile.commit() now runs pre-commit and post-commit and commit-msg hooks. Update base.py Update remote.py Update base.py Update remote.py Update signing key to latest version recognize the new packed-ref header format Only gc.collect() under windows Converting path in clone and clone_from to str before any other operation in case eg pathlib.Path is passed Fix encoding issue with stderr_value and kill_after_timeout Store submodule name updating AUTHORS Keeping env values passed to `clone_from` Fix test_docs Apparently bdist_wheel is only in python3 version bump BF: Added missing NullHandler to logger in git.remote ...
2 parents 2f66d1e + a2cd130 commit 7d30e08

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+1051
-238
lines changed

.codeclimate.yml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
engines:
3+
duplication:
4+
enabled: true
5+
config:
6+
languages:
7+
- python
8+
pep8:
9+
enabled: true
10+
radon:
11+
enabled: true
12+
ratings:
13+
paths:
14+
- "**.py"
15+
exclude_paths:

.travis.yml

+10-3
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,17 @@ python:
55
- "3.3"
66
- "3.4"
77
- "3.5"
8+
- "3.6"
9+
- "3.6-dev"
10+
- "3.7-dev"
11+
- "nightly"
812
# - "pypy" - won't work as smmap doesn't work (see gitdb/.travis.yml for details)
9-
#matrix:
10-
# allow_failures:
11-
# - python: "2.6"
13+
matrix:
14+
allow_failures:
15+
- python: "2.6"
16+
- python: "3.6-dev"
17+
- python: "3.7-dev"
18+
- python: "nightly"
1219
git:
1320
# a higher depth is needed for most of the tests - must be high enough to not actually be shallow
1421
# as we clone our own repository in the process

AUTHORS

+9
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,14 @@ Contributors are:
1616
-Vincent Driessen <me _at_ nvie.com>
1717
-Phil Elson <pelson _dot_ pub _at_ gmail.com>
1818
-Bernard `Guyzmo` Pratz <[email protected]>
19+
-Timothy B. Hartman <tbhartman _at_ gmail.com>
20+
-Konstantin Popov <konstantin.popov.89 _at_ yandex.ru>
21+
-Peter Jones <pjones _at_ redhat.com>
22+
-Anson Mansfield <anson.mansfield _at_ gmail.com>
23+
-Ken Odegard <ken.odegard _at_ gmail.com>
24+
-Alexis Horgix Chotard
25+
-Piotr Babij <piotr.babij _at_ gmail.com>
26+
-Mikuláš Poul <mikulaspoul _at_ gmail.com>
27+
-Charles Bouchard-Légaré <cblegare.atl _at_ ntis.ca>
1928

2029
Portions derived from other open source works and are clearly marked.

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ release: clean
1414

1515
force_release: clean
1616
git push --tags
17-
python setup.py sdist bdist_wheel
18-
twine upload dist/*
17+
python3 setup.py sdist bdist_wheel
18+
twine upload -s -i [email protected] dist/*

README.md

+54-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ If you have downloaded the source code:
3232

3333
or if you want to obtain a copy from the Pypi repository:
3434

35-
pip install gitpython
35+
pip install GitPython
3636

3737
Both commands will install the required package dependencies.
3838

@@ -123,6 +123,59 @@ Please have a look at the [contributions file][contributing].
123123
incrementing the patch level, and possibly by appending `-dev`. Probably you
124124
want to `git push` once more.
125125

126+
### How to verify a release
127+
128+
Please only use releases from `pypi` as you can verify the respective source
129+
tarballs.
130+
131+
This script shows how to verify the tarball was indeed created by the authors of
132+
this project:
133+
134+
```
135+
curl https://pypi.python.org/packages/7e/13/2a556eb97dcf498c915e5e04bb82bf74e07bb8b7337ca2be49bfd9fb6313/GitPython-2.1.5-py2.py3-none-any.whl\#md5\=d3ecb26cb22753f4414f75f721f6f626z > gitpython.whl
136+
curl https://pypi.python.org/packages/7e/13/2a556eb97dcf498c915e5e04bb82bf74e07bb8b7337ca2be49bfd9fb6313/GitPython-2.1.5-py2.py3-none-any.whl.asc > gitpython-signature.asc
137+
gpg --verify gitpython-signature.asc gitpython.whl
138+
```
139+
140+
which outputs
141+
142+
```
143+
gpg: Signature made Sat Jun 10 20:22:49 2017 CEST using RSA key ID 3B07188F
144+
gpg: Good signature from "Sebastian Thiel (In Rust I trust!) <[email protected]>" [unknown]
145+
gpg: WARNING: This key is not certified with a trusted signature!
146+
gpg: There is no indication that the signature belongs to the owner.
147+
Primary key fingerprint: 4477 ADC5 977D 7C60 D2A7 E378 9FEE 1C6A 3B07 188F
148+
```
149+
150+
You can verify that the keyid indeed matches the release-signature key provided in this
151+
repository by looking at the keys details:
152+
153+
```
154+
gpg --list-packets ./release-verification-key.asc
155+
```
156+
157+
You can verify that the commit adding it was also signed by it using:
158+
159+
```
160+
git show --show-signature ./release-verification-key.asc
161+
```
162+
163+
If you would like to trust it permanently, you can import and sign it:
164+
165+
```
166+
gpg --import ./release-verification-key.asc
167+
gpg --edit-key 9FEE1C6A3B07188F
168+
> sign
169+
> save
170+
```
171+
172+
Afterwards verifying the tarball will yield the following:
173+
```
174+
$ gpg --verify gitpython-signature.asc gitpython.whl
175+
gpg: Signature made Sat Jun 10 20:22:49 2017 CEST using RSA key ID 3B07188F
176+
gpg: Good signature from "Sebastian Thiel (In Rust I trust!) <[email protected]>" [ultimate]
177+
```
178+
126179
### LICENSE
127180

128181
New BSD License. See the LICENSE file.

VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.1.0
1+
2.1.6

doc/source/changes.rst

+20-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,25 @@
22
Changelog
33
=========
44

5+
2.1.6 - Bugfixes
6+
====================================
7+
8+
* support for worktrees
9+
10+
2.1.3 - Bugfixes
11+
====================================
12+
13+
All issues and PRs can be viewed in all detail when following this URL:
14+
https://github.com/gitpython-developers/GitPython/milestone/21?closed=1
15+
16+
17+
2.1.1 - Bugfixes
18+
====================================
19+
20+
All issues and PRs can be viewed in all detail when following this URL:
21+
https://github.com/gitpython-developers/GitPython/issues?q=is%3Aclosed+milestone%3A%22v2.1.1+-+Bugfixes%22
22+
23+
524
2.1.0 - Much better windows support!
625
====================================
726

@@ -128,7 +147,7 @@ Please note that due to breaking changes, we have to increase the major version.
128147
1.0.2 - Fixes
129148
=============
130149

131-
* IMPORTANT: Changed default object database of `Repo` objects to `GitComdObjectDB`. The pure-python implementation
150+
* IMPORTANT: Changed default object database of `Repo` objects to `GitCmdObjectDB`. The pure-python implementation
132151
used previously usually fails to release its resources (i.e. file handles), which can lead to problems when working
133152
with large repositories.
134153
* CRITICAL: fixed incorrect `Commit` object serialization when authored or commit date had timezones which were not

git/__init__.py

+41-16
Original file line numberDiff line numberDiff line change
@@ -35,24 +35,49 @@ def _init_externals():
3535

3636
#{ Imports
3737

38-
from git.config import GitConfigParser # @NoMove @IgnorePep8
39-
from git.objects import * # @NoMove @IgnorePep8
40-
from git.refs import * # @NoMove @IgnorePep8
41-
from git.diff import * # @NoMove @IgnorePep8
42-
from git.exc import * # @NoMove @IgnorePep8
43-
from git.db import * # @NoMove @IgnorePep8
44-
from git.cmd import Git # @NoMove @IgnorePep8
45-
from git.repo import Repo # @NoMove @IgnorePep8
46-
from git.remote import * # @NoMove @IgnorePep8
47-
from git.index import * # @NoMove @IgnorePep8
48-
from git.util import ( # @NoMove @IgnorePep8
49-
LockFile,
50-
BlockingLockFile,
51-
Stats,
52-
Actor
53-
)
38+
from git.exc import * # @NoMove @IgnorePep8
39+
try:
40+
from git.config import GitConfigParser # @NoMove @IgnorePep8
41+
from git.objects import * # @NoMove @IgnorePep8
42+
from git.refs import * # @NoMove @IgnorePep8
43+
from git.diff import * # @NoMove @IgnorePep8
44+
from git.db import * # @NoMove @IgnorePep8
45+
from git.cmd import Git # @NoMove @IgnorePep8
46+
from git.repo import Repo # @NoMove @IgnorePep8
47+
from git.remote import * # @NoMove @IgnorePep8
48+
from git.index import * # @NoMove @IgnorePep8
49+
from git.util import ( # @NoMove @IgnorePep8
50+
LockFile,
51+
BlockingLockFile,
52+
Stats,
53+
Actor,
54+
rmtree,
55+
)
56+
except GitError as exc:
57+
raise ImportError('%s: %s' % (exc.__class__.__name__, exc))
5458

5559
#} END imports
5660

5761
__all__ = [name for name, obj in locals().items()
5862
if not (name.startswith('_') or inspect.ismodule(obj))]
63+
64+
65+
#{ Initialize git executable path
66+
GIT_OK = None
67+
68+
def refresh(path=None):
69+
"""Convenience method for setting the git executable path."""
70+
global GIT_OK
71+
GIT_OK = False
72+
73+
if not Git.refresh(path=path):
74+
return
75+
if not FetchInfo.refresh():
76+
return
77+
78+
GIT_OK = True
79+
#} END initialize git executable path
80+
81+
#################
82+
refresh()
83+
#################

0 commit comments

Comments
 (0)