|
39 | 39 | commitsInFirst = list(repo.iter_commits(args.first))
|
40 | 40 | commitsInSecond = list(repo.iter_commits(args.second))
|
41 | 41 |
|
| 42 | +def printCommitInformation(commit): |
| 43 | + print(colored("commit {}".format(commit.hexsha), 'yellow')) |
| 44 | + print("Author: {} <{}>".format(commit.author.name, commit.author.email)) |
| 45 | + print("Date : {}".format(time.strftime("%c %Z", time.localtime(commit.authored_date)))) |
| 46 | + print() |
| 47 | + print("\t{}".format(commit.message.strip())) |
| 48 | + print() |
| 49 | + |
42 | 50 | commitsDifference = []
|
43 | 51 | for commit in commitsInFirst:
|
44 | 52 | commitMessage = commit.message
|
|
55 | 63 | if not args.r:
|
56 | 64 | for commit in commitsDifference:
|
57 | 65 | if not ignoredHashes.isPresent(commit.hexsha):
|
58 |
| - print(colored("commit {}".format(commit.hexsha), 'yellow')) |
59 |
| - print("Author: {} <{}>".format(commit.author.name, commit.author.email)) |
60 |
| - print("Date : {}".format(time.strftime("%c %Z", time.localtime(commit.authored_date)))) |
61 |
| - print() |
62 |
| - print("\t{}".format(commit.message.strip())) |
63 |
| - print() |
| 66 | + printCommitInformation(commit) |
64 | 67 | else:
|
65 | 68 | for commit in commitsDifference:
|
66 | 69 | if not ignoredHashes.isPresent(commit.hexsha):
|
67 |
| - print(colored("commit {}".format(commit.hexsha), 'yellow')) |
68 |
| - print("Author: {} <{}>".format(commit.author.name, commit.author.email)) |
69 |
| - print("Date : {}".format(time.strftime("%c %Z", time.localtime(commit.authored_date)))) |
70 |
| - print() |
71 |
| - print("\t{}".format(commit.message.strip())) |
72 |
| - print() |
| 70 | + printCommitInformation(commit) |
73 | 71 | while True:
|
74 | 72 | inp = input("Resolve[R] / Ignore[I] : ")
|
75 | 73 | if inp.upper() == 'I':
|
|
0 commit comments