(args, repo)
| 28 | |
| 29 | |
| 30 | def main(args, repo): |
| 31 | curr_b = repo.current_branch |
| 32 | pprint.msg('On branch {0}, repo-directory {1}'.format( |
| 33 | colored.green(curr_b.branch_name), colored.green('//' + repo.cwd))) |
| 34 | |
| 35 | if curr_b.merge_in_progress: |
| 36 | pprint.blank() |
| 37 | _print_conflict_exp('merge') |
| 38 | elif curr_b.fuse_in_progress: |
| 39 | pprint.blank() |
| 40 | _print_conflict_exp('fuse') |
| 41 | |
| 42 | tracked_mod_list = [] |
| 43 | untracked_list = [] |
| 44 | paths = frozenset(args.paths) |
| 45 | for f in curr_b.status(): |
| 46 | if paths and (f.fp not in paths): |
| 47 | continue |
| 48 | if f.type == core.GL_STATUS_TRACKED and f.modified: |
| 49 | tracked_mod_list.append(f) |
| 50 | elif f.type == core.GL_STATUS_UNTRACKED: |
| 51 | untracked_list.append(f) |
| 52 | |
| 53 | relative_paths = True # git seems to default to true |
| 54 | try: |
| 55 | relative_paths = repo.config.get_bool('status.relativePaths') |
| 56 | except KeyError: |
| 57 | pass |
| 58 | |
| 59 | pprint.blank() |
| 60 | tracked_mod_list.sort(key=lambda f: f.fp) |
| 61 | _print_tracked_mod_files(tracked_mod_list, relative_paths, repo) |
| 62 | pprint.blank() |
| 63 | pprint.blank() |
| 64 | untracked_list.sort(key=lambda f: f.fp) |
| 65 | _print_untracked_files(untracked_list, relative_paths, repo) |
| 66 | return True |
| 67 | |
| 68 | |
| 69 | def _print_tracked_mod_files(tracked_mod_list, relative_paths, repo): |
nothing calls this directly
no test coverage detected