[libcamera-devel] [PATCH] utils: update-kernel-headers: Support git worktrees

Kieran Bingham kieran.bingham at ideasonboard.com
Tue Sep 26 14:11:11 CEST 2023


Quoting Laurent Pinchart via libcamera-devel (2023-09-26 13:08:31)
> When operating on a git worktree, the Linux kernel directory contains a
> .git file, not a .git directory. Relax the git tree check to support
> both.
> 

Oh, subtle. But yes - that sounds reasonable. Is the .git file a
symlink? Eitherway:


Reviewed-by: Kieran Bingham <kieran.bingham at ideasonboard.com>

> Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> ---
>  utils/update-kernel-headers.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/utils/update-kernel-headers.sh b/utils/update-kernel-headers.sh
> index a006452e6836..590986d2b7e2 100755
> --- a/utils/update-kernel-headers.sh
> +++ b/utils/update-kernel-headers.sh
> @@ -18,7 +18,7 @@ if [ "$line" != "# Kbuild for top-level directory of the kernel" ] ; then
>         exit 1
>  fi
>  
> -if [ ! -d "${kernel_dir}/.git" ] ; then
> +if [ ! -e "${kernel_dir}/.git" ] ; then
>         echo "Directory ${kernel_dir} doesn't contain a git tree"
>         exit 1
>  fi
> 
> -- 
> Regards,
> 
> Laurent Pinchart
>


More information about the libcamera-devel mailing list