Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4fd7b94

Browse files
author
firm1
committed
add support of utf8
1 parentd83f6e8 commit4fd7b94

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

‎git/refs/log.py‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,15 @@
3232
classRefLogEntry(tuple):
3333

3434
"""Named tuple allowing easy access to the revlog data fields"""
35-
_fmt="%s %s %s <%s> %i %s\t%s\n"
3635
_re_hexsha_only=re.compile('^[0-9A-Fa-f]{40}$')
3736
__slots__=tuple()
3837

3938
def__repr__(self):
4039
"""Representation of ourselves in git reflog format"""
4140
act=self.actor
4241
time=self.time
43-
returnself._fmt% (self.oldhexsha,self.newhexsha,act.name,act.email,
44-
time[0],altz_to_utctz_str(time[1]),self.message)
45-
42+
returnu"{0} {1} {2} <{3}> {4!s} {5}\t{6}\n".format(self.oldhexsha,self.newhexsha,act.name,act.email,
43+
time[0],altz_to_utctz_str(time[1]),self.message).encode("utf-8")
4644
@property
4745
defoldhexsha(self):
4846
"""The hexsha to the commit the ref pointed to before the change"""
@@ -267,7 +265,6 @@ def append_entry(cls, config_reader, filepath, oldbinsha, newbinsha, message):
267265

268266
lf=LockFile(filepath)
269267
lf._obtain_lock_or_raise()
270-
271268
fd=open(filepath,'ab')
272269
try:
273270
fd.write(repr(entry).encode(defenc))

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2026 Movatter.jp