Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5232199ybi; Tue, 4 Jun 2019 03:31:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqyj2xc1AszOYEFdHjG2r3J1Bff5CIU7I80WpMYUGgrI62lI1rQDCAkyKqeqb1+HxxsUpkZo X-Received: by 2002:a17:902:9a42:: with SMTP id x2mr18644402plv.106.1559644284947; Tue, 04 Jun 2019 03:31:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559644284; cv=none; d=google.com; s=arc-20160816; b=qM1Uo0wXVPriUHNDuodPTJG4HQeLPR8rY40T04Nb1OmPe3vNTwj98pwJmLIH1SFYiJ O7Vp5QcJwhnLr7U5yfHaEp3XaKxKvmB1FBvqxff5w4ypwDcoYwF0lTbP0R4rufmFPkD6 rNpbFLikPSpOYiyLRLaDdgMhIMyxXrp2Y7aIvSn5MPGjdFqBdNrt1dVJ8ddrVdGR+x+U sWtSwh16sIK8r4tCmLGJi8x6Ki4fhM1SMOJ/P4oO+SFPnUNMO/VM8ks4cAdaEit68Vf3 Z0axX3oGWgmm6opeKwCwUsdEuUG86louKL8HxUsKfnPhqRB5CVPLgSGLHJF4nwcy/1Gd acmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=KC6WYxlpcqhIp28quPcFujzF/rmNHk3TKH17hzBiGvA=; b=ECUwAmEOx94Mem8HCsHpUfxUE6kz0ImWAgRMSjg+JFST9jQU5O6xTD1ACoMR8K2+dI vB9k2mEN65ezFWbMUivu4DLSCOPs3/SlRpd7OUXGr3p9ekXDkGn+h/EkYR9DEIA8ZL0v VG67ECII7liJqoqPVfZJ4ve0ibYajrW76L5b565lr9XdTPJ8FSlk32AcZ+15WTj3b7Tq p/6CgIhxOEEbo4nehX/S/2HbJvVtY8TLGdsKpfqHg8m6H+uEaU9a8QyjxJBKQY1adq5d fjMMR/3KvoPMZ/NLqoRaiX3d8QajHNv8/MMWl5nSZmHIwbn4xqpp+xqhdRYj2HXOot0D V/iw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 186si21972725pfc.247.2019.06.04.03.31.06; Tue, 04 Jun 2019 03:31:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727281AbfFDK3s (ORCPT + 99 others); Tue, 4 Jun 2019 06:29:48 -0400 Received: from mail-lj1-f193.google.com ([209.85.208.193]:42339 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726877AbfFDK3s (ORCPT ); Tue, 4 Jun 2019 06:29:48 -0400 Received: by mail-lj1-f193.google.com with SMTP id t28so8022649lje.9; Tue, 04 Jun 2019 03:29:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=KC6WYxlpcqhIp28quPcFujzF/rmNHk3TKH17hzBiGvA=; b=hw+gveNYVD5uQUBCaKjvBBPmQLhpFopKknIODrN1W8tWgLQmFahFeQEwE13iTjXM1H FQ7f01eJgDJU7Ywbnvig+7TTwZCQ0O20GUNLzCI8pTWimbG/0COOEoJeYVgV3Z739Irm tDKDxGZRP5BpbFXgutvTShDrZxCLXCgt9YaMt7PO4I9EkxRKDZ6+lQgrpOOgRxLwAh6k P9GBowdwAfx8K5ueFSG8+y89MHM9gazZ5euBaCzdY5JgqvrErLFEAuMm32zPaqwi0eIm MQ97Iqio8Kbu7Q2gmjeINMPX3i5s581/3y4n9W19MsVJn9XhmvwYqBnQU8RI7TP0qVvv hSSg== X-Gm-Message-State: APjAAAUkTkf1bBPeQtdJTPaFHmbkAmX64ePu/AOJXPa6eYzFkpj8SZJm hnIlxQzwIRMQuves8K5dM4E+R8yMKS3rx10ZHdB/ZTA+6qY= X-Received: by 2002:a2e:960e:: with SMTP id v14mr16623216ljh.31.1559644185874; Tue, 04 Jun 2019 03:29:45 -0700 (PDT) MIME-Version: 1.0 References: <20190530135317.3c8d0d7b@lwn.net> In-Reply-To: <20190530135317.3c8d0d7b@lwn.net> From: Geert Uytterhoeven Date: Tue, 4 Jun 2019 12:29:33 +0200 Message-ID: Subject: Re: [PATCH RFC] Rough draft document on merging and rebasing To: Jonathan Corbet Cc: Linus Torvalds , LKML , "open list:DOCUMENTATION" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jon, On Thu, May 30, 2019 at 9:54 PM Jonathan Corbet wrote: > This is a first attempt at following through on last month's discussion > about common merging and rebasing errors. The hope here is to document > existing best practices rather than trying to define new ones. I've > certainly failed somewhere along the way; please set me straight and I'll > try to do better next time. > > Thanks, > > jon > > ------------- > docs: Add a document on repository management > > Every merge window seems to involve at least one episode where subsystem > maintainers don't manage their trees as Linus would like. Document the > expectations so that at least he has something to point people to. > > Signed-off-by: Jonathan Corbet Thanks! > --- /dev/null > +++ b/Documentation/maintainer/repo-hygiene.rst > +One thing to be aware of in general is that, unlike many other projects, > +the kernel community is not scared by seeing merge commits in its > +development history. Indeed, given the scale of the project, avoiding > +merges would be nearly impossible. Some problems encountered by > +maintainers results from a desire to avoid merges, while others come from result > +merging a little too often. [...] > + - Realize the rebasing a patch series changes the environment in which it Realize that > + was developed and, likely, invalidates much of the testing that was > + done. A rebased patch series should, as a general rule, be treated like > + new code and retested from the beginning. > +Finally > +======= > + > +It is relatively common to merge with the mainline toward the beginning of > +the development cycle in order to pick up changes and fixes done elsewhere > +in the tree. As always, such a merge should pick a well-known release > +point rather than some random spot. If your upstream-bound branch has > +emptied entirely into the mainline during the merge window, you can pull it > +forward with a command like:: > + > + git merge v5.2-rc1^0 > + > +The "^0" will cause Git to do a fast-forward merge (which should be > +possible in this situation), thus avoiding the addition of a spurious merge > +commit. I usually use git rebase v5.2-rc1 _after_ verifying everything has been merged, i.e. git cherry -v v5.2-rc1 did not give any output. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds