[openstack-dev] [git-review] Supporting development in local branches

Yuriy Taraday yorik.sar at gmail.com
Wed Aug 6 10:06:47 UTC 2014


On Wed, Aug 6, 2014 at 12:55 PM, Sylvain Bauza <sbauza at redhat.com> wrote:

>
> 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.
>

That's my proposal - generate such "another branches" automatically. And
from this thread it looks like some people already do them by hand.


> 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.
>

I don't quite understand the "top-squasher commit" part but what I'm
suggesting is to automate this process to make users including myself
happier.


> Gerrit is cool, it doesn't care about SHA-1s but only Change-Id, so
> cherry-picking and rebasing still works (hurrah)
>

Yes, and that's the only stable part of those "another branches".


> 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 :-) )


I'd even prefer to leave it to git config file so that it won't get
accidentally enabled unless user know what one's doing.

-- 

Kind regards, Yuriy.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20140806/56d943c7/attachment.html>


More information about the OpenStack-dev mailing list