Skip to content

Commit

Permalink
docs: extend git checks documentation to include additional captured …
Browse files Browse the repository at this point in the history
…repository information (#182)
  • Loading branch information
purpleclay authored Jan 1, 2025
1 parent ee755fa commit 8c8cab5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
15 changes: 10 additions & 5 deletions docs/git/checks.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
icon: material/clipboard-check-outline
title: Git checks and how to use them
description: A series of inbuilt check for inspecting the environment and current repository
status: new
---

# Git checks and how to use them
Expand Down Expand Up @@ -54,21 +55,25 @@ func main() {
log.Fatal("failed to check the current repository")
}

fmt.Printf("Default Branch: %s\n", repo.DefaultBranch)
fmt.Printf("Detached Head: %t\n", repo.DetachedHead)
fmt.Printf("Origin: %s\n", repo.Origin)
fmt.Printf("Clone Depth: %d\n", repo.CloneDepth)
fmt.Printf("Default Branch: %s\n", repo.DefaultBranch)
fmt.Printf("Detached Head: %t\n", repo.DetachedHead)
fmt.Printf("Origin: %s\n", repo.Origin)
fmt.Printf("Ref: %s\n", repo.Ref)
fmt.Printf("Remotes: %#v\n", repo.Remotes)
fmt.Printf("Root Directory: %s\n", repo.RootDir)
fmt.Printf("Shallow Clone: %t\n", repo.ShallowClone)
fmt.Printf("Root Directory: %s\n", repo.RootDir)
fmt.Printf("Shallow Clone: %t\n", repo.ShallowClone)
}
```

Example output when checking the integrity of a repository cloned within a CI system:

```{ .text .no-select .no-copy }
Clone Depth: 10
Default Branch: main
Detached Head: true
Origin: [email protected]:purpleclay/gitz.git
Ref: ee755fa89b96323b504833ad6ac188417cb04123
Remotes: map[string]string{"origin":"[email protected]:purpleclay/gitz.git"}
Root Directory: /dev/github.com/purpleclay/gitz
Shallow Clone: false
Expand Down
1 change: 0 additions & 1 deletion docs/git/diff.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
icon: material/vector-difference
title: Diff local changes within a repository
description: Inspect the current repository for changes to files and folders
status: new
---

# Diff local changes within a repository
Expand Down
2 changes: 1 addition & 1 deletion taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,6 @@ tasks:
docs:
desc: Builds and hosts the MkDocs documentation
vars:
MKDOCS_MATERIAL_VERSION: '{{default "9.5.26-insiders-4.53.11" .MKDOCS_MATERIAL_VERSION}}'
MKDOCS_MATERIAL_VERSION: '{{default "9.5.49-insiders-4.53.14-patched" .MKDOCS_MATERIAL_VERSION}}'
cmds:
- docker run --rm -it -p 8000:8000 -v $PWD:/docs ghcr.io/purpleclay/mkdocs-material-insiders:{{.MKDOCS_MATERIAL_VERSION}}

0 comments on commit 8c8cab5

Please sign in to comment.