Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Burgess <aburgess@redhat.com>
To: Kevin Buettner <kevinb@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] gdb/testsuite: fix git repository check in gdb.src/pre-commit.exp
Date: Wed, 29 Oct 2025 09:15:06 +0000	[thread overview]
Message-ID: <87tszi5asl.fsf@redhat.com> (raw)
In-Reply-To: <20251024220953.03422a3d@f41-zbm-amd>

Kevin Buettner <kevinb@redhat.com> writes:

> 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>

Pushed.

Thanks,
Andrew


      reply	other threads:[~2025-10-29  9:15 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
2025-10-29  9:15   ` Andrew Burgess [this message]

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=87tszi5asl.fsf@redhat.com \
    --to=aburgess@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=kevinb@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox