Re: [RFC/PATCH] git-merge: implement --ff-only-merge option.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Junio C Hamano <gitster@xxxxxxxxx> writes:

> Sergey Organov <sorganov@xxxxxxxxx> writes:
>
>>> Because rebasing immediately before is considered a bad manner,
>>> i.e. encouraging a wrong workflow?
>>
>> Why? What is wrong about it?
>
> Searching the kernel archive for messages that talks about "rebase"
> and "pull-request" from Linus would tell us why it is frowned upon
> in a prominent early adopter project of Git.

I don't argue it's wrong for work-flows used for Linux kernel.

Even in general, once pull-request is issued, it's bad idea to rebase
your work, as you've already published your history.

I don't see how it is relevant to my proposal though. It was bad idea in
general to rewrite published history before this patch, it still is with
this patch, and the patch itself doesn't encourage anybody to rebase
published history as it is about true merge, not about rebase.

> You destroy what you have been testing and replace it with an untested
> one. If you merge, and if the result of the merge is broken, at least
> you would have something that used to work at its second parent (i.e.
> the tip of your topic).

This seems to apply to rebasing in general. I have nothing against
work-flows that don't routinely use rebasing, but there are other
work-flows around as well. 

In my workflows, I do test the result of rebase, and I'd simply revert
the rebase if the result appears to be broken. When the result is OK, I
do the final merge. If it is perfectly trivial merge, it needs no
testing at all as it doesn't change content. It's this latter condition
that my suggested new option for "git merge" tries to ensure.

Hopefully we are not going into arguing whose work flow is better.

>> Please also notice that I don't try to impose this on anybody who does
>> consider it wrong workflow.
>
> I know ;-).  I didn't say anything about "imposing", did I?
>
> Having an option to make it easy to do something undesirable gives
> people an excuse to say "See Git has this option to let me do that
> easily, it is an officially sanctioned and encouraged workflow".

Whatever you can do "easily" with my patch, you can do "easily" with
--no-ff right now, except that with my option instead of --no-ff, you
won't get non-trivial merges you didn't intend.

So I rather see the message of my proposal as: provided you rebase your
(topic) branches anyway, you can use this feature to keep essential
information in the history and avoid complications of non-trivial
merges.

-- 
Sergey.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]