MCPcopy
hub / github.com/gitless-vcs/gitless / main

Function main

gitless/cli/gl_history.py:35–52  ·  view source on GitHub ↗
(args, repo)

Source from the content-addressed store, hash-verified

33
34
35def main(args, repo):
36 b = helpers.get_branch(args.b, repo) if args.b else repo.current_branch
37 with tempfile.NamedTemporaryFile(mode='w', delete=False) as tf:
38 count = 0
39 for ci in b.history():
40 if args.limit and count == args.limit:
41 break
42 pprint.commit(ci, compact=args.compact, stream=tf.write)
43 if not args.compact:
44 pprint.puts(stream=tf.write)
45 if args.verbose and len(ci.parents) == 1:
46 for patch in b.diff_commits(ci.parents[0], ci):
47 pprint.diff(patch, stream=tf.write)
48
49 count += 1
50 helpers.page(tf.name, repo)
51 os.remove(tf.name)
52 return True

Callers

nothing calls this directly

Calls 2

diff_commitsMethod · 0.80
historyMethod · 0.45

Tested by

no test coverage detected