Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions docs/project-statistics.md
Original file line number Diff line number Diff line change
Expand Up @@ -484,26 +484,26 @@ Profil 2 verwendet Git-getrackte Textdateien und sichtbare Git-Aktivitaet. Die W

| Kennzahl / Metric | Wert / Value |
|---|---:|
| Textbasis / Text base | 287564 lines |
| Textbasis / Text base | 287582 lines |
| Textdateien / Text files | 1694 |
| Beobachtbarer Zeitraum / Observable period | 2026-03-31..2026-07-19 |
| Aktivtage / Active days | 67 |
| Relevante Commits / Relevant commits | 450 |
| Zeilen je Aktivtag / Lines per active day | 4292.0 |
| Relevante Commits / Relevant commits | 451 |
| Zeilen je Aktivtag / Lines per active day | 4292.3 |
| Peak-Tag im Fenster / Peak day in window | 2026-07-08 / 40319 |
| Peak-Woche im Fenster / Peak week in window | 2026-07-05 / 121867 |
| Laengste Serie / Longest streak | 24 days |
| Speedup vs. 80 lines/day | 53.7x |
| Speedup vs. 100 lines/day | 42.9x |
| Methodik / Methodology | v2; source `bae64b8ede3b` |
| Methodik / Methodology | v2; source `016024b8c389` |

### Artefaktmix / Artifact Mix

```text
Produktiv / Production [....................] 0.0% | 0
Tests [#...................] 2.3% | 6726
Dokumentation / Documentation [#################...] 83.5% | 240137
Skripte / Scripts [###.................] 13.0% | 37427
Skripte / Scripts [###.................] 13.0% | 37445
Konfiguration / Configuration [#...................] 0.9% | 2643
Daten und Medien / Data and media [....................] 0.0% | 0
Sonstiger Text / Other text [#...................] 0.2% | 631
Expand Down Expand Up @@ -635,7 +635,7 @@ Die Faktoren vergleichen sichtbare Lieferdichte mit den dokumentierten manuellen
Scale: 0..5000 lines/day
Experienced manual [#...................] 80
Thorsten solo [#...................] 100
Visible repository [#################...] 4292.0
Visible repository [#################...] 4292.3
```

Die gemeinsame Skala vergleicht Referenzen und sichtbare Lieferdichte. Sie schreibt die Git-Aktivitaet keiner Person oder KI pauschal zu.
Expand All @@ -661,6 +661,6 @@ DE: Das Fenster beginnt am 2025-07-27 und endet am 2026-07-19. Es enthaelt 67 ak
| 2026-04 | 72825 |
| 2026-05 | 2454 |
| 2026-06 | 49106 |
| 2026-07 | 195025 |
| 2026-07 | 195065 |

<!-- project-statistics-v2:end -->
19 changes: 15 additions & 4 deletions scripts/lib/resolve-home-baseline-source.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
#Requires -Version 7
Set-StrictMode -Version Latest

function Test-HBSourceRepository {
[CmdletBinding()]
param([Parameter(Mandatory)][string]$Path)

if (-not (Test-Path -LiteralPath (Join-Path $Path '.git')) -or
-not (Test-Path -LiteralPath (Join-Path $Path 'scripts/sync-home.ps1'))) {
return $false
}
$remote = & git -C $Path remote get-url origin 2>$null
$LASTEXITCODE -eq 0 -and
[string]$remote -match 'hindermath/home-baseline(?:\.git)?$'
Comment thread
hindermath marked this conversation as resolved.
Outdated
}

function Resolve-HBSourceRepository {
[CmdletBinding()]
param(
Expand All @@ -13,8 +26,7 @@ function Resolve-HBSourceRepository {
$candidate = Split-Path -Parent $candidate
}
while ($candidate) {
if ((Test-Path -LiteralPath (Join-Path $candidate '.git')) -and
(Test-Path -LiteralPath (Join-Path $candidate 'scripts/sync-home.ps1'))) {
if (Test-HBSourceRepository -Path $candidate) {
return $candidate
}
$parent = Split-Path -Parent $candidate
Expand Down Expand Up @@ -44,8 +56,7 @@ function Resolve-HBSourceRepository {

foreach ($item in $candidates) {
$path = [IO.Path]::GetFullPath([Environment]::ExpandEnvironmentVariables($item.Path))
if ((Test-Path -LiteralPath (Join-Path $path '.git')) -and
(Test-Path -LiteralPath (Join-Path $path 'scripts/sync-home.ps1'))) {
if (Test-HBSourceRepository -Path $path) {
if ($item.Legacy) {
Write-Warning 'Legacy checkout ~/home-baseline-tmp is deprecated; migrate to ~/home-baseline-source.'
}
Expand Down
21 changes: 14 additions & 7 deletions scripts/lib/resolve-home-baseline-source.sh
Original file line number Diff line number Diff line change
@@ -1,41 +1,48 @@
#!/usr/bin/env bash

_is_hb_source_repository() {
local candidate="$1"
local remote
[ -e "$candidate/.git" ] && [ -f "$candidate/scripts/sync-home.sh" ] || return 1
remote="$(git -C "$candidate" remote get-url origin 2>/dev/null)" || return 1
[[ "$remote" =~ hindermath/home-baseline(\.git)?$ ]]
Comment thread
hindermath marked this conversation as resolved.
Outdated
}

resolve_hb_source_repository() {
local start_path="${1:-${BASH_SOURCE[0]}}"
local allow_legacy="${2:-0}"
local candidate state_path configured

candidate="$(cd -- "$(dirname -- "$start_path")" 2>/dev/null && pwd -P)" || return 2
while [ "$candidate" != "/" ]; do
if [ -e "$candidate/.git" ] && [ -f "$candidate/scripts/sync-home.sh" ]; then
if _is_hb_source_repository "$candidate"; then
printf '%s\n' "$candidate"
return 0
fi
candidate="$(dirname -- "$candidate")"
done

if [ -n "${HOME_BASELINE_SOURCE:-}" ] &&
[ -e "${HOME_BASELINE_SOURCE}/.git" ] &&
[ -f "${HOME_BASELINE_SOURCE}/scripts/sync-home.sh" ]; then
_is_hb_source_repository "$HOME_BASELINE_SOURCE"; then
(cd -- "$HOME_BASELINE_SOURCE" && pwd -P)
return 0
fi

state_path="${HOME}/.home-baseline/source-repository.json"
if [ -f "$state_path" ] && command -v jq >/dev/null 2>&1; then
configured="$(jq -er '.sourcePath | select(type == "string" and length > 0)' "$state_path" 2>/dev/null || true)"
if [ -n "$configured" ] && [ -e "$configured/.git" ] &&
[ -f "$configured/scripts/sync-home.sh" ]; then
if [ -n "$configured" ] && _is_hb_source_repository "$configured"; then
(cd -- "$configured" && pwd -P)
return 0
fi
fi

if [ -e "${HOME}/home-baseline-source/.git" ]; then
if _is_hb_source_repository "${HOME}/home-baseline-source"; then
(cd -- "${HOME}/home-baseline-source" && pwd -P)
return 0
fi
if [ "$allow_legacy" -eq 1 ] && [ -e "${HOME}/home-baseline-tmp/.git" ]; then
if [ "$allow_legacy" -eq 1 ] &&
_is_hb_source_repository "${HOME}/home-baseline-tmp"; then
printf '%s\n' 'WARN: ~/home-baseline-tmp is deprecated; migrate to ~/home-baseline-source.' >&2
(cd -- "${HOME}/home-baseline-tmp" && pwd -P)
return 0
Expand Down
Loading