Skip to content

Commit 374ece7

Browse files
committed
Merge pull request #3349 from vdye/feature/ci-subtree-tests
Add `contrib/subtree` test execution to CI builds
2 parents 6d7b30a + 8968562 commit 374ece7

11 files changed

+19
-34
lines changed

Documentation/RelNotes/2.33.0.txt

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,6 @@
11
Git 2.33 Release Notes
22
======================
33

4-
Backward compatibility notes
5-
----------------------------
6-
7-
* The "-m" option in "git log -m" that does not specify which format,
8-
if any, of diff is desired did not have any visible effect; it now
9-
implies some form of diff (by default "--patch") is produced.
10-
11-
You can disable the diff output with "git log -m --no-patch", but
12-
then there probably isn't much point in passing "-m" in the first
13-
place ;-).
14-
15-
164
Updates since Git 2.32
175
----------------------
186

Documentation/diff-options.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,10 @@ ifdef::git-log[]
4949
--diff-merges=m:::
5050
-m:::
5151
This option makes diff output for merge commits to be shown in
52-
the default format. The default format could be changed using
52+
the default format. `-m` will produce the output only if `-p`
53+
is given as well. The default format could be changed using
5354
`log.diffMerges` configuration parameter, which default value
54-
is `separate`. `-m` implies `-p`.
55+
is `separate`.
5556
+
5657
--diff-merges=first-parent:::
5758
--diff-merges=1:::
@@ -61,8 +62,7 @@ ifdef::git-log[]
6162
--diff-merges=separate:::
6263
This makes merge commits show the full diff with respect to
6364
each of the parents. Separate log entry and diff is generated
64-
for each parent. This is the format that `-m` produced
65-
historically.
65+
for each parent.
6666
+
6767
--diff-merges=combined:::
6868
--diff-merges=c:::

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=v2.33.0-rc1
4+
DEF_VER=v2.33.0-rc2
55

66
LF='
77
'

ci/run-build-and-tests.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,21 @@ linux-gcc)
2727
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
2828
export GIT_TEST_WRITE_REV_INDEX=1
2929
export GIT_TEST_CHECKOUT_WORKERS=2
30-
make test
30+
make test && make -C contrib/subtree test || exit 1
3131
;;
3232
linux-clang)
3333
export GIT_TEST_DEFAULT_HASH=sha1
3434
make test
3535
export GIT_TEST_DEFAULT_HASH=sha256
36-
make test
36+
make test && make -C contrib/subtree test || exit 1
3737
;;
3838
linux-gcc-4.8)
3939
# Don't run the tests; we only care about whether Git can be
4040
# built with GCC 4.8, as it errors out on some undesired (C99)
4141
# constructs that newer compilers seem to quietly accept.
4242
;;
4343
*)
44-
make test
44+
make test && make -C contrib/subtree test || exit 1
4545
;;
4646
esac
4747

ci/run-test-slice.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,7 @@ make --quiet -C t T="$(cd t &&
1414
./helper/test-tool path-utils slice-tests "$1" "$2" t[0-9]*.sh |
1515
tr '\n' ' ')"
1616

17+
# Run the git subtree tests only if main tests succeeded
18+
test 0 != "$1" || make -C contrib/subtree test
19+
1720
check_unignored_build_artifacts

contrib/subtree/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ $(GIT_SUBTREE_TEST): $(GIT_SUBTREE)
9494
cp $< $@
9595

9696
test: $(GIT_SUBTREE_TEST)
97-
$(MAKE) -C t/ test
97+
$(MAKE) -C t/ all
9898

9999
clean:
100100
$(RM) $(GIT_SUBTREE)

diff-merges.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ int diff_merges_parse_opts(struct rev_info *revs, const char **argv)
107107

108108
if (!strcmp(arg, "-m")) {
109109
set_to_default(revs);
110-
revs->merges_imply_patch = 1;
111110
} else if (!strcmp(arg, "-c")) {
112111
set_combined(revs);
113112
revs->merges_imply_patch = 1;

object-file.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2474,7 +2474,7 @@ struct oidtree *odb_loose_cache(struct object_directory *odb,
24742474
struct strbuf buf = STRBUF_INIT;
24752475
size_t word_bits = bitsizeof(odb->loose_objects_subdir_seen[0]);
24762476
size_t word_index = subdir_nr / word_bits;
2477-
size_t mask = 1 << (subdir_nr % word_bits);
2477+
size_t mask = 1u << (subdir_nr % word_bits);
24782478
uint32_t *bitmap;
24792479

24802480
if (subdir_nr < 0 ||

object-store.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ struct object_directory {
3434
};
3535

3636
KHASH_INIT(odb_path_map, const char * /* key: odb_path */,
37-
struct object_directory *, 1, fspathhash, fspatheq);
37+
struct object_directory *, 1, fspathhash, fspatheq)
3838

3939
void prepare_alt_odb(struct repository *r);
4040
char *compute_alternate_path(const char *path, struct strbuf *err);

oidtree.c

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@
66
#include "alloc.h"
77
#include "hash.h"
88

9-
struct oidtree_node {
10-
/* n.k[] is used to store "struct object_id" */
11-
struct cb_node n;
12-
};
13-
149
struct oidtree_iter_data {
1510
oidtree_iter fn;
1611
void *arg;
@@ -35,21 +30,21 @@ void oidtree_clear(struct oidtree *ot)
3530

3631
void oidtree_insert(struct oidtree *ot, const struct object_id *oid)
3732
{
38-
struct oidtree_node *on;
33+
struct cb_node *on;
3934

4035
if (!oid->algo)
4136
BUG("oidtree_insert requires oid->algo");
4237

4338
on = mem_pool_alloc(&ot->mem_pool, sizeof(*on) + sizeof(*oid));
44-
oidcpy_with_padding((struct object_id *)on->n.k, oid);
39+
oidcpy_with_padding((struct object_id *)on->k, oid);
4540

4641
/*
4742
* n.b. Current callers won't get us duplicates, here. If a
4843
* future caller causes duplicates, there'll be a a small leak
4944
* that won't be freed until oidtree_clear. Currently it's not
5045
* worth maintaining a free list
5146
*/
52-
cb_insert(&ot->tree, &on->n, sizeof(*oid));
47+
cb_insert(&ot->tree, on, sizeof(*oid));
5348
}
5449

5550

t/t4013-diff-various.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -455,8 +455,8 @@ diff-tree --stat --compact-summary initial mode
455455
diff-tree -R --stat --compact-summary initial mode
456456
EOF
457457

458-
test_expect_success 'log -m matches log -m -p' '
459-
git log -m -p master >result &&
458+
test_expect_success 'log -m matches pure log' '
459+
git log master >result &&
460460
process_diffs result >expected &&
461461
git log -m >result &&
462462
process_diffs result >actual &&

0 commit comments

Comments
 (0)