Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change the git log format and splitting logic #31

Open
damdo opened this issue Feb 8, 2023 · 0 comments
Open

Change the git log format and splitting logic #31

damdo opened this issue Feb 8, 2023 · 0 comments

Comments

@damdo
Copy link
Contributor

damdo commented Feb 8, 2023

The logic here is a bit fragile and breaks when the chosen separator is contained in the commit message.

rebasebot/rebasebot/bot.py

Lines 167 to 177 in 683a41f

commits = gitwd.git.log("--reverse", "--pretty=format:%H - %s - %aE", "--no-merges",
"--ancestry-path", f"{merge_base}..dest/{dest.branch}")
logging.info("Identified upstream commits:\n%s", commits)
commits_to_squash = defaultdict(list)
for commit in commits.splitlines():
# Commit contains the message for logging purposes,
# trim on the first space to get just the commit sha
sha, commit_message, committer_email = commit.split(" - ")

@damdo damdo changed the title Change the git commit format and splitting logic Change the git log format and splitting logic Feb 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant