MCPcopy Index your code
hub / github.com/gitless-vcs/gitless / commit

Function commit

gitless/cli/pprint.py:138–157  ·  view source on GitHub ↗
(ci, compact=False, stream=sys.stdout.write)

Source from the content-addressed store, hash-verified

136
137
138def commit(ci, compact=False, stream=sys.stdout.write):
139 merge_commit = len(ci.parent_ids) > 1
140 color = colored.magenta if merge_commit else colored.yellow
141 if compact:
142 title = ci.message.splitlines()[0]
143 puts('{0} {1}'.format(color(str(ci.id)[:7]), title), stream=stream)
144 return
145 puts(color('Commit Id: {0}'.format(ci.id)), stream=stream)
146 if merge_commit:
147 merges_str = ' '.join(str(oid)[:7] for oid in ci.parent_ids)
148 puts(color('Merges: {0}'.format(merges_str)), stream=stream)
149 puts(
150 color('Author: {0} <{1}>'.format(ci.author.name, ci.author.email)),
151 stream=stream)
152 ci_author_dt = datetime.fromtimestamp(
153 ci.author.time, FixedOffset(ci.author.offset))
154 puts(color('Date: {0:%c %z}'.format(ci_author_dt)), stream=stream)
155 puts(stream=stream)
156 with indent(4):
157 puts(ci.message, stream=stream)
158
159# Op Callbacks
160

Callers 3

commit_strFunction · 0.85
apply_okFunction · 0.85
apply_errFunction · 0.85

Calls 2

putsFunction · 0.85
FixedOffsetClass · 0.85

Tested by

no test coverage detected