Skip to content

Commit e5498e8

Browse files
committed
Sync with 1.7.0 series
2 parents c4818fa + 593ce2b commit e5498e8

File tree

4 files changed

+44
-2
lines changed

4 files changed

+44
-2
lines changed

Documentation/RelNotes-1.7.0.7.txt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
Git v1.7.0.7 Release Notes
2+
==========================
3+
4+
Fixes since v1.7.0.6
5+
--------------------
6+
7+
* "make NO_CURL=NoThanks install" was broken.
8+
9+
* An overlong line after ".gitdir: " in a git file caused out of bounds
10+
access to an array on the stack.
11+
12+
* "git config --path conf.var" to attempt to expand a variable conf.var
13+
that uses "~/" short-hand segfaulted when $HOME environment variable
14+
was not set.
15+
16+
And other minor fixes and documentation updates.

Documentation/git.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,16 @@ 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+
4647
* link:v1.7.1/git.html[documentation for release 1.7.1]
4748

4849
* release notes for
4950
link:RelNotes-1.7.1.txt[1.7.1].
5051

51-
* link:v1.7.0.6/git.html[documentation for release 1.7.0.6]
52+
* link:v1.7.0.7/git.html[documentation for release 1.7.0.7]
5253

5354
* release notes for
55+
link:RelNotes-1.7.0.7.txt[1.7.0.7],
5456
link:RelNotes-1.7.0.6.txt[1.7.0.6],
5557
link:RelNotes-1.7.0.5.txt[1.7.0.5],
5658
link:RelNotes-1.7.0.4.txt[1.7.0.4],

path.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,8 @@ char *expand_user_path(const char *path)
316316
size_t username_len = first_slash - username;
317317
if (username_len == 0) {
318318
const char *home = getenv("HOME");
319+
if (!home)
320+
goto return_null;
319321
strbuf_add(&user_path, home, strlen(home));
320322
} else {
321323
struct passwd *pw = getpw_str(username, username_len);

t/t1300-repo-config.sh

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -707,19 +707,41 @@ test_expect_success 'set --path' '
707707
git config --path path.trailingtilde "foo~" &&
708708
test_cmp expect .git/config'
709709

710+
if test "${HOME+set}"
711+
then
712+
test_set_prereq HOMEVAR
713+
fi
714+
710715
cat >expect <<EOF
711716
$HOME/
712717
/dev/null
713718
foo~
714719
EOF
715720

716-
test_expect_success 'get --path' '
721+
test_expect_success HOMEVAR 'get --path' '
717722
git config --get --path path.home > result &&
718723
git config --get --path path.normal >> result &&
719724
git config --get --path path.trailingtilde >> result &&
720725
test_cmp expect result
721726
'
722727

728+
cat >expect <<\EOF
729+
/dev/null
730+
foo~
731+
EOF
732+
733+
test_expect_success 'get --path copes with unset $HOME' '
734+
(
735+
unset HOME;
736+
test_must_fail git config --get --path path.home \
737+
>result 2>msg &&
738+
git config --get --path path.normal >>result &&
739+
git config --get --path path.trailingtilde >>result
740+
) &&
741+
grep "[Ff]ailed to expand.*~/" msg &&
742+
test_cmp expect result
743+
'
744+
723745
rm .git/config
724746

725747
git config quote.leading " test"

0 commit comments

Comments
 (0)