Merge "Keep modifications to GitPython objects in single module"

This commit is contained in:
Jenkins
2016-04-14 12:46:16 +00:00
committed by Gerrit Code Review
2 changed files with 8 additions and 5 deletions

View File

@@ -15,7 +15,6 @@
# limitations under the License.
#
from git import base
from git import GitCommandError
from git_upstream.errors import GitUpstreamError
@@ -68,7 +67,3 @@ def note_message(self, note_ref='refs/notes/commits'):
return None
else:
raise e
base.Object.add_note = add_note
base.Object.append_note = append_note
base.Object.note = note_message

View File

@@ -16,6 +16,9 @@
#
import git
from git import base
from git_upstream.lib import note
try:
from git.objects.commit import Commit
@@ -119,3 +122,8 @@ if not hasattr(Commit, 'iter_items'):
git.commit.Commit = GitUpstreamCompatCommit
else:
Commit.short = GitUpstreamCompatCommit.short
base.Object.add_note = note.add_note
base.Object.append_note = note.append_note
base.Object.note = note.note_message