Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Kevin Buettner <kevinb@redhat.com>
To: Andrew Burgess <aburgess@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] gdb/testsuite: fix git repository check in gdb.src/pre-commit.exp
Date: Fri, 24 Oct 2025 22:09:53 -0700	[thread overview]
Message-ID: <20251024220953.03422a3d@f41-zbm-amd> (raw)
In-Reply-To: <5fa8de4b2b28278dbc3bf4ae78709ee9e71c3aa0.1761340690.git.aburgess@redhat.com>

On Fri, 24 Oct 2025 22:18:19 +0100
Andrew Burgess <aburgess@redhat.com> wrote:

> In the recently added gdb.src/pre-commit.exp test, we check if the
> source directory is a git repository like this:
> 
>   if {![file isdirectory $repodir/.git]} {
>       unsupported "Not in a git repository"
>       return
>   }
> 
> I make extensive use of git worktrees for development.  In a worktree
> .git is a file containing the location of the actual .git directory,
> it is not itself a directory.  As such, the above check fails,
> claiming my source tree is not a git repository, when in fact, it is.
> 
> Fix this by relaxing the check to 'file exists $repodir/.git', which
> will cover the directory and file case.

Makes sense to me...

Approved-by: Kevin Buettner <kevinb@redhat.com>


  reply	other threads:[~2025-10-25  5:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-24 21:18 Andrew Burgess
2025-10-25  5:09 ` Kevin Buettner [this message]
2025-10-29  9:15   ` Andrew Burgess

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=20251024220953.03422a3d@f41-zbm-amd \
    --to=kevinb@redhat.com \
    --cc=aburgess@redhat.com \
    --cc=gdb-patches@sourceware.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox