projects
/
git.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Remove the temp file if it is empty after the request has failed
[git.git]
/
config.c
diff --git
a/config.c
b/config.c
index
519fecf
..
e89bab2
100644
(file)
--- a/
config.c
+++ b/
config.c
@@
-13,6
+13,14
@@
static int get_next_char(void)
c = '\n';
if ((f = config_file) != NULL) {
c = fgetc(f);
+ if (c == '\r') {
+ /* DOS like systems */
+ c = fgetc(f);
+ if (c != '\n') {
+ ungetc(c, f);
+ c = '\r';
+ }
+ }
if (c == '\n')
config_linenr++;
if (c == EOF) {