Skip to content

Commit

Permalink
Sync with 1.7.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Junio C Hamano committed Jul 27, 2010
2 parents 49bb1f2 + 245b10c commit 33a0292
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 3 deletions.
16 changes: 16 additions & 0 deletions Documentation/RelNotes-1.7.0.7.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Git v1.7.0.7 Release Notes
==========================

Fixes since v1.7.0.6
--------------------

* "make NO_CURL=NoThanks install" was broken.

* An overlong line after ".gitdir: " in a git file caused out of bounds
access to an array on the stack.

* "git config --path conf.var" to attempt to expand a variable conf.var
that uses "~/" short-hand segfaulted when $HOME environment variable
was not set.

And other minor fixes and documentation updates.
9 changes: 9 additions & 0 deletions Documentation/RelNotes-1.7.1.2.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,12 @@ Fixes since v1.7.1.1

* "git rev-parse --parseopt --stop-at-non-option" did not stop at non option
when --keep-dashdash was in effect.

* An overlong line after ".gitdir: " in a git file caused out of bounds
access to an array on the stack.

* "git config --path conf.var" to attempt to expand a variable conf.var
that uses "~/" short-hand segfaulted when $HOME environment variable
was not set.

And other minor fixes and documentation updates.
6 changes: 4 additions & 2 deletions Documentation/git.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,17 @@ Documentation for older releases are available here:
* release notes for
link:RelNotes-1.7.2.txt[1.7.2].

* link:v1.7.1.1/git.html[documentation for release 1.7.1.1]
* link:v1.7.1.2/git.html[documentation for release 1.7.1.2]

* release notes for
link:RelNotes-1.7.1.2.txt[1.7.1.2],
link:RelNotes-1.7.1.1.txt[1.7.1.1],
link:RelNotes-1.7.1.txt[1.7.1].

* link:v1.7.0.6/git.html[documentation for release 1.7.0.6]
* link:v1.7.0.7/git.html[documentation for release 1.7.0.7]

* release notes for
link:RelNotes-1.7.0.7.txt[1.7.0.7],
link:RelNotes-1.7.0.6.txt[1.7.0.6],
link:RelNotes-1.7.0.5.txt[1.7.0.5],
link:RelNotes-1.7.0.4.txt[1.7.0.4],
Expand Down
2 changes: 2 additions & 0 deletions path.c
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,8 @@ char *expand_user_path(const char *path)
size_t username_len = first_slash - username;
if (username_len == 0) {
const char *home = getenv("HOME");
if (!home)
goto return_null;
strbuf_add(&user_path, home, strlen(home));
} else {
struct passwd *pw = getpw_str(username, username_len);
Expand Down
24 changes: 23 additions & 1 deletion t/t1300-repo-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -707,19 +707,41 @@ test_expect_success 'set --path' '
git config --path path.trailingtilde "foo~" &&
test_cmp expect .git/config'

if test "${HOME+set}"
then
test_set_prereq HOMEVAR
fi

cat >expect <<EOF
$HOME/
/dev/null
foo~
EOF

test_expect_success 'get --path' '
test_expect_success HOMEVAR 'get --path' '
git config --get --path path.home > result &&
git config --get --path path.normal >> result &&
git config --get --path path.trailingtilde >> result &&
test_cmp expect result
'

cat >expect <<\EOF
/dev/null
foo~
EOF

test_expect_success 'get --path copes with unset $HOME' '
(
unset HOME;
test_must_fail git config --get --path path.home \
>result 2>msg &&
git config --get --path path.normal >>result &&
git config --get --path path.trailingtilde >>result
) &&
grep "[Ff]ailed to expand.*~/" msg &&
test_cmp expect result
'

rm .git/config

git config quote.leading " test"
Expand Down

0 comments on commit 33a0292

Please sign in to comment.