Skip to content

Include name of squashed patch in squash edit message. #119

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

Closed
topher200 opened this issue Jun 24, 2021 · 2 comments · Fixed by #120
Closed

Include name of squashed patch in squash edit message. #119

topher200 opened this issue Jun 24, 2021 · 2 comments · Fixed by #120

Comments

@topher200
Copy link
Contributor

A possible modification to consider in the stg squash edit message: show the squashed patch name somewhere. Possibly on the first line. E.g.:

# squashed-patch-name is a combination of N patches

or

# Squashing N patches as squashed-patch-name

The latter would be better if reusing the name of one of the patches being squashed (which I often do).

Originally posted by @jpgrayson in #118 (comment)

@topher200
Copy link
Contributor Author

# Squashing N patches as squashed-patch-name

I like that! I see clearly how it would work if --name is given to stg squash. I'm not as sure how it would work if no --name is provided, because the name will be dependent on the squashed commit message (which is obviously not finalized at the point when we open the editor).

How do you expect it should work for the case where no --name is provided?

@jpgrayson
Copy link
Collaborator

Good point. The top line would need to be conditional. Probably just # Squashing N patches if the name is TBD.

topher200 added a commit to topher200/stgit that referenced this issue Jun 24, 2021
If --name isn't included we don't try to guess what the name may be
(since the name is dependent on the commit description the user gives to
the squashed commit.

Tested locally that this works correctly with and without '--name'.

Resolves stacked-git#119
jpgrayson pushed a commit that referenced this issue Jun 25, 2021
If --name isn't included we don't try to guess what the name may be
(since the name is dependent on the commit description the user gives to
the squashed commit.

Tested locally that this works correctly with and without '--name'.

Resolves #119
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

Successfully merging a pull request may close this issue.

2 participants