From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id MGaZG9yMymMAcgAAbAwnHQ (envelope-from ) for ; Fri, 20 Jan 2023 13:45:16 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id AOoxG9yMymNPWQEAauVa8A (envelope-from ) for ; Fri, 20 Jan 2023 13:45:16 +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 DC8DA45B02 for ; Fri, 20 Jan 2023 13:45:15 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pIqkf-0007tj-Ih; Fri, 20 Jan 2023 07:44:15 -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 1pIqkY-0007tC-Oo for emacs-orgmode@gnu.org; Fri, 20 Jan 2023 07:44:07 -0500 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pIqkW-0003B7-E3 for emacs-orgmode@gnu.org; Fri, 20 Jan 2023 07:44:06 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 5E89D2401C5 for ; Fri, 20 Jan 2023 13:43:58 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1674218641; bh=SXyBtrdz38jeMNj548zIUz2lSd2rmvfA9GbgWhnR8dQ=; h=From:To:Cc:Subject:Date:From; b=DPpC6ow0emZR/v8PUqVL0ORsa9IqUf8Izn7dAlyLhA+lEfL5bLS2VWhtJUMjc617O GQCjmvoU8XPUaJIGvvW2Hv/SlAC6NMmxMBavJ1ZKDrVvoq+dEXlqPbw74nrLIaJziu Ztb0FzAeJUWrs0kj3UH+C6VzMbLrfMpKoNbpC5v8iOwU1OZW5dE0U7CAg5Sxa3EF/F 6dN9KJGiCojPf+9lp/o++s5GSnZ4UAhIQhioFgd0/rl9uLm+iLh0zKbJmN3i+FFbLy diN+Mf1o1dXT5ZrzLxFrzvpv7BI0y70utoyBqIC6JHuFJpldJ0HCKKOfIjgojhxT3e 1XOeI+uuAFCOg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4NyzhF6JdQz6tmp; Fri, 20 Jan 2023 13:43:57 +0100 (CET) From: Ihor Radchenko To: No Wayman Cc: emacs-orgmode@gnu.org Subject: Re: [PATCH] Support building Org from shallow clone [9.6.1 (release_9.6.1-137-gecb62e @ /home/n/.emacs.d/elpaca/builds/org/)] In-Reply-To: <87wn5it214.fsf@gmail.com> References: <87r0vvr2ai.fsf@gmail.com> <87358alhux.fsf@localhost> <87tu0q5m2t.fsf@gmail.com> <877cxligy6.fsf@localhost> <87fsc7e8ub.fsf@gmail.com> <87bkmve8qv.fsf@gmail.com> <87bkmu4vqg.fsf@localhost> <87wn5it214.fsf@gmail.com> Date: Fri, 20 Jan 2023 12:44:26 +0000 Message-ID: <877cxhs7dh.fsf@localhost> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1674218716; a=rsa-sha256; cv=none; b=MRtLWYZqPdvhI4TouZWUXI5isAoSmwMfAiBiH7NV9CMQ7UxpSV+xxcKXX8zspyyvqi6kSj XDBniUUxNiBRciEns5c2HUB86UBCE6JXkLET8/IxIcO3QvfyOvuSim1lvHBVOogYMpXHDh icJ6BSIKC2knP6YPFRiTfh1kskAwHWrlJo2ufoHxsZEksFwwmwyPlrd6iqxqDr+qQxnexH 7WChbOn3y0LZkXG5ycFPPRIs+rixzRjAu/aiEBPn7jxmrhC+BEKNhY/fTABydSmMcdZFwJ tXXIgNpAB+KEbAWzOzvX9CooqtYaTpaOrOc1duq9qQOD8ZnaaUcwmMRAv7SaLA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=DPpC6ow0; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1674218716; 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=KjKFYbXHKcnUaf2QwVFb4TnUM9VzRbCRBvTqxcw3Jdw=; b=o/8jrzZwoBCFpZx5gMWpyHoGaNggKsCGfx2SU8nDuIwM0M97Pf/d5Vz0AEENJDAbYj0zvT QPKhjooY/DKTIxi5P96kKYLDxCggiUtgrj0Iyu1ptUi1ARIQAXvBm6Uxw3kYup5EjbEFHO FaFXJxjWhr/dEgwubXScOHSZ4ANTwjzDCl3Z1HxlZWK3PwGvzV3qXmUQ7W/XwkhX92Gf1Y 89C1ahWx+XKFVeQVTiT21WUcvl3eo5EeXsHmf2Ox/YDde7yTCktDCoGk5l/ybN954otM9t q5YouPW5G2WlpcZxw7wxtgs5a6Fh11Kr0Fk3Wma0AFhKe8itCcIjaJmA0aAaTQ== X-Spam-Score: -9.87 X-Migadu-Queue-Id: DC8DA45B02 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=DPpC6ow0; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -9.87 X-TUID: 2PIc3NdXA6hS --=-=-= Content-Type: text/plain No Wayman writes: > Feel free to take this the patch as a base to do whatever you > please with it. Then, I am thinking about a simple approach that will not involve internet connection. See the attached. Note that you, in fact, can fetch the latest tags from remote into shallow clone. See https://stackoverflow.com/questions/66349002/get-latest-tag-git-describe-tags-when-repo-is-cloned-with-depth-1 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-mk-targets.mk-GITVERSION-Provide-commit-number-for-s.patch >From 93a75bcd3f8badf11c9234e5336e450d2d2baf60 Mon Sep 17 00:00:00 2001 Message-Id: <93a75bcd3f8badf11c9234e5336e450d2d2baf60.1674218582.git.yantar92@posteo.net> From: Ihor Radchenko Date: Fri, 20 Jan 2023 15:25:33 +0300 Subject: [PATCH] * mk/targets.mk(GITVERSION): Provide commit number for shallow clones Fall back to using git log when git describe fails in Org repo. See https://orgmode.org/list/87bkmve8qv.fsf@gmail.com --- mk/targets.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mk/targets.mk b/mk/targets.mk index 4435daa..164b092 100644 --- a/mk/targets.mk +++ b/mk/targets.mk @@ -14,7 +14,7 @@ ifneq ($(wildcard .git),) # Use the org.el header. ORGVERSION := $(patsubst %-dev,%,$(shell $(BATCH) --eval "(require 'lisp-mnt)" \ --visit lisp/org.el --eval '(princ (lm-header "version"))')) - GITVERSION ?= $(shell git describe --match release\* --abbrev=6 HEAD) + GITVERSION ?= $(shell git describe --match release\* --abbrev=6 HEAD 2>/dev/null || echo "release_N/A-N/A-$(shell git log --format=%h HEAD^..HEAD)") GITSTATUS ?= $(shell git status -uno --porcelain) else -include mk/version.mk -- 2.39.1 --=-=-= Content-Type: text/plain -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at --=-=-=--