qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH qemu] configure: Enable werror for git worktrees


From: Gerd Hoffmann
Subject: Re: [Qemu-devel] [PATCH qemu] configure: Enable werror for git worktrees
Date: Thu, 28 Feb 2019 08:14:44 +0100
User-agent: NeoMutt/20180716

On Thu, Feb 28, 2019 at 08:01:53AM +0100, Thomas Huth wrote:
> On 28/02/2019 06.00, David Gibson wrote:
> > On Thu, Feb 28, 2019 at 03:35:03PM +1100, Alexey Kardashevskiy wrote:
> >> The configure script checks multiple times whether it works in a git
> >> repository and it does this by "test -e "${source_path}/.git" in 4 cases
> >> but in one case where it tries to enable werror "-d" is used there which
> >> fails on git worktrees as .git is a file then and not a directory.
> 
> That confused me. What is a "git worktree" where .git is a file? So far
> .git was always a directory here...?

git worktree --help

A worktree is basically a clone, but instead of copying over the git
repo it is simply referenced.

That is not the only possible case where .git is a file not a directory.
In newer versions "git submodule" stores the repo in
.git/modules/$submodule and $submodule/.git is just a file with a
reference:

address@hidden ~/projects/qemu# cat roms/seabios/.git
gitdir: ../../.git/modules/roms/seabios

So, yes, the patch makes sense.

cheers,
  Gerd




reply via email to

[Prev in Thread] Current Thread [Next in Thread]