all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Po Lu <luangruo@yahoo.com>
To: emacs-devel@gnu.org
Subject: Re: build-aux/git-hooks/pre-push
Date: Mon, 01 May 2023 14:33:27 +0800	[thread overview]
Message-ID: <871qk0ef2g.fsf@yahoo.com> (raw)
In-Reply-To: <875y9cef96.fsf@yahoo.com> (Po Lu's message of "Mon, 01 May 2023 14:29:25 +0800")

Po Lu <luangruo@yahoo.com> writes:

> This script apparently loses when pushing from a separate worktree,
> where .git is a file containing the name of the repository the worktree
> was created from.
>
> The following adjustment seems to fix it.  However, I don't know much
> about git.  Objections?
>
> diff --git a/build-aux/git-hooks/pre-push b/build-aux/git-hooks/pre-push
> index 8e8277cba4f..8a2866f9d4c 100755
> --- a/build-aux/git-hooks/pre-push
> +++ b/build-aux/git-hooks/pre-push
> @@ -83,4 +83,4 @@ $awk -v origin_name="$1" '
>      # Print every SHA after oldref, up to (and including) newref.
>      system("git rev-list --first-parent --reverse " oldref ".." newref)
>    }
> -' | $awk -v reason=pre-push -f .git/hooks/commit-msg-files.awk
> +' | $awk -v reason=pre-push -f build-aux/git-hooks/commit-msg-files.awk

Btw, I notice that the script falls back to awk if gawk cannot be found.
Maybe in that case, the awk script should be rewritten to not utilize
getline, sub, function, and other features which do not work with Unix
awk?  Or maybe it should try harder to find a POSIX awk?

Thanks.



  reply	other threads:[~2023-05-01  6:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <875y9cef96.fsf.ref@yahoo.com>
2023-05-01  6:29 ` build-aux/git-hooks/pre-push Po Lu
2023-05-01  6:33   ` Po Lu [this message]
2023-05-02  5:35     ` build-aux/git-hooks/pre-push Jim Porter
2023-05-02  5:55       ` build-aux/git-hooks/pre-push Po Lu
2023-05-01 16:55   ` build-aux/git-hooks/pre-push Jim Porter
2023-05-02  0:08     ` build-aux/git-hooks/pre-push Po Lu
2023-05-04 10:37     ` build-aux/git-hooks/pre-push Basil Contovounesios
2023-05-04 16:28       ` build-aux/git-hooks/pre-push Jim Porter
2023-05-04 16:42         ` build-aux/git-hooks/pre-push Basil Contovounesios
2023-05-04 16:56           ` build-aux/git-hooks/pre-push Jim Porter

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=871qk0ef2g.fsf@yahoo.com \
    --to=luangruo@yahoo.com \
    --cc=emacs-devel@gnu.org \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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.