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

Function _author_info_is_ok

gitless/cli/gl_commit.py:81–96  ·  view source on GitHub ↗
(repo)

Source from the content-addressed store, hash-verified

79
80
81def _author_info_is_ok(repo):
82 def show_config_error(key):
83 pprint.err('Missing {0} for commit author'.format(key))
84 pprint.err_exp('change the value of git\'s user.{0} setting'.format(key))
85
86 def config_is_ok(key):
87 try:
88 if not repo.config['user.{0}'.format(key)]:
89 show_config_error(key)
90 return False
91 except KeyError:
92 show_config_error(key)
93 return False
94 return True
95
96 return config_is_ok('name') and config_is_ok('email')
97
98
99def _do_partial_selection(files, curr_b):

Callers 1

mainFunction · 0.85

Calls 1

config_is_okFunction · 0.85

Tested by

no test coverage detected