xref: /kernel/linux/linux-6.6/scripts/check-git
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /kernel/linux/linux-6.6/scripts/
162306a36Sopenharmony_ci#!/bin/sh
262306a36Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0-only
362306a36Sopenharmony_ci#
462306a36Sopenharmony_ci# succeed if we are in a git repository
562306a36Sopenharmony_ci
662306a36Sopenharmony_cisrctree="$(dirname $0)/.."
762306a36Sopenharmony_ci
862306a36Sopenharmony_ciif ! git -C "${srctree}" rev-parse --verify HEAD >/dev/null 2>/dev/null; then
962306a36Sopenharmony_ci	exit 1
1062306a36Sopenharmony_cifi
1162306a36Sopenharmony_ci
1262306a36Sopenharmony_ciif ! test -z $(git -C "${srctree}" rev-parse --show-cdup 2>/dev/null); then
1362306a36Sopenharmony_ci	exit 1
1462306a36Sopenharmony_cifi
15

Indexes created Thu Nov 07 10:32:03 CST 2024