[openstack-dev] [git-review] Supporting development in local branches
Sylvain Bauza
sbauza at redhat.com
Wed Aug 6 08:55:07 UTC 2014
Le 06/08/2014 10:35, Yuriy Taraday a écrit :
> I'd like to stress this to everyone: I DO NOT propose squashing
> together commits that should belong to separate change requests. I DO
> NOT propose to upload all your changes at once. I DO propose letting
> developers to keep local history of all iterations they have with a
> change request. The history that absolutely doesn't matter to anyone
> but this developer.
>
Well, I can understand that for ease, we could propose it as an option
in git-review, but I'm just thinking that if you consider your local Git
repo as your single source of truth (and not Gerrit), then you just have
to make another branch and squash your intermediate commits for Gerrit
upload only.
If you need modifying (because of another iteration), you just need to
amend the commit message on each top-squasher commit by adding the
Change-Id on your local branch, and redo the process (make a branch,
squash, upload) each time you need it.
Gerrit is cool, it doesn't care about SHA-1s but only Change-Id, so
cherry-picking and rebasing still works (hurrah)
tl;dr: do as many as intermediate commits you want, but just generate a
Change-ID on the commit you consider as patch, so you just squash the
intermediate commits on a separate branch copy for Gerrit use only
(one-way).
Again, I can understand the above as hacky, so I'm not against your
change, just emphasizing it as non-necessary (but anyway, everything can
be done without git-review, even the magical -m option :-) )
-Sylvain
More information about the OpenStack-dev
mailing list