Skip to content

Commit 447d0cc

Browse files
committed
Merge branch 'maint' to sync with 1.5.6.3
* maint: GIT 1.5.6.3 git-am: Do not exit silently if committer is unset t0004: fix timing bug git-mailinfo: document the -n option Fix backwards-incompatible handling of core.sharedRepository
2 parents fa6200f + 191a8e3 commit 447d0cc

File tree

8 files changed

+61
-22
lines changed

8 files changed

+61
-22
lines changed

Documentation/RelNotes-1.5.6.3.txt

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,16 @@ GIT v1.5.6.3 Release Notes
44
Fixes since v1.5.6.2
55
--------------------
66

7+
* Setting core.sharerepository to traditional "true" value was supposed to make
8+
the repository group writable but should not affect permission for others.
9+
However, since 1.5.6, it was broken to drop permission for others when umask is
10+
022, making the repository unreadable by others.
11+
712
* Setting GIT_TRACE will report spawning of external process via run_command().
813

14+
* Using an object with very deep delta chain pinned memory needed for extracting
15+
intermediate base objects unnecessarily long, leading to excess memory usage.
16+
917
* Bash completion script did not notice '--' marker on the command
1018
line and tried the relatively slow "ref completion" even when
1119
completing arguments after one.
@@ -14,6 +22,12 @@ Fixes since v1.5.6.2
1422
tree file for it confused "racy-git avoidance" logic into thinking
1523
that the path is now unchanged.
1624

25+
* The section that describes attributes related to git-archive were placed
26+
in a wrong place in the gitattributes(5) manual page.
27+
28+
* "git am" was not helpful to the users when it detected that the committer
29+
information is not set up properly yet.
30+
1731
* "git clone" had a leftover debugging fprintf().
1832

1933
* "git clone -q" was not quiet enough as it used to and gave object count
@@ -23,8 +37,10 @@ Fixes since v1.5.6.2
2337
good thing if the remote side is well packed but otherwise not,
2438
especially for a project that is not really big.
2539

26-
* The section that describes attributes related to git-archive were placed
27-
in a wrong place in the gitattributes(5) manual page.
40+
* "git daemon" used to call syslog() from a signal handler, which
41+
could raise signals of its own but generally is not reentrant. This
42+
was fixed by restructuring the code to report syslog() after the handler
43+
returns.
2844

2945
* When "git push" tries to remove a remote ref, and corresponding
3046
tracking ref is missing, we used to report error (i.e. failure to
@@ -34,9 +50,3 @@ Fixes since v1.5.6.2
3450
MIME multipart mail correctly.
3551

3652
Contains other various documentation fixes.
37-
38-
--
39-
exec >/var/tmp/1
40-
O=v1.5.6.2-23-ge965647
41-
echo O=$(git describe maint)
42-
git shortlog --no-merges $O..maint

Documentation/git-mailinfo.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ git-mailinfo - Extracts patch and authorship from a single e-mail message
88

99
SYNOPSIS
1010
--------
11-
'git mailinfo' [-k] [-u | --encoding=<encoding>] <msg> <patch>
11+
'git mailinfo' [-k] [-u | --encoding=<encoding> | -n] <msg> <patch>
1212

1313

1414
DESCRIPTION
@@ -46,6 +46,9 @@ conversion, even with this flag.
4646
from what is specified by i18n.commitencoding, this flag
4747
can be used to override it.
4848

49+
-n::
50+
Disable all charset re-coding of the metadata.
51+
4952
<msg>::
5053
The commit log message extracted from e-mail, usually
5154
except the title line which comes from e-mail Subject.

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.5.6.2/git.html[documentation for release 1.5.6.2]
46+
* link:v1.5.6.3/git.html[documentation for release 1.5.6.3]
4747

4848
* release notes for
49+
link:RelNotes-1.5.6.3.txt[1.5.6.3].
4950
link:RelNotes-1.5.6.2.txt[1.5.6.2].
5051
link:RelNotes-1.5.6.1.txt[1.5.6.1].
5152
link:RelNotes-1.5.6.txt[1.5.6].

builtin-mailinfo.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -960,7 +960,7 @@ static int mailinfo(FILE *in, FILE *out, int ks, const char *encoding,
960960
}
961961

962962
static const char mailinfo_usage[] =
963-
"git-mailinfo [-k] [-u | --encoding=<encoding>] msg patch <mail >info";
963+
"git-mailinfo [-k] [-u | --encoding=<encoding> | -n] msg patch <mail >info";
964964

965965
int cmd_mailinfo(int argc, const char **argv, const char *prefix)
966966
{

git-am.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ set_reflog_action am
3030
require_work_tree
3131
cd_to_toplevel
3232

33-
git var GIT_COMMITTER_IDENT >/dev/null || exit
33+
git var GIT_COMMITTER_IDENT >/dev/null ||
34+
die "You need to set your committer info first"
3435

3536
stop_here () {
3637
echo "$1" >"$dotest/next"

path.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ int adjust_shared_perm(const char *path)
272272
int tweak = shared_repository;
273273
if (!(mode & S_IWUSR))
274274
tweak &= ~0222;
275-
mode = (mode & ~0777) | tweak;
275+
mode |= tweak;
276276
} else {
277277
/* Preserve old PERM_UMASK behaviour */
278278
if (mode & S_IWUSR)

t/t0004-unwritable.sh

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ test_expect_success setup '
88
99
>file &&
1010
git add file &&
11+
test_tick &&
1112
git commit -m initial &&
1213
echo >file &&
1314
git add file
@@ -17,36 +18,36 @@ test_expect_success setup '
1718
test_expect_success 'write-tree should notice unwritable repository' '
1819
1920
(
20-
chmod a-w .git/objects
21+
chmod a-w .git/objects .git/objects/?? &&
2122
test_must_fail git write-tree
2223
)
2324
status=$?
24-
chmod 775 .git/objects
25+
chmod 775 .git/objects .git/objects/??
2526
(exit $status)
2627
2728
'
2829

2930
test_expect_success 'commit should notice unwritable repository' '
3031
3132
(
32-
chmod a-w .git/objects
33+
chmod a-w .git/objects .git/objects/?? &&
3334
test_must_fail git commit -m second
3435
)
3536
status=$?
36-
chmod 775 .git/objects
37+
chmod 775 .git/objects .git/objects/??
3738
(exit $status)
3839
3940
'
4041

4142
test_expect_success 'update-index should notice unwritable repository' '
4243
4344
(
44-
echo a >file &&
45-
chmod a-w .git/objects
45+
echo 6O >file &&
46+
chmod a-w .git/objects .git/objects/?? &&
4647
test_must_fail git update-index file
4748
)
4849
status=$?
49-
chmod 775 .git/objects
50+
chmod 775 .git/objects .git/objects/??
5051
(exit $status)
5152
5253
'
@@ -55,11 +56,11 @@ test_expect_success 'add should notice unwritable repository' '
5556
5657
(
5758
echo b >file &&
58-
chmod a-w .git/objects
59+
chmod a-w .git/objects .git/objects/?? &&
5960
test_must_fail git add file
6061
)
6162
status=$?
62-
chmod 775 .git/objects
63+
chmod 775 .git/objects .git/objects/??
6364
(exit $status)
6465
6566
'

t/t1301-shared-repo.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,29 @@ test_expect_success 'shared = 0400 (faulty permission u-w)' '
1717
test $ret != "0"
1818
'
1919

20+
for u in 002 022
21+
do
22+
test_expect_success "shared=1 does not clear bits preset by umask $u" '
23+
mkdir sub && (
24+
cd sub &&
25+
umask $u &&
26+
git init --shared=1 &&
27+
test 1 = "$(git config core.sharedrepository)"
28+
) &&
29+
actual=$(ls -l sub/.git/HEAD)
30+
case "$actual" in
31+
-rw-rw-r--*)
32+
: happy
33+
;;
34+
*)
35+
echo Oops, .git/HEAD is not 0664 but $actual
36+
false
37+
;;
38+
esac
39+
'
40+
rm -rf sub
41+
done
42+
2043
test_expect_success 'shared=all' '
2144
mkdir sub &&
2245
cd sub &&

0 commit comments

Comments
 (0)