Skip to content

Commit 890a13a

Browse files
committed
Sync with 1.7.0.4
Signed-off-by: Junio C Hamano <[email protected]>
2 parents 87b3c01 + 2be10bb commit 890a13a

File tree

11 files changed

+51
-17
lines changed

11 files changed

+51
-17
lines changed

Documentation/RelNotes-1.7.0.4.txt

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
Git v1.7.0.4 Release Notes (draft)
2-
==================================
1+
Git v1.7.0.4 Release Notes
2+
==========================
33

44
Fixes since v1.7.0.3
55
--------------------
66

7+
* Optimized ntohl/htonl on big-endian machines were broken.
8+
79
* Color values given to "color.<cmd>.<slot>" configuration can now have
810
more than one attributes (e.g. "bold ul").
911

@@ -16,4 +18,10 @@ Fixes since v1.7.0.3
1618
* "git fast-export" didn't check error status and stop when marks file
1719
cannot be opened.
1820

21+
* "git format-patch --ignore-if-in-upstream" gave unwarranted errors
22+
when the range was empty, instead of silently finishing.
23+
24+
* "git remote prune" did not detect remote tracking refs that became
25+
dangling correctly.
26+
1927
And other minor fixes and documentation updates.

Documentation/git-http-backend.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ These services can be enabled/disabled using the per-repository
3535
configuration file:
3636

3737
http.getanyfile::
38-
This serves older Git clients which are unable to use the
38+
This serves Git clients older than version 1.6.6 that are unable to use the
3939
upload pack service. When enabled, clients are able to read
4040
any file within the repository, including objects that are
4141
no longer reachable from a branch but are still present.

Documentation/git-show-ref.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ SYNOPSIS
1010
[verse]
1111
'git show-ref' [-q|--quiet] [--verify] [--head] [-d|--dereference]
1212
[-s|--hash[=<n>]] [--abbrev[=<n>]] [--tags]
13-
[--heads] [--] <pattern>...
13+
[--heads] [--] [<pattern>...]
1414
'git show-ref' --exclude-existing[=<pattern>] < ref-list
1515

1616
DESCRIPTION

Documentation/git.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,10 @@ unreleased) version of git, that is available from 'master'
4343
branch of the `git.git` repository.
4444
Documentation for older releases are available here:
4545

46-
* link:v1.7.0.3/git.html[documentation for release 1.7.0.3]
46+
* link:v1.7.0.4/git.html[documentation for release 1.7.0.4]
4747

4848
* release notes for
49+
link:RelNotes-1.7.0.4.txt[1.7.0.4],
4950
link:RelNotes-1.7.0.3.txt[1.7.0.3],
5051
link:RelNotes-1.7.0.2.txt[1.7.0.2],
5152
link:RelNotes-1.7.0.1.txt[1.7.0.1],

GIT-VERSION-GEN

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/sh
22

33
GVF=GIT-VERSION-FILE
4-
DEF_VER=v1.7.0.3
4+
DEF_VER=v1.7.0.4
55

66
LF='
77
'

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -919,6 +919,7 @@ ifeq ($(uname_S),IRIX)
919919
SNPRINTF_RETURNS_BOGUS = YesPlease
920920
SHELL_PATH = /usr/gnu/bin/bash
921921
NEEDS_LIBGEN = YesPlease
922+
NEEDS_LIBICONV = YesPlease
922923
endif
923924
ifeq ($(uname_S),IRIX64)
924925
NO_SETENV=YesPlease
@@ -937,6 +938,7 @@ ifeq ($(uname_S),IRIX64)
937938
SNPRINTF_RETURNS_BOGUS = YesPlease
938939
SHELL_PATH=/usr/gnu/bin/bash
939940
NEEDS_LIBGEN = YesPlease
941+
NEEDS_LIBICONV = YesPlease
940942
endif
941943
ifeq ($(uname_S),HP-UX)
942944
NO_IPV6=YesPlease

builtin/reset.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323

2424
static const char * const git_reset_usage[] = {
2525
"git reset [--mixed | --soft | --hard | --merge | --keep] [-q] [<commit>]",
26-
"git reset [--mixed] <commit> [--] <paths>...",
26+
"git reset [-q] <commit> [--] <paths>...",
27+
"git reset --patch [<commit>] [--] [<paths>...]",
2728
NULL
2829
};
2930

compat/bswap.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ static inline uint32_t default_swab32(uint32_t val)
1717
((val & 0x000000ff) << 24));
1818
}
1919

20+
#undef bswap32
21+
2022
#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
2123

2224
#define bswap32(x) ({ \

compat/mingw.c

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,8 +275,17 @@ int mingw_utime (const char *file_name, const struct utimbuf *times)
275275
int fh, rc;
276276

277277
/* must have write permission */
278-
if ((fh = open(file_name, O_RDWR | O_BINARY)) < 0)
279-
return -1;
278+
DWORD attrs = GetFileAttributes(file_name);
279+
if (attrs != INVALID_FILE_ATTRIBUTES &&
280+
(attrs & FILE_ATTRIBUTE_READONLY)) {
281+
/* ignore errors here; open() will report them */
282+
SetFileAttributes(file_name, attrs & ~FILE_ATTRIBUTE_READONLY);
283+
}
284+
285+
if ((fh = open(file_name, O_RDWR | O_BINARY)) < 0) {
286+
rc = -1;
287+
goto revert_attrs;
288+
}
280289

281290
time_t_to_filetime(times->modtime, &mft);
282291
time_t_to_filetime(times->actime, &aft);
@@ -286,6 +295,13 @@ int mingw_utime (const char *file_name, const struct utimbuf *times)
286295
} else
287296
rc = 0;
288297
close(fh);
298+
299+
revert_attrs:
300+
if (attrs != INVALID_FILE_ATTRIBUTES &&
301+
(attrs & FILE_ATTRIBUTE_READONLY)) {
302+
/* ignore errors again */
303+
SetFileAttributes(file_name, attrs);
304+
}
289305
return rc;
290306
}
291307

diff.c

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3883,6 +3883,7 @@ static char *run_textconv(const char *pgm, struct diff_filespec *spec,
38833883
const char **arg = argv;
38843884
struct child_process child;
38853885
struct strbuf buf = STRBUF_INIT;
3886+
int err = 0;
38863887

38873888
temp = prepare_temp_file(spec->path, spec);
38883889
*arg++ = pgm;
@@ -3893,16 +3894,20 @@ static char *run_textconv(const char *pgm, struct diff_filespec *spec,
38933894
child.use_shell = 1;
38943895
child.argv = argv;
38953896
child.out = -1;
3896-
if (start_command(&child) != 0 ||
3897-
strbuf_read(&buf, child.out, 0) < 0 ||
3898-
finish_command(&child) != 0) {
3899-
close(child.out);
3900-
strbuf_release(&buf);
3897+
if (start_command(&child)) {
39013898
remove_tempfile();
3902-
error("error running textconv command '%s'", pgm);
39033899
return NULL;
39043900
}
3901+
3902+
if (strbuf_read(&buf, child.out, 0) < 0)
3903+
err = error("error reading from textconv command '%s'", pgm);
39053904
close(child.out);
3905+
3906+
if (finish_command(&child) || err) {
3907+
strbuf_release(&buf);
3908+
remove_tempfile();
3909+
return NULL;
3910+
}
39063911
remove_tempfile();
39073912

39083913
return strbuf_detach(&buf, outsize);

0 commit comments

Comments
 (0)