-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
git: escape string values in configuration
This should handle the special characters that typically occur. Fixes #1206
- Loading branch information
Showing
6 changed files
with
42 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
[user] | ||
email = user@example.org | ||
name = John Doe | ||
email = "user@example.org" | ||
name = "John Doe" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
[sendemail "hm-account"] | ||
from = hm@example.org | ||
smtpEncryption = tls | ||
smtpServer = smtp.example.org | ||
smtpUser = home.manager.jr | ||
from = "hm@example.org" | ||
smtpEncryption = "tls" | ||
smtpServer = "smtp.example.org" | ||
smtpUser = "home.manager.jr" | ||
|
||
[sendemail "hm@example.com"] | ||
from = hm@example.com | ||
smtpEncryption = tls | ||
smtpServer = smtp.example.com | ||
smtpUser = home.manager | ||
from = "hm@example.com" | ||
smtpEncryption = "tls" | ||
smtpServer = "smtp.example.com" | ||
smtpUser = "home.manager" | ||
|
||
[user] | ||
email = hm@example.com | ||
name = H. M. Test | ||
email = "hm@example.com" | ||
name = "H. M. Test" |
4 changes: 2 additions & 2 deletions
4
tests/modules/programs/git/git-with-str-extra-config-expected.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
This can be anything. | ||
|
||
[user] | ||
email = user@example.org | ||
name = John Doe | ||
email = "user@example.org" | ||
name = "John Doe" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,7 @@ in { | |
aliases = { | ||
a1 = "foo"; | ||
a2 = "bar"; | ||
escapes = ''"\n ''; | ||
}; | ||
extraConfig = { | ||
extra = { | ||
|
642d9ff
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rycee This change broke my escaping and had to fix it by removing those escapes, maybe worth a news item?
kalbasit/shabka@8c082f7
kalbasit/dotshabka@b947baf
642d9ff
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point! I've added a news entry in 1f174f6.