Skip to content

Commit 9c4ba98

Browse files
committed
Use --includes option with git config --global.
1 parent 297877c commit 9c4ba98

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

Diff for: nb

+4-4
Original file line numberDiff line numberDiff line change
@@ -3884,7 +3884,7 @@ HEREDOC
38843884

38853885
if [[ -n "${__name:-}" ]]
38863886
then
3887-
git config --global user.name "${__name}"
3887+
git config --global --includes user.name "${__name}"
38883888

38893889
break
38903890
fi
@@ -3900,7 +3900,7 @@ HEREDOC
39003900

39013901
if [[ -n "${__email:-}" ]]
39023902
then
3903-
git config --global user.email "${__email}"
3903+
git config --global --includes user.email "${__email}"
39043904

39053905
break
39063906
fi
@@ -7810,12 +7810,12 @@ HEREDOC
78107810

78117811
local _global_email=
78127812
_global_email="$(
7813-
git -C "${_notebook_path:-}" config --global user.email || :
7813+
git -C "${_notebook_path:-}" config --global --includes user.email || :
78147814
)"
78157815

78167816
local _global_name=
78177817
_global_name="$(
7818-
git -C "${_notebook_path:-}" config --global user.name || :
7818+
git -C "${_notebook_path:-}" config --global --includes user.name || :
78197819
)"
78207820

78217821
local _local_email=

Diff for: test/notebooks-add.bats

+8-8
Original file line numberDiff line numberDiff line change
@@ -1046,10 +1046,10 @@ Press\ .*enter.*\ to\ use\ the\ selected\ name,\ .*type.*\ a\ new\ name,\ or\ pr
10461046
"${_NB}" add "Example Home File.md" --content "Example home content."
10471047

10481048
declare _global_email=
1049-
_global_email="$(git -C "${NB_DIR}/home" config --global user.email)"
1049+
_global_email="$(git -C "${NB_DIR}/home" config --global --includes user.email)"
10501050

10511051
declare _global_name=
1052-
_global_name="$(git -C "${NB_DIR}/home" config --global user.name)"
1052+
_global_name="$(git -C "${NB_DIR}/home" config --global --includes user.name)"
10531053

10541054
diff \
10551055
<("${_NB}" git log -1 --stat | sed -n '2 p') \
@@ -1103,10 +1103,10 @@ Enter\ a\ new\ value,\ .*unset.*\ to\ use\ the\ global\ value, ]]
11031103
"${_NB}" add "Example Home File.md" --content "Example home content."
11041104

11051105
declare _global_email=
1106-
_global_email="$(git -C "${NB_DIR}/home" config --global user.email)"
1106+
_global_email="$(git -C "${NB_DIR}/home" config --global --includes user.email)"
11071107

11081108
declare _global_name=
1109-
_global_name="$(git -C "${NB_DIR}/home" config --global user.name)"
1109+
_global_name="$(git -C "${NB_DIR}/home" config --global --includes user.name)"
11101110

11111111
diff \
11121112
<("${_NB}" git log -1 --stat | sed -n '2 p') \
@@ -1156,10 +1156,10 @@ Enter\ a\ new\ value,\ .*unset.*\ to\ use\ the\ global\ value, ]]
11561156
"${_NB}" add "Example Home File.md" --content "Example home content."
11571157

11581158
declare _global_email=
1159-
_global_email="$(git -C "${NB_DIR}/home" config --global user.email)"
1159+
_global_email="$(git -C "${NB_DIR}/home" config --global --includes user.email)"
11601160

11611161
declare _global_name=
1162-
_global_name="$(git -C "${NB_DIR}/home" config --global user.name)"
1162+
_global_name="$(git -C "${NB_DIR}/home" config --global --includes user.name)"
11631163

11641164
diff \
11651165
<("${_NB}" git log -1 --stat | sed -n '2 p') \
@@ -1210,10 +1210,10 @@ Enter\ a\ new\ value,\ .*unset.*\ to\ use\ the\ global\ value, ]]
12101210
"${_NB}" add "Example Home File.md" --content "Example home content."
12111211

12121212
declare _global_email=
1213-
_global_email="$(git -C "${NB_DIR}/home" config --global user.email)"
1213+
_global_email="$(git -C "${NB_DIR}/home" config --global --includes user.email)"
12141214

12151215
declare _global_name=
1216-
_global_name="$(git -C "${NB_DIR}/home" config --global user.name)"
1216+
_global_name="$(git -C "${NB_DIR}/home" config --global --includes user.name)"
12171217

12181218
diff \
12191219
<("${_NB}" git log -1 --stat | sed -n '2 p') \

0 commit comments

Comments
 (0)