From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Keeping Subject: Re: Feature request: Configurable prefixes for git commit --fixup and --squash Date: Thu, 3 Mar 2016 13:21:28 +0000 Message-ID: <20160303132128.GE1766@serenity.lan> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: git@vger.kernel.org To: authmillenon@riot-os.org X-From: git-owner@vger.kernel.org Thu Mar 03 14:21:49 2016 Return-path: Envelope-to: gcvg-git-2@plane.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1abTCN-0006lO-Ah for gcvg-git-2@plane.gmane.org; Thu, 03 Mar 2016 14:21:47 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756717AbcCCNVi (ORCPT ); Thu, 3 Mar 2016 08:21:38 -0500 Received: from jackal.aluminati.org ([72.9.247.210]:48306 "EHLO jackal.aluminati.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754902AbcCCNVh (ORCPT ); Thu, 3 Mar 2016 08:21:37 -0500 Received: from localhost (localhost [127.0.0.1]) by jackal.aluminati.org (Postfix) with ESMTP id 8DA56CDA556; Thu, 3 Mar 2016 13:21:36 +0000 (GMT) X-Quarantine-ID: X-Virus-Scanned: Debian amavisd-new at serval.aluminati.org X-Spam-Flag: NO X-Spam-Score: -0.2 X-Spam-Level: X-Spam-Status: No, score=-0.2 tagged_above=-9999 required=5 tests=[ALL_TRUSTED=-1, BAYES_50=0.8] autolearn=no Received: from jackal.aluminati.org ([127.0.0.1]) by localhost (jackal.aluminati.org [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id F8gQa2pQo68z; Thu, 3 Mar 2016 13:21:35 +0000 (GMT) Received: from serenity.lan (chimera.aluminati.org [10.0.16.60]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by jackal.aluminati.org (Postfix) with ESMTPSA id A4242CDA5AE; Thu, 3 Mar 2016 13:21:30 +0000 (GMT) Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: On Thu, Mar 03, 2016 at 01:47:00PM +0100, Martine Lenders wrote: > I'm not sure if this was already requested somewhere (a quick - but > admittedly not thorough - search did not reveal anything in that > direction), but I really miss an option to configure the prefixes generated > by `git commit (--fixup | --squash) ` and picked up by `git rebase > -i --autosquash`. > > My reasoning is that in our project we use GitHub + Travis to test-build > our pull requests, but we don't want to spam the CI server with builds that > are just fixups to previous changes (which are uploaded so reviewers can > track the changes to the original PR). Now, Travis has the option to not > build a commit if there is the string `[ci skip]` in the commit message > (sadly also not configurable) so it would be really great for my workflow > if I could just add this string to the message generated by `--fixup`. I am against the feature as you describe it, because it has the potential to break `git rebase --autosquash` with shared fixups if two people are using a different prefix. However, it sounds like Travis will recognize "[ci skip]" anywhere in the commit message. Would a feature to allow autogenerated content in fixup/squash commit message bodies work? In fact, this can already be achieved with a prepare-commit-msg hook like this (untested, but shows the principle): -- >8 -- #!/bin/sh case "$(head -n 1 "$1")" in "fixup! "*|"squash! "*) cat >>"$1" <<-\EOF [ci skip] EOF esac