All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>
Subject: [PATCH v2 0/1] Fix "built from commit" logic
Date: Fri, 29 Jun 2018 12:16:11 +0000	[thread overview]
Message-ID: <pull.7.v2.git.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.7.git.gitgitgadget@gmail.com>

When I tried recently to build macOS installers via Tim Harper's wonderful project at https://github.com/timcharper/git_osx_installer, it worked (with a couple of quirks), but it reported to be built from a commit that I first could not place.

Turns out that the git_osx_installer project insists on building Git from a .tar.gz file (even if I have the source code right here, in a perfectly fine worktree). And due to a bug in the logic I introduced, it did not
stop looking for a Git repository where it should have stopped. The end effect is that `git version --build-options` reports being built from  git_osx_installer's HEAD.

This commit fixes that, and also suppresses the error when no repository could be found.

Changes since v1:

- the commit message now sports an explanatory paragraph, copy-edited from Peff's reply.

Johannes Schindelin (1):
  Makefile: fix the "built from commit" code

 Makefile | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)


base-commit: e3331758f12da22f4103eec7efe1b5304a9be5e9
Published-As: https://github.com/gitgitgadget/git/releases/tags/pr-7%2Fdscho%2Ffix-build-options-commit-info-v2
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-7/dscho/fix-build-options-commit-info-v2
Pull-Request: https://github.com/gitgitgadget/git/pull/7

Range-diff vs v1:

 1:  e0e41d0b8 ! 1:  aca087479 Makefile: fix the "built from commit" code
     @@ -15,6 +15,11 @@
          Except that we got the quoting wrong, and that variable therefore does
          not have the desired effect.
      
     +    The issue is that the $(shell) is resolved before the output is stuffed
     +    into the command-line with -DGIT_BUILT_FROM_COMMIT, and therefore is
     +    *not* inside quotes. And thus backslashing the quotes is wrong, as the
     +    quote gets literally inserted into the CEILING_DIRECTORIES variable.
     +
          Let's fix that quoting, and while at it, also suppress the unhelpful
          message
      

-- 
gitgitgadget

  parent reply	other threads:[~2018-06-29 12:16 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-28 12:53 [PATCH 0/1] Makefile: fix the "built from commit" code Johannes Schindelin via GitGitGadget
2018-06-27 19:35 ` [PATCH 1/1] " Johannes Schindelin via GitGitGadget
2018-06-28 13:23   ` Jeff King
2018-06-28 16:23     ` Johannes Schindelin
2018-06-28 17:27       ` Junio C Hamano
2018-06-28 17:47         ` Jeff King
2018-06-29 11:29           ` Johannes Schindelin
2018-06-28 17:49       ` Jeff King
2018-06-28 13:18 ` [PATCH 0/1] " Johannes Schindelin
2018-06-28 23:14 ` brian m. carlson
2018-06-29 12:16 ` Johannes Schindelin via GitGitGadget [this message]
2018-06-27 19:35   ` [PATCH v2 1/1] " Johannes Schindelin via GitGitGadget

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=pull.7.v2.git.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.