From a18d467c4f76a8054a213c24944aff2addea08aa Mon Sep 17 00:00:00 2001 From: bryan Date: Tue, 29 Jul 2025 00:25:06 -0400 Subject: [PATCH] Hacky way to show latest commit --- openwrtbuilder | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/openwrtbuilder b/openwrtbuilder index 2c93c0e..76affe6 100755 --- a/openwrtbuilder +++ b/openwrtbuilder @@ -537,7 +537,7 @@ from_source() { execute mkdir -p "$SRC_DIR" execute git clone "$src_url" "$SRC_DIR" fi - + # Clean up orphaned or conflicting worktree if needed execute git -C "$SRC_DIR" worktree prune --verbose @@ -574,7 +574,8 @@ from_source() { echo "Current commit hash: $commit" echo "Git worktree description: $description" - ((DEBUG)) && git --no-pager -C "$BUILD_DIR" log -1 + ((DEBUG)) && git --no-pager -C "$BUILD_DIR" log --all --pretty=format:"%ai %H" | + sort -r | head -n1 | awk '{print $NF}' | xargs git show --no-patch # Enter worktree execute pushd "$BUILD_DIR" || return 1