Skip to content

Commit a5f188d

Browse files
authored
Merge pull request progit#1049 from danstur/fix-1047
Fix incorrect note about PowerShell quoting.
2 parents fe6e96d + c02f726 commit a5f188d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

book/10-git-internals/sections/objects.asc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,10 @@ $ git cat-file -p 99f1a6d12cb4b6f19c8655fca46c3ecf317074e0
149149
====
150150
Depending on what shell you use, you may encounter errors when using the `master^{tree}` syntax.
151151
152-
In PowerShell or CMD on Windows, the `^` character is used for escaping, so you have to double it to avoid this: `git cat-file -p master^^{tree}`.
152+
In CMD on Windows, the `^` character is used for escaping, so you have to double it to avoid this: `git cat-file -p master^^{tree}`.
153+
When using PowerShell, parameters using {} characters have to be quoted to avoid the parameter being parsed incorrectly: `git cat-file -p 'master^{tree}'`.
153154
154-
If you're using ZSH, the `^` character is used for globbing, so you have to enclose the whole expression in quotes: `git cat-file -p "master^{tree}"`
155+
If you're using ZSH, the `^` character is used for globbing, so you have to enclose the whole expression in quotes: `git cat-file -p "master^{tree}"`.
155156
====
156157

157158
Conceptually, the data that Git is storing looks something like this:

0 commit comments

Comments
 (0)