Skip to content

Commit

Permalink
Remove default identity
Browse files Browse the repository at this point in the history
  • Loading branch information
felipecrs committed Apr 10, 2024
1 parent 4e9cd93 commit 576f388
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ If you are forking this repository, don't forget to change the following places:
- [`scripts/install_dotfiles.sh`](./scripts/install_dotfiles.sh)
- Replace all occurrences of `felipecrs` with `<your-username>`
- [`home/.chezmoi.yaml.tmpl`](./home/.chezmoi.yaml.tmpl)
- Change the name and email to yours.
- Optional: add your name and email.
Where `<your-username>` is your GitHub username.
Expand Down
8 changes: 3 additions & 5 deletions home/.chezmoi.yaml.tmpl
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
{{- $name := "Felipe Santos" -}}
{{- $email := "[email protected]" -}}

{{- $chezmoiForce := or (has "--force" .chezmoi.args) (has "--force=true" .chezmoi.args) -}}
{{- $interactive := and stdinIsATTY (not $chezmoiForce) -}}

Expand All @@ -10,8 +7,7 @@
{{- $gnome := lookPath "gnome-shell" | not | not -}}
{{- $headless := or (env "SSH_CLIENT" | not | not) (not (or (env "DISPLAY") (env "WAYLAND_DISPLAY"))) -}}

{{- $minimum := or $devcontainer (not $ubuntu) -}}

{{- $name := "" -}}
{{- if hasKey . "name" -}}
{{- $name = .name -}}
{{- end -}}
Expand All @@ -37,6 +33,7 @@
{{- end -}}
{{- end -}}

{{- $email := "" -}}
{{- if hasKey . "email" -}}
{{- $email = .email -}}
{{- end -}}
Expand All @@ -63,6 +60,7 @@
{{- end -}}
{{- end -}}

{{- $minimum := or $devcontainer (not $ubuntu) -}}
{{- if hasKey . "is_devcontainer" -}}
{{- $minimum = .is_devcontainer -}}
{{- end -}}
Expand Down
12 changes: 9 additions & 3 deletions home/dot_gitconfig.tmpl
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
{{ if or .name .email -}}
[user]
name = {{ .name }}
email = {{ .email }}

{{- with .name }}
name = {{ . }}
{{- end }}
{{- with .email }}
email = {{ . }}
{{- end }}

{{ end -}}
[core]
editor = {{ .editor }}

Expand Down

0 comments on commit 576f388

Please sign in to comment.