From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 4MnjA5+oZ2NS8AAAbAwnHQ (envelope-from ) for ; Sun, 06 Nov 2022 13:29:19 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 6LbfA5+oZ2NUlQAA9RJhRA (envelope-from ) for ; Sun, 06 Nov 2022 13:29:19 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 8D5D17F77 for ; Sun, 6 Nov 2022 13:29:18 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1orelZ-0007pY-1H; Sun, 06 Nov 2022 07:28:45 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1orelX-0007oZ-TQ for guix-devel@gnu.org; Sun, 06 Nov 2022 07:28:43 -0500 Received: from mx0.riseup.net ([198.252.153.6]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1orelW-0006UA-3n for guix-devel@gnu.org; Sun, 06 Nov 2022 07:28:43 -0500 Received: from fews1.riseup.net (fews1-pn.riseup.net [10.0.1.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mail.riseup.net", Issuer "R3" (not verified)) by mx0.riseup.net (Postfix) with ESMTPS id 4N4tvC31BMz9tCj; Sun, 6 Nov 2022 12:28:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1667737719; bh=vOEnY65ch0zjceDI5yZiYZ1AwQP+0lZebEYMEPiAr80=; h=References:From:To:Cc:Subject:Date:In-reply-to:From; b=s+S2zSKKAhO8DDvp3USredxWzDRcMwf12YuLZrZrAA11fn/rEh5xn0LxlT6XkUWzh Rx4TntOJf/lCkOOwoHY91trQZaFq/kFu9SlKWpSnyiAnD42wQ7SyxvA10Q6GVpN+Fd Pp9vOP24ru80NjIKqyWIF4/AQD1nN5zwlMXUca9A= X-Riseup-User-ID: 39499FB72AE2F763CB65C71AE9A6491BB7E515F59E1B516FF95996A48F897512 Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews1.riseup.net (Postfix) with ESMTPSA id 4N4tvB52P6z5vgH; Sun, 6 Nov 2022 12:28:38 +0000 (UTC) References: <87cza65i1z.fsf@riseup.net> From: Csepp To: Andreas Enge Cc: Csepp , guix-devel@gnu.org Subject: Re: splitting up and sorting commits? Date: Sun, 06 Nov 2022 13:19:53 +0100 In-reply-to: Message-ID: <87leooi7xb.fsf@riseup.net> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=198.252.153.6; envelope-from=raingloom@riseup.net; helo=mx0.riseup.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Guix-devel" Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1667737758; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=eb6kE9ftUbctmaWvnbYeEoN6+THer749ug7UeDpKp60=; b=OuS/M3PBR2lyHFkhmPDYoYATTJpnvYUdaUtPQNH2xzl8FbFkEh17Cs/mG0ooR+lbaa4mWe MTyOMXOE85xJT5OF/ymvBxyqfx1855WPnpZnH1pOvWUg/jeCsVmunvDN/WxPkNUHy75a6u nFm9lzOCdANGQYDYF8FMsXI+1sFaYYNZUiL4KyLYu3hhNrmhD7WbCtGfFpx4J8r5xW9qmY iGtwdc/hW8enW1HRfZjYgmyyM3C6gt7kDbcs3Zb6wkw4kEQ5CvCHeB31TY1Yr+xlMBj9P/ QrhUYLukfT6RzrpZSVcvDP6ZgVLaFjU1SsJjljF6e1ZKZnlFMHOh8WgxAYX3dg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1667737758; a=rsa-sha256; cv=none; b=eaNmdDpsCBg2WCulkyweVDkWDKSzKRpWKfisW6bGdXrxq2LhuM7Bpx+FTl2+5U0bQh6fmy QT4wICmnqeJDDWjvfdRZHs6ynGJGYyBdPFMxQK7RocuASryzk68V2LTKGM/09S6PRrRXbf dfHJu+xRc/Cny8kRJU9dVL49k5fpYD3tiOhobnO4rVVAPzbjskgpi5gyQugU+UvOXK37WP cVEkkWTCss+OPCcQvqMhvmPrJOPBt1pDskcSz6lh2dsRW5oAP9rGqg+Hq43kPoUKaZFWTk MO4BZq74CGqKsfQs/l1XE18n5njIu96UBffk4DEoRD6c1VZNFkkh5P3QZcS8MA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=riseup.net header.s=squak header.b=s+S2zSKK; dmarc=pass (policy=none) header.from=riseup.net; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.30 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=riseup.net header.s=squak header.b=s+S2zSKK; dmarc=pass (policy=none) header.from=riseup.net; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 8D5D17F77 X-Spam-Score: -3.30 X-Migadu-Scanner: scn0.migadu.com X-TUID: 6aOIJNSSeG/3 Andreas Enge writes: > Hello, > > Am Wed, Nov 02, 2022 at 12:05:54AM +0000 schrieb Csepp: >> * It is very easy for package to get added before their dependencies, so >> even though by the end of the commit chain everything builds perfectly >> fine, there are intermediate commits that can't be tested on their own. > > maybe it can be handled by a different workflow? I usually use the git stash > to perform a depth first traversal of the dependency graph like so: > - Add package A. Try to build it and see that it needs dependency B. > "git stash". > - Add package B *instead*. Try to build it... > (da capo ad libitum) > - "git commit" with package B. > - "git stash pop". Try to build package A etc. > - "git commit" with package A. > > The only drawback is that B and A are often defined next to each other, > which creates a spurious merge conflict during "git stash pop", but that > is easy to solve and requires an additional "git stash drop" in the end. > > Sometimes I even give up on package A in the end, but then at least B > has been added to Guix :) > > Andreas I tried that, the merge conflicts drove me nuts. And juggling the stash stack was a nightmare. Instead I ended up committing each package individually without caring about dependencies, then doing an interactive rebase where every command was edit. If I saw warnings about undefined variables I ran git rebase --edit-todo **without** magit, because it made simple textual edits needlessly hard (this is why I use Kakoune and Emacs side by side), opened .git/rebase-merge/done, cut the last line, pasted it in todo after its dependency, ran git reset --hard "HEAD^" **ONLY** if HEAD was actually that commit, if it was not yet committed because there was a merge conflict, I ran git rebase --skip. Yep, figuring out when to reset and when to skip took a few tries. :)