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-Status: No, score=-3.0 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_PASS, SPF_PASS,URIBL_SBL,URIBL_SBL_A shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by dcvr.yhbt.net (Postfix) with ESMTP id D987A1F9FC for ; Wed, 24 Mar 2021 22:42:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238849AbhCXWl7 (ORCPT ); Wed, 24 Mar 2021 18:41:59 -0400 Received: from cloud.peff.net ([104.130.231.41]:48154 "EHLO cloud.peff.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235465AbhCXWln (ORCPT ); Wed, 24 Mar 2021 18:41:43 -0400 Received: (qmail 16130 invoked by uid 109); 24 Mar 2021 22:41:43 -0000 Received: from Unknown (HELO peff.net) (10.0.1.2) by cloud.peff.net (qpsmtpd/0.94) with ESMTP; Wed, 24 Mar 2021 22:41:43 +0000 Authentication-Results: cloud.peff.net; auth=none Received: (qmail 22725 invoked by uid 111); 24 Mar 2021 22:41:43 -0000 Received: from coredump.intra.peff.net (HELO sigill.intra.peff.net) (10.0.0.2) by peff.net (qpsmtpd/0.94) with (TLS_AES_256_GCM_SHA384 encrypted) ESMTPS; Wed, 24 Mar 2021 18:41:43 -0400 Authentication-Results: peff.net; auth=none Date: Wed, 24 Mar 2021 18:41:41 -0400 From: Jeff King To: Junio C Hamano Cc: =?utf-8?B?w4Z2YXIgQXJuZmrDtnLDsA==?= Bjarmason , Git , jost.schulte@tutanota.com Subject: Re: Configure default merge message Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On Wed, Mar 24, 2021 at 01:01:42PM -0700, Junio C Hamano wrote: > > I'd like to configure git to omit the "of https://bitbucket.org/repository-name" part. How can I do that? > > Ævar, is this something we recently made it impossible with 4e168333 > (shortlog: remove unused(?) "repo-abbrev" feature, 2021-01-12), or > is there more to it than resurrecting that "feature" to do what Jost > seems to want? IIRC, in that earlier discussion Linus said he used a prepare-commit-msg hook these days instead of repo-abbrev. And it should be able to handle this case, as well. Something like this seems to work for me: $ cat .git/hooks/prepare-commit-msg #!/bin/sh case "$2" in merge) perl -i -pe ' s{Merge (.*) of https://github.com/gitster/git}{Merge $1} ' "$1" ;; esac $ git pull https://github.com/gitster/git next [...] $ git log -1 --format=%s Merge branch 'next' -Peff