Hi all,
I've cc'd folks from the original "history squash" thread [1] as they
might be interested. Here's some feedback from my first time using "git
history squash" at work.
[1]: <98a1b756…@gmail.com>
1. "git history squash <base>..<tip>" might complain that the revision
range is empty when it isn't. Consider the following diagram:
* D (HEAD)
|
* C
(origin/main) B * /
| /
A *
When I run, for example, "git history squash origin..HEAD", I get
error: the revision range is empty
but "git rev-list origin..HEAD" lists C and D. I haven't dug too
deeply yet, but I suspect something in resolve_squash_range() is not
counting right or not checking the right condition?
Conversely, if I give
git history squash $(git merge-base origin HEAD)..HEAD
then C and D are squashed into a commit with parent A as expected.
I think this is a bug?
2. The editor presents the list of commits with comments like "commit
message number <N>", probably from "add_squash_message_header()"; it
would be really nice to have the actual commit IDs instead, so that
one could (for example) examine the exact commit directly from the
message editor or from another terminal with copy-paste.
Fixing this probably takes a bit more plumbing and work, and I know
the message design got a lot of feedback originally, so I'm mostly
curious what others think on this point.
Anyway, once I got things working (see (1)), it was nice to be able to
collapse a mess of commits down to something sensible in one shot!
Thanks,
Ben
git-history-squash feedback
- From
- ben…@gmail.com ("D. Ben Knoble")
- Organization
- Usenet Network
- Message-ID
- <CALnO6CCOyVX_Setv4fy3sUnccQn889dHhUa=NyoO…@mail.gmail.com>
- Date
- Newsgroups
- linux.kernel.git