From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-4.0 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by dcvr.yhbt.net (Postfix) with ESMTP id A3EFD1F5AD for ; Tue, 7 Apr 2020 17:58:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726395AbgDGR6d (ORCPT ); Tue, 7 Apr 2020 13:58:33 -0400 Received: from pb-smtp1.pobox.com ([64.147.108.70]:65290 "EHLO pb-smtp1.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726277AbgDGR6c (ORCPT ); Tue, 7 Apr 2020 13:58:32 -0400 Received: from pb-smtp1.pobox.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id 96CFD55BDC; Tue, 7 Apr 2020 13:58:30 -0400 (EDT) (envelope-from junio@pobox.com) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=bshYfD9QSFl3pAWIu9Xi1EeFPc0=; b=ufkYHl Nb7YyawT0H6/VxnPFVzH6DC7+WdI7PA5UkpFSyp5SV9FsF2TLqj2L8OB8ywlziEs 4vHlG5/5AWmiXGh+Y7qqYKO1F5j5lzvjO4cYz6I/TEdz7yU9r5UHJRoo/uaf4iIu DoqV13NGm0risJl3CqZUuKEy+SUvojEV0qQJo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=uGzoF4Pv0mtXGOT0pZLNtrP2cwpGOiup bHd7R4IqLJNrOYtDwTXlNYMo5LkvgwQ3wUpjEf1A1UMjpACPjQzm2AGmI5+j3SX+ GDzXCMcB9NlDA2+EYK3snLukLEdIAcGXSxzT75K5PGtNwxIzyIdHOzPv1TVIlBnY 8xNrOaY1wJU= Received: from pb-smtp1.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id 8F70D55BDB; Tue, 7 Apr 2020 13:58:30 -0400 (EDT) (envelope-from junio@pobox.com) Received: from pobox.com (unknown [34.74.119.39]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp1.pobox.com (Postfix) with ESMTPSA id 2087755BDA; Tue, 7 Apr 2020 13:58:30 -0400 (EDT) (envelope-from junio@pobox.com) From: Junio C Hamano To: Elijah Newren Cc: Sami Boukortt , Git Mailing List Subject: Re: New git-rebase backend: no way to drop already-empty commits References: Date: Tue, 07 Apr 2020 10:58:29 -0700 In-Reply-To: (Elijah Newren's message of "Tue, 7 Apr 2020 09:53:53 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: 639AD1AE-78F9-11EA-BDCB-C28CBED8090B-77302942!pb-smtp1.pobox.com Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Elijah Newren writes: > Yes, from the manpage: > > ... > > and > > """ > Empty commits > ~~~~~~~~~~~~~ > > The apply backend unfortunately drops intentionally empty commits, i.e. > commits that started empty, though these are rare in practice. It > also drops commits that become empty and has no option for controlling > this behavior. This is a very good illustration that shows why "switch the default and retire the apply backend" deserves to be cooked for quite a long time. The 'apply' dropping empty commits may have looked like an 'unfortunate' thing to whoever wrote the above paragraph in the documentation, but it clearly shows that person (me included) did not think of the ramifications deeply enough that there may be valid workflows that _depend_ on the behaviour. As we will be dropping 'apply' that could be used as an escape hatch, before we do so, we should teach the other backends an alternate escape hatch to help those who have been depending on the behaviour of 'apply' that discards the empty ones, whether they become empty, or they are empty from the beginning. I think the "has contents originally but becomes empty" side is already taken care of, so we'd need to make sure it is easy to optionally discard the ones that are originally empty. Thanks.