Merge "Keep modifications to GitPython objects in single module"
This commit is contained in:
@@ -15,7 +15,6 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
|
|
||||||
from git import base
|
|
||||||
from git import GitCommandError
|
from git import GitCommandError
|
||||||
|
|
||||||
from git_upstream.errors import GitUpstreamError
|
from git_upstream.errors import GitUpstreamError
|
||||||
@@ -68,7 +67,3 @@ def note_message(self, note_ref='refs/notes/commits'):
|
|||||||
return None
|
return None
|
||||||
else:
|
else:
|
||||||
raise e
|
raise e
|
||||||
|
|
||||||
base.Object.add_note = add_note
|
|
||||||
base.Object.append_note = append_note
|
|
||||||
base.Object.note = note_message
|
|
||||||
|
|||||||
@@ -16,6 +16,9 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
import git
|
import git
|
||||||
|
from git import base
|
||||||
|
|
||||||
|
from git_upstream.lib import note
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from git.objects.commit import Commit
|
from git.objects.commit import Commit
|
||||||
@@ -119,3 +122,8 @@ if not hasattr(Commit, 'iter_items'):
|
|||||||
git.commit.Commit = GitUpstreamCompatCommit
|
git.commit.Commit = GitUpstreamCompatCommit
|
||||||
else:
|
else:
|
||||||
Commit.short = GitUpstreamCompatCommit.short
|
Commit.short = GitUpstreamCompatCommit.short
|
||||||
|
|
||||||
|
|
||||||
|
base.Object.add_note = note.add_note
|
||||||
|
base.Object.append_note = note.append_note
|
||||||
|
base.Object.note = note.note_message
|
||||||
|
|||||||
Reference in New Issue
Block a user