summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Documentation/RelNotes/2.51.0.adoc25
-rwxr-xr-xGIT-VERSION-GEN2
-rw-r--r--archive-zip.c20
-rw-r--r--builtin/remote.c11
-rw-r--r--builtin/revert.c2
-rw-r--r--t/unit-tests/clar/clar.c2
6 files changed, 46 insertions, 16 deletions
diff --git a/Documentation/RelNotes/2.51.0.adoc b/Documentation/RelNotes/2.51.0.adoc
index a89d459d2e..a73ea3e808 100644
--- a/Documentation/RelNotes/2.51.0.adoc
+++ b/Documentation/RelNotes/2.51.0.adoc
@@ -67,6 +67,11 @@ UI, Workflows & Features
* "git switch" and "git restore" are declared to be no longer
experimental.
+ * "git -c alias.foo=bar foo -h baz" reported "'foo' is aliased to
+ 'bar'" and then went on to run "git foo -h baz", which was
+ unexpected. Tighten the rule so that alias expansion is reported
+ only when "-h" is the sole option.
+
Performance, Internal Implementation, Development Support etc.
--------------------------------------------------------------
@@ -92,8 +97,8 @@ Performance, Internal Implementation, Development Support etc.
* "git push" and "git fetch" are taught to update refs in batches to
gain performance.
- * Some code paths in the "git prune" used to ignore passed in
- repository object and used the_repository singleton instance
+ * Some code paths in "git prune" used to ignore the passed-in
+ repository object and used the `the_repository` singleton instance
instead, which has been corrected.
* Update ".clang-format" and ".editorconfig" to match our style guide
@@ -134,7 +139,10 @@ Performance, Internal Implementation, Development Support etc.
* Redefine where the multi-pack-index sits in the object subsystem,
which recently was restructured to allow multiple backends that
support a single object source that belongs to one repository. A
- midx does span mulitple "object sources".
+ MIDX does span multiple "object sources".
+
+ * Reduce implicit assumption and dependence on the_repository in the
+ object-file subsystem.
Fixes since v2.50
@@ -284,6 +292,15 @@ including security updates, are included in this release.
and also they learn to honor the -U<n> command-line option.
(merge 2b3ae04011 lm/add-p-context later to maint).
+ * The case where a new submodule takes a path where there used to be a
+ completely different subproject is now dealt with a bit better than
+ before.
+ (merge 5ed8c5b465 kj/renamed-submodule later to maint).
+
+ * The deflate codepath in "git archive --format=zip" had a
+ longstanding bug coming from misuse of zlib API, which has been
+ corrected.
+
* Other code cleanup, docfix, build fix, etc.
(merge b257adb571 lo/my-first-ow-doc-update later to maint).
(merge 8b34b6a220 ly/sequencer-update-squash-is-fixup-only later to maint).
@@ -320,3 +337,5 @@ including security updates, are included in this release.
(merge 3bdd897413 ms/meson-with-ancient-git-wo-ls-files-dedup later to maint).
(merge cca758d324 kh/doc-fast-import-historical later to maint).
(merge 9b0781196a jc/test-hashmap-is-still-here later to maint).
+ (merge 1bad05bacc jk/revert-squelch-compiler-warning later to maint).
+ (merge 3a7e783d9c dl/squelch-maybe-uninitialized later to maint).
diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN
index 63463c8773..e7e91190ae 100755
--- a/GIT-VERSION-GEN
+++ b/GIT-VERSION-GEN
@@ -1,6 +1,6 @@
#!/bin/sh
-DEF_VER=v2.50.GIT
+DEF_VER=v2.51.0-rc1
LF='
'
diff --git a/archive-zip.c b/archive-zip.c
index dbd90d9c3d..bea5bdd43d 100644
--- a/archive-zip.c
+++ b/archive-zip.c
@@ -492,14 +492,22 @@ static int write_zip_entry(struct archiver_args *args,
zstream.next_in = buf;
zstream.avail_in = 0;
- result = git_deflate(&zstream, Z_FINISH);
- if (result != Z_STREAM_END)
- die("deflate error (%d)", result);
+
+ do {
+ result = git_deflate(&zstream, Z_FINISH);
+ if (result != Z_OK && result != Z_STREAM_END)
+ die("deflate error (%d)", result);
+
+ out_len = zstream.next_out - compressed;
+ if (out_len > 0) {
+ write_or_die(1, compressed, out_len);
+ compressed_size += out_len;
+ zstream.next_out = compressed;
+ zstream.avail_out = sizeof(compressed);
+ }
+ } while (result != Z_STREAM_END);
git_deflate_end(&zstream);
- out_len = zstream.next_out - compressed;
- write_or_die(1, compressed, out_len);
- compressed_size += out_len;
zip_offset += compressed_size;
write_zip_data_desc(size, compressed_size, crc);
diff --git a/builtin/remote.c b/builtin/remote.c
index 43a122740a..8961ae6a89 100644
--- a/builtin/remote.c
+++ b/builtin/remote.c
@@ -1474,10 +1474,13 @@ static int set_head(int argc, const char **argv, const char *prefix,
};
argc = parse_options(argc, argv, prefix, options,
builtin_remote_sethead_usage, 0);
- if (argc) {
- strbuf_addf(&b_head, "refs/remotes/%s/HEAD", argv[0]);
- remote = remote_get(argv[0]);
- }
+
+ /* All modes require at least a remote name. */
+ if (!argc)
+ usage_with_options(builtin_remote_sethead_usage, options);
+
+ strbuf_addf(&b_head, "refs/remotes/%s/HEAD", argv[0]);
+ remote = remote_get(argv[0]);
if (!opt_a && !opt_d && argc == 2) {
head_name = xstrdup(argv[1]);
diff --git a/builtin/revert.c b/builtin/revert.c
index e07c2217fe..c3f92b585d 100644
--- a/builtin/revert.c
+++ b/builtin/revert.c
@@ -111,7 +111,7 @@ static int run_sequencer(int argc, const char **argv, const char *prefix,
const char * const * usage_str = revert_or_cherry_pick_usage(opts);
const char *me = action_name(opts);
const char *cleanup_arg = NULL;
- const char sentinel_value;
+ const char sentinel_value = 0; /* value not important */
const char *strategy = &sentinel_value;
const char *gpg_sign = &sentinel_value;
enum empty_action empty_opt = EMPTY_COMMIT_UNSPECIFIED;
diff --git a/t/unit-tests/clar/clar.c b/t/unit-tests/clar/clar.c
index d54e455367..03a3aa8e87 100644
--- a/t/unit-tests/clar/clar.c
+++ b/t/unit-tests/clar/clar.c
@@ -350,7 +350,7 @@ static void
clar_run_suite(const struct clar_suite *suite, const char *filter)
{
const struct clar_func *test = suite->tests;
- size_t i, matchlen;
+ size_t i, matchlen = 0;
struct clar_report *report;
int exact = 0;