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: AS53758 23.128.96.0/24 X-Spam-Status: No, score=-4.2 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS,SPF_PASS 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 839CD1F8C6 for ; Thu, 19 Aug 2021 22:28:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233542AbhHSW2k (ORCPT ); Thu, 19 Aug 2021 18:28:40 -0400 Received: from cloud.peff.net ([104.130.231.41]:52650 "EHLO cloud.peff.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229532AbhHSW2k (ORCPT ); Thu, 19 Aug 2021 18:28:40 -0400 Received: (qmail 15290 invoked by uid 109); 19 Aug 2021 22:28:03 -0000 Received: from Unknown (HELO peff.net) (10.0.1.2) by cloud.peff.net (qpsmtpd/0.94) with ESMTP; Thu, 19 Aug 2021 22:28:03 +0000 Authentication-Results: cloud.peff.net; auth=none Received: (qmail 32475 invoked by uid 111); 19 Aug 2021 22:28:02 -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; Thu, 19 Aug 2021 18:28:02 -0400 Authentication-Results: peff.net; auth=none Date: Thu, 19 Aug 2021 18:28:02 -0400 From: Jeff King To: "Lin, Nathan (GSE)" Cc: "git@vger.kernel.org" Subject: Re: General questions - git archive a .j2 file with keyword expansion in the header section Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On Thu, Aug 19, 2021 at 09:28:11PM +0000, Lin, Nathan (GSE) wrote: > Got a question on using git keyword expansion on a .j2 template file. > Keyword expansion does not seem to work with .j2 file. Please see > below a snippet of my attempt to archive test.cfg.j2 containing git > keyword expansions in the header. It works if I changes the .j2 file > extension to something else, say .yaml. I have not been able to find > any information about issue. Can you please review and advise? Thank > you. Do you have .gitattributes entries that tell Git it should apply the "export-subst" attribute to any files? If so, does it cover .yaml files, but not .j2? -Peff