We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d5702ed commit a4709b9Copy full SHA for a4709b9
wellies/deployment.py
@@ -60,7 +60,10 @@ def git_commit_message(message_args):
60
61
commit_hash = repo.head.commit.hexsha
62
remote_url = next(repo.remote().urls)
63
- branch_name = repo.active_branch.name
+ if repo.head.is_detached:
64
+ branch_name = "Detached HEAD"
65
+ else:
66
+ branch_name = repo.active_branch.name
67
default_message += "\nGit info:\n"
68
default_message += f" - Remote URL: {remote_url} \n"
69
default_message += f" - Commit: {commit_hash}\n"
0 commit comments