Skip to content

Conversation

elliotberman
Copy link

No description provided.

@elliotberman elliotberman force-pushed the fix-git-merge-completion branch from 6808b68 to 7604011 Compare August 21, 2025 01:06
@elliotberman elliotberman changed the title Completion/Unix/Command/_git: Fix text for git merge --squash/--no-squash Completion: _git: Fix text for git merge --squash/--no-squash Aug 21, 2025
@okdana
Copy link
Contributor

okdana commented Aug 23, 2025

the current wording is paraphrasing git-merge(1):

--squash
--no-squash

Produce the working tree and index state as if a real merge happened (except for the merge information), but do not actually make a commit, move the HEAD, or record $GIT_DIR/MERGE_HEAD (to cause the next git commit command to create a merge commit). This allows you to create a single commit on top of the current branch whose effect is the same as merging another branch (or more in case of an octopus).

With --no-squash perform the merge and commit the result. This option can be used to override --squash.

With --squash, --commit is not allowed, and will fail.

as it says, --squash doesn't actually create a commit. it's usually building up to one, but it doesn't produce it itself

people would probably get what you mean but i'm not sure it's clearer or more accurate than it was

maybe someone else has an opinion

@larryv
Copy link
Contributor

larryv commented Aug 23, 2025

people would probably get what you mean but i'm not sure it's clearer or more accurate than it was

I think that, at a glance, the proposed text appears to describe the opposite of the actual behavior. I have a hard time seeing how a typical reader could interpret it otherwise.

maybe someone else has an opinion

My opinion is that we should not accept this change.

@elliotberman
Copy link
Author

Right, I see your perspectives here.

I think the current text as-is is still confusing -- it doesn't reflect the "squash" nature and only discusses whether or not a subsequent git commit is needed. I'd originally interpreted the text as being a typo/mismatch with --(no-)commit.

How about:
--squash: Prepare a squashed merge without committing.
--no-squash: Do not prepare of a squashed merge

@elliotberman elliotberman force-pushed the fix-git-merge-completion branch from 7604011 to 9cccf81 Compare August 23, 2025 15:47
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 this pull request may close these issues.

3 participants