* RE: libification: how to avoid symbol collisions?
From: rsbecker @ 2024-02-09 13:31 UTC (permalink / raw)
To: 'Kyle Lippincott', git
In-Reply-To: <CAO_smVji5aGjx1V-EGbumRRpOuGY0SkXZUn9g4LxKmMO3aw=Sg@mail.gmail.com>
On Thursday, February 8, 2024 9:30 PM, Kyle Lippincott wrote:
>While thinking about libification, I was wondering what we can/need to do about
>symbols (specifically functions, since our libraries will likely have few to no extern
>variables) that need to escape their translation unit (.c file) but that we don't want
>to risk colliding with symbols from our "host" project.
>
>For any header that we're offering up as an API boundary we can have prefixed
>names, but there are symbols from git-compat-util.h with simple and likely
>common names like `die`, `usage`, error`, etc. I'm far from an expert on linkers, but
>I'm under the impression that even though we'll only be #including git-compat-
>util.h in our own .c files (so the compiler for the host project wouldn't see them),
>the produced static library will still be "providing" these symbols unless we mark
>them as `static` (and if we mark them as `static`, they can't be used outside of their
>translation unit). This means that if the host project has a version of `die` (or links
>against yet another library that does), we run into what C++ calls a One Definition
>Rule (ODR)
>violation: we have two providers of the symbol `die` with different
>implementations, and the behavior is undefined (no error needs to be generated as
>far as I know).
>
>With dynamic libraries I believe that we have more control over what gets exposed,
>but I don't know of functionality for this when linking statically. I'm assuming there
>is no such functionality, as projects like openssl (ty Randall for mentioning this)
>appear to have a convention of prefixing the symbols they put in their "public" API
>(i.e. in non-internal header files) with things like OSSL_, and of prefixing the symbols
>they put in their "private" APIs that can't be marked as `static` with `ossl_`. I'd love
>to be wrong about this. :)
>
>If I'm right that this is an issue, does this imply that we'd need to rename every non-
>static function in the git codebase that's part of a library to have a `git_` prefix, even
>if it won't be used outside of the git project's own .c files? Is there a solution that
>doesn't involve making it so that we have to type `git_` a billion times a day that's
>also maintainable? We could try to guess at how likely a name collision would be
>and only do this for ones where it's obviously going to collide, but if we get it wrong,
>I'm concerned that we'll run into subtle ODR violations that *at best* erode
>confidence in our library, and can actually cause outages, data corruption, and
>security/privacy issues.
I think we only need to do this for functions that are in the libification code-base for non-static symbols (and any data elements that may end up in a DLL some day). The bulk of the non-libified code base would only need to adapt to new symbol names if those symbols are specifically moved. die(), error(), are probably going to be impacted, but they can be aliased with #defines internally to git to git_die() or git_error(), for example.
--Randall
^ permalink raw reply
* Re: Supporting --no-edit for git rebase --continue
From: Orgad Shaneh @ 2024-02-09 13:35 UTC (permalink / raw)
To: brian m. carlson, Orgad Shaneh, git
In-Reply-To: <ZcWCDEnmv97orQyY@tapette.crustytoothpaste.net>
On Fri, Feb 9, 2024 at 3:38 AM brian m. carlson
<sandals@crustytoothpaste.net> wrote:
>
> On 2024-02-07 at 20:46:16, Orgad Shaneh wrote:
> > Hi,
> >
> > Is it possible to add --no-edit for git rebase --continue, similar to
> > the functionality of this flag for git cherry-pick --continue and
> > similar commands?
>
> I haven't checked whether this is actually possible, but I imagine it is
> with some work. I think it would be a valuable feature to add, but I
> don't think anyone's planning on working on it. Would you be willing to
> send a patch? Even if many people think it's a good idea, we're all
> busy, and thus it'll only be implemented if someone is willing to pick
> it up.
Thank you. I'll try to prepare a patch.
> In the meantime, you could try setting `GIT_EDITOR=:` in your
> environment (for example, using an alias) like so:
>
> [alias]
> rncontinue = "!f() { GIT_EDITOR=: git rebase --continue; };f"
>
> and that can serve as a workaround.
Nice, thanks!
- Orgad
^ permalink raw reply
* Race condition in git-bundle(1) create when ref is updated while running
From: Toon Claes @ 2024-02-09 13:40 UTC (permalink / raw)
To: git
Hi y'all,
I discovered a bug in git-bundle(1) create. There is a race condition
happening when a ref gets updated while the bundle creation process is
running.
To reproduce, I've been running git-bundle(1) with
`create my.bndl --all --ignore-missing` in a debugger. I've set a
breakpoint at bundle.c:515[1] where setup_revisions() is called. After
stepping over this line I see in the debugger `revs.pending` is
populated.
(gdb) p *revs.pending.objects
$6 = {item = 0x7a2fb0, name = 0x78d7e0 "refs/heads/master", path = 0x0, mode = 12288}
(gdb) p *revs.pending.objects.item
$7 = {parsed = 1, type = 1, flags = 0, oid = {hash = "R\026\370\365\304\b\236\302\234\344\232\372\024t4\302>\017\001c\000\000\000\000sS\344\367\377\177\000", algo = 1}}
The hash value is the binary representation of
`5216f8f5c4089ec29ce49afa147434c23e0f0163`, the current HEAD of
`master`. At this point I've updated `master` in another terminal
window:
git commit --allow-empty -m"dummy"
Then in the debugger I continue the process to create the bundle. The
resulting bundle seems to be missing `refs/heads/master`.
I'm surprised this ref is completely omitted from the bundle. Even
though the ref is outdated, I would expect git-bundle(1) to just take
the old commit ID.
[1]: https://github.com/git/git/blob/5216f8f5c4089ec29ce49afa147434c23e0f0163/bundle.c#L515
--
Toon
^ permalink raw reply
* Re: [PATCH] prune: mark rebase autostash and orig-head as reachable
From: Phillip Wood @ 2024-02-09 14:15 UTC (permalink / raw)
To: Junio C Hamano, Phillip Wood via GitGitGadget
Cc: git, Orgad Shaneh, Phillip Wood
In-Reply-To: <xmqqmssan841.fsf@gitster.g>
Hi Junio
On 08/02/2024 18:06, Junio C Hamano wrote:
> "Phillip Wood via GitGitGadget" <gitgitgadget@gmail.com> writes:
>
>> Rebase records the oid of HEAD before rebasing and the commit created by
>> "--autostash" in files in the rebase state directory. This means that
>> the autostash commit is never reachable from any ref or reflog and when
>> rebasing a detached HEAD the original HEAD can become unreachable if the
>> user expires HEAD's the reflog while the rebase is running. Fix this by
>> reading the relevant files when marking reachable commits.
>
> I do not like this kind of special casing in general, but because
> these are our tools' droppings, I am OK to grandfather them in, as
> long as we promise ourselves that we will not add more of these
> ad-hoc "text files" that record object names, loss of which affects
> correctness. They should, like "git bisect", be using proper
> references to protect these objects instead, of course.
We should definitely do that for future commands
> I agree with you that we might want to add pseudorefs as a starting
> points of reachability traversal, but I suspect it would add
> unnecessary complexity we would rather not want to deal with.
>
> For example, not GC'ing what is pointed at by lines in FETCH_HEAD is
> OK. Excluding those objects that are only reachable from an object
> mentioned by a pseudoref, when a new "git fetch" is negotiating with
> a remote what objects need to be sent here, might be disastrous, as
> the pseudoref that said "this object is here and you can safely
> consider everything reachable from it is" will be short-lived and
> can go away anytime, and an auto-gc kicking in at a wrong time ...
I can see that including pseudorefs when "git fetch" is negotiating
could be problematic but does it use mark_reachable_objects()? Maybe I'm
missing something as I've only done a quick grep but it only seems to be
called from builtin/prune.c and builtin/repack.c and prior to 4421474e06
(Move traversal of reachable objects into a separate library.,
2007-01-06) it seems to have been a static method in builtin-prune.c
Best Wishes
Phillip
^ permalink raw reply
* git column fails (or crashes) if padding is negative
From: Tiago Pascoal @ 2024-02-09 14:21 UTC (permalink / raw)
To: git@vger.kernel.org
Thank you for filling out a Git bug report!
Please answer the following questions to help us understand your issue.
What did you do before the bug happened? (Steps to reproduce your issue)
Call git column with a negative padding value, e.g. `git column --padding -1`
If the number if bigger than -3, the command will fail with the following error message:
Floating point exception
If the number is -5 or greater, the command will fail with the following error message:
fatal: Out of memory, malloc failed (tried to allocate 18446744073709551615 bytes)
eg:
$ seq 1 100 | git column --mode=column --padding=-5
fatal: Out of memory, malloc failed (tried to allocate 18446744073709551615 bytes)
What did you expect to happen? (Expected behavior)
An error message indicating that the padding value is invalid and not a crash.
What happened instead? (Actual behavior)
Failed command or even an OOM error depending on the padding value.
What's different between what you expected and what actually happened?
Anything else you want to add:
[System Info]
git version:
git version 2.34.1
cpu: x86_64
no commit associated with this build
sizeof-long: 8
sizeof-size_t: 8
shell-path: /bin/sh
uname: Linux 5.15.133.1-microsoft-standard-WSL2 #1 SMP Thu Oct 5 21:02:42 UTC 2023 x86_64
compiler info: gnuc: 11.4
libc info: glibc: 2.35
$SHELL (typically, interactive shell): /bin/bash
[Enabled Hooks]
not run from a git repository - no hooks to show
^ permalink raw reply
* Re: [PATCH v4 2/3] add-patch: classify '@' as a synonym for 'HEAD'
From: Ghanshyam Thakkar @ 2024-02-09 15:57 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git, phillip.wood123, ps
In-Reply-To: <xmqqil31dqx6.fsf@gitster.g>
On Wed Feb 7, 2024 at 6:35 AM IST, Junio C Hamano wrote:
> Ghanshyam Thakkar <shyamthakkar001@gmail.com> writes:
> > There is also logic in builtin/checkout.c to
> > convert all command line input rev to the raw object name for underlying
> > machinery (e.g., diff-index) that does not recognize the <a>...<b>
> > notation, but we'd need to leave 'HEAD' intact. Now we need to teach
> > that '@' is a synonym to 'HEAD' to that code and leave '@' intact, too.
>
> Makes me wonder why we cannot use the same "normalize @ to HEAD
> upfront" approach here, though?
>
> It would involve translating "@" given to new_branch_info->name to
> "HEAD" early, possibly in setup_new_branch_info_and_source_tree(),
> and that probably will fix the other strcmp() with "HEAD" that
> appears in builtin/checkout.c:update_refs_for_switch() as well, no?
I was wondering about "git checkout -b @". If we were to make the change
in setup_new_branch_info_and_source_tree(), then '@' would not be
treated as 'HEAD' in the above mentioned case and there would also be
some disparity on error messages showing '@' when running the above
command, and after hitting setup_new_branch_info_and_source_tree() would
show 'HEAD'. However, making the change in builtin/checkout.c:checkout_main()
would disallow creating a '@' branch alltogether. Hence, I would like some
feedback on whether we should change the behavior of 'git checkout -b @'
or not.
^ permalink raw reply
* Re: [PATCH 7/7] reftable/reader: add comments to `table_iter_next()`
From: John Cai @ 2024-02-09 16:01 UTC (permalink / raw)
To: Patrick Steinhardt; +Cc: git
In-Reply-To: <2f1f1dd95e1cc360bde3547bd18e227a9c326e13.1706782841.git.ps@pks.im>
Hi Patrick,
On 1 Feb 2024, at 5:25, Patrick Steinhardt wrote:
> While working on the optimizations in the preceding patches I stumbled
> upon `table_iter_next()` multiple times. It is quite easy to miss the
> fact that we don't call `table_iter_next_in_block()` twice, but that the
> second call is in fact `table_iter_next_block()`.
>
> Add comments to explain what exactly is going on here to make things
> more obvious. While at it, touch up the code to conform to our code
> style better.
>
> Signed-off-by: Patrick Steinhardt <ps@pks.im>
> ---
> reftable/reader.c | 26 +++++++++++++++++---------
> 1 file changed, 17 insertions(+), 9 deletions(-)
>
> diff --git a/reftable/reader.c b/reftable/reader.c
> index 64dc366fb1..add7d57f0b 100644
> --- a/reftable/reader.c
> +++ b/reftable/reader.c
> @@ -357,24 +357,32 @@ static int table_iter_next(struct table_iter *ti, struct reftable_record *rec)
>
> while (1) {
> struct table_iter next = TABLE_ITER_INIT;
> - int err = 0;
> - if (ti->is_finished) {
> + int err;
> +
> + if (ti->is_finished)
> return 1;
> - }
>
> + /*
> + * Check whether the current block still has more records. If
> + * so, return it. If the iterator returns positive then the
> + * current block has been exhausted.
> + */
> err = table_iter_next_in_block(ti, rec);
> - if (err <= 0) {
> + if (err <= 0)
> return err;
> - }
>
> + /*
> + * Otherwise, we need to continue to the next block in the
> + * table and retry. If there are no more blocks then the
> + * iterator is drained.
> + */
> err = table_iter_next_block(&next, ti);
> - if (err != 0) {
> - ti->is_finished = 1;
> - }
> table_iter_block_done(ti);
> - if (err != 0) {
> + if (err) {
what's the reason for moving the if statement that handles err down after
table_iter_block_done?
> + ti->is_finished = 1;
> return err;
> }
> +
> table_iter_copy_from(ti, &next);
> block_iter_close(&next.bi);
> }
> --
> 2.43.GIT
Thanks
John
^ permalink raw reply
* Interactive rebase: using "pick" for merge commits
From: Stefan Haller @ 2024-02-09 15:52 UTC (permalink / raw)
To: git
When I do an interactive rebase, and manually enter a "pick" with the
commit hash of a merge commit, I get the following confusing error message:
error: commit fa1afe1 is a merge but no -m option was given.
hint: Could not execute the todo command
hint:
hint: pick fa1afe1 some subject
hint:
hint: It has been rescheduled; [rest of message snipped]
This error message makes it sound like I could somehow add "-m1" after
the "pick" to make it work (which is actually what I would like to be
able to do). I had to go read the source code to find out that that's
not the case, and the error message only comes from the fact that the
code is shared with the cherry-pick and revert commands, which do have
the -m option.
Is it crazy to want pick to work like this? Should it be supported?
-Stefan
^ permalink raw reply
* Re: Supporting --no-edit for git rebase --continue
From: Phillip Wood @ 2024-02-09 16:16 UTC (permalink / raw)
To: Orgad Shaneh, git; +Cc: brian m . carlson
In-Reply-To: <CAGHpTB+mCxvzJ4LDpQrMgHmzigUzcAnRcwMewV0oYKM2HwbNXw@mail.gmail.com>
Hi Orgad
On 07/02/2024 20:46, Orgad Shaneh wrote:
> Hi,
>
> Is it possible to add --no-edit for git rebase --continue, similar to
> the functionality of this flag for git cherry-pick --continue and
> similar commands?
>
> This should continue the rebase without activating the commit message
> editor, and just keep the existing message.
I think being able to say "git rebase --continue --no-edit" to stop
rebase prompting for a commit message when resolving a conflict would
be useful but it would need to be careful that it did not suppress the
editor for "reword", "squash", or "fixup" commands. You can use an
alias that only runs the editor if HEAD has changed since the rebase
was continued to do this
git config alias.rbc-no-edit '!
no_edit_head=$(git show-ref -s --verify HEAD) &&
real_editor="$(git var GIT_EDITOR)" &&
GIT_EDITOR="test \"\$(git show-ref -s --verify HEAD)\" = \"$no_edit_head\" || \
$real_editor" git rebase --continue'
Best Wishes
Phillip
^ permalink raw reply
* [PATCH v2] prune: mark rebase autostash and orig-head as reachable
From: Phillip Wood via GitGitGadget @ 2024-02-09 16:19 UTC (permalink / raw)
To: git; +Cc: Orgad Shaneh, Eric Sunshine, Phillip Wood, Phillip Wood
In-Reply-To: <pull.1656.git.1707411636382.gitgitgadget@gmail.com>
From: Phillip Wood <phillip.wood@dunelm.org.uk>
Rebase records the oid of HEAD before rebasing and the commit created by
"--autostash" in files in the rebase state directory. This means that
the autostash commit is never reachable from any ref or reflog and when
rebasing a detached HEAD the original HEAD can become unreachable if the
user expires HEAD's the reflog while the rebase is running. Fix this by
reading the relevant files when marking reachable commits.
Note that it is possible for the commit recorded in
.git/rebase-merge/amend to be unreachable but pruning that object does
not affect the operation of "git rebase --continue" as we're only
interested in the object id, not in the object itself.
Reported-by: Orgad Shaneh <orgads@gmail.com>
Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
---
prune: mark rebase autostash and orig-head as reachable
Thanks for the comments on v1. I've fixed the memory leak and changed
the return types as suggested by Eric.
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1656%2Fphillipwood%2Fprune-protect-rebase-v2
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1656/phillipwood/prune-protect-rebase-v2
Pull-Request: https://github.com/gitgitgadget/git/pull/1656
Range-diff vs v1:
1: ce75996f1a3 ! 1: 7256197a26f prune: mark rebase autostash and orig-head as reachable
@@ reachable.c: static void update_progress(struct connectivity_progress *cp)
display_progress(cp->progress, cp->count);
}
-+static int add_one_file(const char *path, struct rev_info *revs)
++static void add_one_file(const char *path, struct rev_info *revs)
+{
+ struct strbuf buf = STRBUF_INIT;
+ struct object_id oid;
@@ reachable.c: static void update_progress(struct connectivity_progress *cp)
+
+ if (!read_oneliner(&buf, path, READ_ONELINER_SKIP_IF_EMPTY)) {
+ strbuf_release(&buf);
-+ return 0;
++ return;
+ }
+ strbuf_trim(&buf);
+ if (!get_oid_hex(buf.buf, &oid)) {
+ object = parse_object_or_die(&oid, buf.buf);
+ add_pending_object(revs, object, "");
+ }
-+ return 0;
++ strbuf_release(&buf);
+}
+
-+/* Mark objects recored in rebase state files as reachable. */
-+static int add_rebase_files(struct rev_info *revs)
++/* Mark objects recorded in rebase state files as reachable. */
++static void add_rebase_files(struct rev_info *revs)
+{
+ struct strbuf buf = STRBUF_INIT;
+ size_t len;
@@ reachable.c: static void update_progress(struct connectivity_progress *cp)
+ }
+ strbuf_release(&buf);
+ free_worktrees(worktrees);
-+ return 0;
+}
+
static int add_one_ref(const char *path, const struct object_id *oid,
reachable.c | 50 +++++++++++++++++++++++++++++++++++++
t/t3407-rebase-abort.sh | 17 ++++++++++++-
t/t3420-rebase-autostash.sh | 10 ++++++++
3 files changed, 76 insertions(+), 1 deletion(-)
diff --git a/reachable.c b/reachable.c
index f29b06a5d05..3b85add243b 100644
--- a/reachable.c
+++ b/reachable.c
@@ -17,6 +17,7 @@
#include "pack-mtimes.h"
#include "config.h"
#include "run-command.h"
+#include "sequencer.h"
struct connectivity_progress {
struct progress *progress;
@@ -30,6 +31,52 @@ static void update_progress(struct connectivity_progress *cp)
display_progress(cp->progress, cp->count);
}
+static void add_one_file(const char *path, struct rev_info *revs)
+{
+ struct strbuf buf = STRBUF_INIT;
+ struct object_id oid;
+ struct object *object;
+
+ if (!read_oneliner(&buf, path, READ_ONELINER_SKIP_IF_EMPTY)) {
+ strbuf_release(&buf);
+ return;
+ }
+ strbuf_trim(&buf);
+ if (!get_oid_hex(buf.buf, &oid)) {
+ object = parse_object_or_die(&oid, buf.buf);
+ add_pending_object(revs, object, "");
+ }
+ strbuf_release(&buf);
+}
+
+/* Mark objects recorded in rebase state files as reachable. */
+static void add_rebase_files(struct rev_info *revs)
+{
+ struct strbuf buf = STRBUF_INIT;
+ size_t len;
+ const char *path[] = {
+ "rebase-apply/autostash",
+ "rebase-apply/orig-head",
+ "rebase-merge/autostash",
+ "rebase-merge/orig-head",
+ };
+ struct worktree **worktrees = get_worktrees();
+
+ for (struct worktree **wt = worktrees; *wt; wt++) {
+ strbuf_reset(&buf);
+ strbuf_addstr(&buf, get_worktree_git_dir(*wt));
+ strbuf_complete(&buf, '/');
+ len = buf.len;
+ for (size_t i = 0; i < ARRAY_SIZE(path); i++) {
+ strbuf_setlen(&buf, len);
+ strbuf_addstr(&buf, path[i]);
+ add_one_file(buf.buf, revs);
+ }
+ }
+ strbuf_release(&buf);
+ free_worktrees(worktrees);
+}
+
static int add_one_ref(const char *path, const struct object_id *oid,
int flag, void *cb_data)
{
@@ -322,6 +369,9 @@ void mark_reachable_objects(struct rev_info *revs, int mark_reflog,
head_ref(add_one_ref, revs);
other_head_refs(add_one_ref, revs);
+ /* rebase autostash and orig-head */
+ add_rebase_files(revs);
+
/* Add all reflog info */
if (mark_reflog)
add_reflogs_to_pending(revs, 0);
diff --git a/t/t3407-rebase-abort.sh b/t/t3407-rebase-abort.sh
index ebbaed147a6..9f49c4228b6 100755
--- a/t/t3407-rebase-abort.sh
+++ b/t/t3407-rebase-abort.sh
@@ -40,9 +40,24 @@ testrebase() {
test_path_is_missing "$state_dir"
'
+ test_expect_success "pre rebase$type head is marked as reachable" '
+ # Clean up the state from the previous one
+ git checkout -f --detach pre-rebase &&
+ test_tick &&
+ git commit --amend --only -m "reworded" &&
+ orig_head=$(git rev-parse HEAD) &&
+ test_must_fail git rebase$type main &&
+ # Stop ORIG_HEAD marking $state_dir/orig-head as reachable
+ git update-ref -d ORIG_HEAD &&
+ git reflog expire --expire="$GIT_COMMITTER_DATE" --all &&
+ git prune --expire=now &&
+ git rebase --abort &&
+ test_cmp_rev $orig_head HEAD
+ '
+
test_expect_success "rebase$type --abort after --skip" '
# Clean up the state from the previous one
- git reset --hard pre-rebase &&
+ git checkout -B to-rebase pre-rebase &&
test_must_fail git rebase$type main &&
test_path_is_dir "$state_dir" &&
test_must_fail git rebase --skip &&
diff --git a/t/t3420-rebase-autostash.sh b/t/t3420-rebase-autostash.sh
index 693934ee8be..1a820f14815 100755
--- a/t/t3420-rebase-autostash.sh
+++ b/t/t3420-rebase-autostash.sh
@@ -333,4 +333,14 @@ test_expect_success 'never change active branch' '
test_cmp_rev not-the-feature-branch unrelated-onto-branch
'
+test_expect_success 'autostash commit is marked as reachable' '
+ echo changed >file0 &&
+ git rebase --autostash --exec "git prune --expire=now" \
+ feature-branch^ feature-branch &&
+ # git rebase succeeds if the stash cannot be applied so we need to check
+ # the contents of file0
+ echo changed >expect &&
+ test_cmp expect file0
+'
+
test_done
base-commit: 2a540e432fe5dff3cfa9d3bf7ca56db2ad12ebb9
--
gitgitgadget
^ permalink raw reply related
* Re: Interactive rebase: using "pick" for merge commits
From: Phillip Wood @ 2024-02-09 16:24 UTC (permalink / raw)
To: Stefan Haller, git
In-Reply-To: <424f2e08-a2ad-4bb2-8a6b-136c426dc127@haller-berlin.de>
Hi Stefan
On 09/02/2024 15:52, Stefan Haller wrote:
> When I do an interactive rebase, and manually enter a "pick" with the
> commit hash of a merge commit, I get the following confusing error message:
>
> error: commit fa1afe1 is a merge but no -m option was given.
> hint: Could not execute the todo command
> hint:
> hint: pick fa1afe1 some subject
> hint:
> hint: It has been rescheduled; [rest of message snipped]
>
> This error message makes it sound like I could somehow add "-m1" after
> the "pick" to make it work (which is actually what I would like to be
> able to do). I had to go read the source code to find out that that's
> not the case, and the error message only comes from the fact that the
> code is shared with the cherry-pick and revert commands, which do have
> the -m option.
Oh, that's unfortunate - we should really reject the todo list when we
parse it at the start of the rebase if it is going to try and "pick" a
merge.
> Is it crazy to want pick to work like this? Should it be supported?
It causes problems trying to maintain the topology. In the past there
was a "--preserve-merges" option that allowed one to "pick" merges but
it broke if the user edited the todo list. The "--rebase-merges" option
was introduced with the "label", "reset" and "merge" todo list
instructions to allow the user to control the topology.
Best Wishes
Phillip
^ permalink raw reply
* Re: git column fails (or crashes) if padding is negative
From: Kristoffer Haugsbakk @ 2024-02-09 16:27 UTC (permalink / raw)
To: Tiago Pascoal; +Cc: git@vger.kernel.org
In-Reply-To: <AS8P189MB21977ACC4866D9836DA29082BC4B2@AS8P189MB2197.EURP189.PROD.OUTLOOK.COM>
Hi
I wasn’t able to reproduce quite what you got but kind of the same.
```
$ seq 1 24 | git column --mode=column --padding=-1
12345678910<binary?><numbers>
$ seq 1 24 | git column --mode=column --padding=-3
fatal: Data too large to fit into virtual memory space.
$ seq 1 24 | git column --mode=column --padding=-5
fatal: Out of memory, malloc failed (tried to allocate 18446744073709551614 bytes)
```
This is an “Internal helper command” under the “plumbing” suite. And I
get the impression that sometimes these fallthroughs are treated as
“don’t do that”. But I don’t know.
On the other hand it failing inside malloc looks weird. Why not catch
this before the malloc call is made?
[System Info]
git version:
git version 2.43.0
cpu: x86_64
no commit associated with this build
sizeof-long: 8
sizeof-size_t: 8
shell-path: /bin/sh
uname: Linux 6.5.0-17-generic #17~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue Jan 16 14:32:32 UTC 2 x86_64
compiler info: gnuc: 11.4
libc info: glibc: 2.35
$SHELL (typically, interactive shell): /bin/bash
[Enabled Hooks]
--
Kristoffer Haugsbakk
^ permalink raw reply
* Re: [PATCH] Always check the return value of `repo_read_object_file()`
From: Junio C Hamano @ 2024-02-09 16:37 UTC (permalink / raw)
To: Johannes Schindelin
Cc: Kyle Lippincott, Johannes Schindelin via GitGitGadget, git
In-Reply-To: <5fd95ae0-cd50-ddc4-5095-ee953c2640b3@gmx.de>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> It does change behavior. The previous behavior looked up the note OID,
> then tried to read it, and if it was missing just pretended that there had
> not been a note.
>
> I'm not quite sure whether we should keep that behavior, as it is unclear
> in which scenarios it would be desirable to paper over missing objects.
Yeah, an object that does not have any notes attached to is a norm
so the calling application must be prepared for it, but this
codepath is different. The notes tree says it has notes, we try to
read it and it is not there---at least we noticed an inconsistent
notes tree (and object store), and if we were to run "git fsck" at
that point, we would certainly complain about a missing blob object
(can a tree object at an intermediate level be missing and would we
notice, by the way, I wonder). It is only prudent to report it,
instead of pretending that the notes are not there.
So I think this tightening falls into the "bugfix" category.
Thanks.
^ permalink raw reply
* Re: libification: how to avoid symbol collisions?
From: Junio C Hamano @ 2024-02-09 17:09 UTC (permalink / raw)
To: Kyle Lippincott; +Cc: git
In-Reply-To: <CAO_smVji5aGjx1V-EGbumRRpOuGY0SkXZUn9g4LxKmMO3aw=Sg@mail.gmail.com>
Kyle Lippincott <spectral@google.com> writes:
> If I'm right that this is an issue, does this imply that we'd need to
> rename every non-static function in the git codebase that's part of a
> library to have a `git_` prefix, even if it won't be used outside of
> the git project's own .c files? Is there a solution that doesn't
> involve making it so that we have to type `git_` a billion times a day
> that's also maintainable? We could try to guess at how likely a name
> collision would be and only do this for ones where it's obviously
> going to collide, but if we get it wrong, I'm concerned that we'll run
> into subtle ODR violations that *at best* erode confidence in our
> library, and can actually cause outages, data corruption, and
> security/privacy issues.
If you end up with a helper function name "foo" that is defined in
our X.c and used by our Y.c but is not part of the published "git
library API", we may want to rename it so that such a common name
can be used by programs that link with the "git library". We may
choose to rename it to "GitLib_foo".
Do we want to keep the source of our library code, which defines the
helper function "foo" in X.c and calls it in Y.c, intact so that the
helper is still named "foo" as far as we are concerned? Or do we
"bite the bullet" and bulk modify both the callers and the callee?
I'd imagine that we would rather avoid such a churn at all cost [*].
After all, "foo" is *not* supposed to be callable by any human
written code, and that is why we rename it to a name "GitLib_foo"
that is unlikely to overlap with any sane human would use.
Side note: if a public API function that we want our library
clients to call is misnamed, we want to rename it so that we
would both internally and externally use the same public
name, I would imagine.
The mechanics to rename should be a solved problem, I think, as we
are obviously not the first project that wants to build a library.
If the names are all simple, we could do this in CPP, i.e. invent a
header file that has bunch of such renames like
#define foo GitLib_foo
and include it in both X.c and Y.c. But "foo" may also appear as
the name of a type, a member in a structure, etc., where we may not
want to touch, so in a project larger than toy scale, this approach
may not work well.
"objcopy --redefine-sym" would probably be a better way. I haven't
written a linker script, but I heard rumors that there is RENAME()
to rename symbols, and using that might be another avenue.
^ permalink raw reply
* Re: [PATCH v3 4/4] for-each-ref: avoid filtering on empty pattern
From: Junio C Hamano @ 2024-02-09 17:15 UTC (permalink / raw)
To: Patrick Steinhardt; +Cc: Karthik Nayak, Phillip Wood, phillip.wood, git
In-Reply-To: <ZcXddvQzlt6j7T7L@tanuki>
Patrick Steinhardt <ps@pks.im> writes:
> Depending on the answer, I think we can go one of two ways:
>
> - Accept the diverging behaviour and add `--include-all-refs`. The
> "files" backend does a best effort and only includes root refs, the
> "reftable" backend lists all refs.
>
> - Double down on the fact that refs must either be pseudo refs or
> start with "refs/" and treat any ref that doesn't fit this bill as
> corrupted. The consequence here would be that we instead go with
> `--include-root-refs` that can be implemented the same for both
> backends. In addition, we add checks to git-fsck(1) to surface and
> flag refs with bogus names for the "reftable" backend.
>
> While I seem to have convinced you that `--include-all-refs` might not
> be a bad idea after all, you have convinced me by now that the second
> option would be preferable. I'd be okay with either of these options as
> both of them address the issue at hand.
For now my tentative preference is the latter. If ref/head/foo is
an end-user mistake with one backend, it is cleaner if it is
considered a mistake with other backends.
Doesn't our ref enumeration/iteration API have "include broken ones
as well" bit? I wonder if this issue becomes easier to solve by
(re|ab)using that bit.
^ permalink raw reply
* What's cooking in git.git (Feb 2024, #04; Thu, 8)
From: Junio C Hamano @ 2024-02-09 17:24 UTC (permalink / raw)
To: git
Here are the topics that have been cooking in my tree. Commits
prefixed with '+' are in 'next' (being in 'next' is a sign that a
topic is stable enough to be used and are candidate to be in a
future release). Commits prefixed with '-' are only in 'seen', and
aren't considered "accepted" at all and may be annotated with an URL
to a message that raises issues but they are no means exhaustive. A
topic without enough support may be discarded after a long period of
no activity (of course they can be resubmit when new interests
arise).
The preview release Git 2.44-rc0 has been tagged. Let's see how
well this pre-release period goes; unlike previous cycles, I planned
only for one release candidate in the middle of next week until the
final release around the 20th.
Copies of the source code to Git live in many repositories, and the
following is a list of the ones I push into or their mirrors. Some
repositories have only a subset of branches.
With maint, master, next, seen, todo:
git://git.kernel.org/pub/scm/git/git.git/
git://repo.or.cz/alt-git.git/
https://kernel.googlesource.com/pub/scm/git/git/
https://github.com/git/git/
https://gitlab.com/git-vcs/git/
With all the integration branches and topics broken out:
https://github.com/gitster/git/
Even though the preformatted documentation in HTML and man format
are not sources, they are published in these repositories for
convenience (replace "htmldocs" with "manpages" for the manual
pages):
git://git.kernel.org/pub/scm/git/git-htmldocs.git/
https://github.com/gitster/git-htmldocs.git/
Release tarballs are available at:
https://www.kernel.org/pub/software/scm/git/
--------------------------------------------------
[Graduated to 'master']
* cp/unit-test-prio-queue (2024-01-22) 1 commit
(merged to 'next' on 2024-02-01 at 38aa6559b0)
+ tests: move t0009-prio-queue.sh to the new unit testing framework
The priority queue test has been migrated to the unit testing
framework.
source: <pull.1642.v4.git.1705865326185.gitgitgadget@gmail.com>
* ja/doc-placeholders-fix (2023-12-26) 2 commits
(merged to 'next' on 2024-02-05 at 047da8cbb0)
+ doc: enforce placeholders in documentation
+ doc: enforce dashes in placeholders
Docfix.
source: <pull.1626.git.1703539287.gitgitgadget@gmail.com>
* jc/index-pack-fsck-levels (2024-02-01) 2 commits
(merged to 'next' on 2024-02-02 at 0e4ef26aa1)
+ index-pack: --fsck-objects to take an optional argument for fsck msgs
+ index-pack: test and document --strict=<msg-id>=<severity>...
The "--fsck-objects" option of "git index-pack" now can take the
optional parameter to tweak severity of different fsck errors.
source: <pull.1658.v4.git.git.1706751483.gitgitgadget@gmail.com>
* jh/sparse-index-expand-to-path-fix (2024-02-02) 1 commit
(merged to 'next' on 2024-02-06 at 17ec59dd9a)
+ sparse-index: pass string length to index_file_exists()
A caller called index_file_exists() that takes a string expressed
as <ptr, length> with a wrong length, which has been corrected.
source: <pull.1649.git.1706897095273.gitgitgadget@gmail.com>
* jk/unit-tests-buildfix (2024-02-02) 4 commits
(merged to 'next' on 2024-02-02 at 8838dd21e8)
+ t/Makefile: say the default target upfront
(merged to 'next' on 2024-01-31 at 00df31c4c8)
+ t/Makefile: get UNIT_TESTS list from C sources
+ Makefile: remove UNIT_TEST_BIN directory with "make clean"
+ Makefile: use mkdir_p_parent_template for UNIT_TEST_BIN
(this branch is used by js/unit-test-suite-runner.)
Build dependency around unit tests has been fixed.
source: <20240130053714.GA165967@coredump.intra.peff.net>
source: <xmqqjznmtjr9.fsf@gitster.g>
* mh/credential-oauth-refresh-token-with-wincred (2024-01-29) 1 commit
(merged to 'next' on 2024-02-05 at 68880a751a)
+ credential/wincred: store oauth_refresh_token
The wincred credential backend has been taught to support oauth refresh
token the same way as credential-cache and credential-libsecret backends.
source: <pull.1534.v3.git.1706477103039.gitgitgadget@gmail.com>
* pb/imap-send-wo-curl-build-fix (2024-02-01) 1 commit
(merged to 'next' on 2024-02-05 at 18368f61a7)
+ imap-send: add missing "strbuf.h" include under NO_CURL
Build fix.
source: <pull.1664.git.git.1706833113569.gitgitgadget@gmail.com>
--------------------------------------------------
[New Topics]
* pw/show-ref-pseudorefs (2024-02-07) 2 commits
(merged to 'next' on 2024-02-08 at 7e9f850dba)
+ t1400: use show-ref to check pseudorefs
+ show-ref --verify: accept pseudorefs
"git show-ref --verify" did not show things like "CHERRY_PICK_HEAD",
which has been corrected.
Will merge to 'master'.
source: <pull.1654.git.1707324277.gitgitgadget@gmail.com>
* vd/for-each-ref-sort-with-formatted-timestamp (2024-02-07) 1 commit
- ref-filter.c: sort formatted dates by byte value
"git branch" and friends learned to use the formatted text as
sorting key, not the underlying timestamp value, when the --sort
option is used with author or committer timestamp with a format
specifier (e.g., "--sort=creatordate:format:%H:%M:%S").
Will merge to 'next'.
source: <pull.1655.git.1707357439586.gitgitgadget@gmail.com>
* vn/rebase-with-cherry-pick-authorship (2024-02-08) 1 commit
- sequencer: unset GIT_CHERRY_PICK_HELP for 'exec' commands
"git cherry-pick" invoked during "git rebase -i" session lost
the authorship information, which has been corrected.
Will merge to 'next'?
source: <0adb1068-ef10-44ed-ad1d-e0927a09245d@gmail.com>
* jc/no-lazy-fetch (2024-02-08) 1 commit
- git: --no-lazy-fetch option
"git --no-lazy-fetch cmd" allows to run "cmd" while disabling lazy
fetching of objects from the promisor remote, which may be handy
for debugging.
Needs review.
source: <xmqq1q9mmtpw.fsf@gitster.g>
* jc/t9210-lazy-fix (2024-02-08) 1 commit
- t9210: do not rely on lazy fetching to fail
Adjust use of "rev-list --missing" in an existing tests so that it
does not depend on a buggy failure mode.
Needs review.
source: <xmqq7cjemttr.fsf@gitster.g>
--------------------------------------------------
[Cooking]
* gt/at-is-synonym-for-head-in-add-patch (2024-02-03) 3 commits
- SQUASH???
- add-patch: classify '@' as a synonym for 'HEAD'
- add-patch: remove unnecessary NEEDSWORK comment
Teach "git checkout -p" and friends that "@" is a synonym for
"HEAD".
Expecting a reroll.
cf. <xmqqil31dqx6.fsf@gitster.g>
source: <20240202150434.11256-1-shyamthakkar001@gmail.com>
* js/unit-test-suite-runner (2024-02-03) 7 commits
- t/Makefile: run unit tests alongside shell tests
- unit tests: add rule for running with test-tool
- test-tool run-command testsuite: support unit tests
- test-tool run-command testsuite: remove hardcoded filter
- test-tool run-command testsuite: get shell from env
- t0080: turn t-basic unit test into a helper
- Merge branch 'jk/unit-tests-buildfix' into js/unit-test-suite-runner
The "test-tool" has been taught to run testsuite tests in parallel,
bypassing the need to use the "prove" tool.
Expecting a reroll.
cf. <20240207225802.GA538110@coredump.intra.peff.net>
source: <cover.1706921262.git.steadmon@google.com>
* jc/sign-buffer-failure-propagation-fix (2024-02-07) 2 commits
(merged to 'next' on 2024-02-08 at badb96b5ac)
+ ssh signing: signal an error with a negative return value
(merged to 'next' on 2024-02-07 at 2cedac9d38)
+ tag: fix sign_buffer() call to create a signed tag
A failed "git tag -s" did not necessarily result in an error
depending on the crypto backend, which has been corrected.
Will merge to 'master'.
source: <xmqq4jek9ko1.fsf@gitster.g>
source: <xmqq5xyzr6tm.fsf@gitster.g>
* js/check-null-from-read-object-file (2024-02-06) 1 commit
- Always check the return value of `repo_read_object_file()`
The code paths that call repo_read_object_file() have been
tightened to react to errors.
Waiting for review responses.
cf. <CAO_smVhrMn=-uF1B6+RA8A+VLCEN=o57zbQPtr8hpxRKY=qJRQ@mail.gmail.com>
source: <pull.1650.git.1707143753726.gitgitgadget@gmail.com>
* pb/template-for-single-commit-pr (2024-02-06) 1 commit
(merged to 'next' on 2024-02-07 at 2a56c8eb13)
+ .github/PULL_REQUEST_TEMPLATE.md: add a note about single-commit PRs
Doc update.
Will merge to 'master'.
source: <pull.1665.v2.git.git.1707225612576.gitgitgadget@gmail.com>
* ps/report-failure-from-git-stash (2024-02-06) 1 commit
(merged to 'next' on 2024-02-07 at a8a3f91f61)
+ builtin/stash: report failure to write to index
"git stash" sometimes was silent even when it failed due to
unwritable index file, which has been corrected.
Will merge to 'master'.
source: <cb098cf88cbfcbf7c4872f8887856629b909cb91.1707197653.git.ps@pks.im>
* tb/multi-pack-reuse-experiment (2024-02-05) 2 commits
(merged to 'next' on 2024-02-08 at e92afaa170)
+ pack-objects: enable multi-pack reuse via `feature.experimental`
+ t5332-multi-pack-reuse.sh: extract pack-objects helper functions
Setting `feature.experimental` opts the user into multi-pack reuse
experiment
Will merge to 'master'.
source: <cover.1707173415.git.me@ttaylorr.com>
* ps/reftable-backend (2024-02-07) 3 commits
(merged to 'next' on 2024-02-08 at ba1c4c52bb)
+ refs/reftable: fix leak when copying reflog fails
(merged to 'next' on 2024-02-07 at 1115200acb)
+ ci: add jobs to test with the reftable backend
+ refs: introduce reftable backend
Integrate the reftable code into the refs framework as a backend.
Will cook in 'next'.
source: <cover.1707288261.git.ps@pks.im>
* cc/rev-list-allow-missing-tips (2024-02-08) 4 commits
- rev-list: allow missing tips with --missing=[print|allow*]
- t6022: fix 'test' style and 'even though' typo
- oidset: refactor oidset_insert_from_set()
- revision: clarify a 'return NULL' in get_reference()
"git rev-list --missing=print" have learned to optionally take
"--allow-missing-tips", which allows the objects at the starting
points to be missing.
Comments?
cf. <xmqq7cjemttr.fsf@gitster.g>
source: <20240208135055.2705260-1-christian.couder@gmail.com>
* ps/reftable-iteration-perf (2024-02-01) 7 commits
- reftable/reader: add comments to `table_iter_next()`
- reftable/record: don't try to reallocate ref record name
- reftable/block: swap buffers instead of copying
- reftable/pq: allocation-less comparison of entry keys
- reftable/merged: skip comparison for records of the same subiter
- reftable/merged: allocation-less dropping of shadowed records
- reftable/record: introduce function to compare records by key
The code to iterate over refs with the reftable backend has seen
some optimization.
Expecting a reroll.
cf. <Zbx6aDzXpYy4Is2t@tanuki>
source: <cover.1706782841.git.ps@pks.im>
* ps/reftable-styles (2024-02-06) 9 commits
(merged to 'next' on 2024-02-07 at 18670512e2)
+ reftable/record: improve semantics when initializing records
+ reftable/merged: refactor initialization of iterators
+ reftable/merged: refactor seeking of records
+ reftable/stack: use `size_t` to track stack length
+ reftable/stack: use `size_t` to track stack slices during compaction
+ reftable/stack: index segments with `size_t`
+ reftable/stack: fix parameter validation when compacting range
+ reftable: introduce macros to allocate arrays
+ reftable: introduce macros to grow arrays
Code clean-up in various reftable code paths.
Will merge to 'master'.
source: <cover.1707200355.git.ps@pks.im>
* jc/github-actions-update (2024-02-02) 3 commits
(merged to 'next' on 2024-02-07 at 2cd6caaf70)
+ Merge branch 'jc/maint-github-actions-update' into jc/github-actions-update
+ GitHub Actions: update to github-script@v7
+ GitHub Actions: update to checkout@v4
Squelch node.js 16 deprecation warnings from GitHub Actions CI
by updating actions/github-script and actions/checkout that use
node.js 20.
Will merge to 'master'.
source: <20240202203935.1240458-1-gitster@pobox.com>
* js/merge-tree-3-trees (2024-02-07) 6 commits
- cache-tree: avoid an unnecessary check
- Always check `parse_tree*()`'s return value
- t4301: verify that merge-tree fails on missing blob objects
- merge-ort: do check `parse_tree()`'s return value
- merge-tree: fail with a non-zero exit code on missing tree objects
(merged to 'next' on 2024-01-30 at 0c77b04e59)
+ merge-tree: accept 3 trees as arguments
"git merge-tree" has learned that the three trees involved in the
3-way merge only need to be trees, not necessarily commits.
Expecting a reroll.
cf. <CAPig+cSs8MFkLasTULh7tybrFm7SwaT+JeR7HnXjh+-agCHYMw@mail.gmail.com>
cf. <CAPig+cSJz3U+vT==NhX5hcrTjsCggnAzhzQOvZcSXbcEGuYaKQ@mail.gmail.com>
source: <pull.1647.v2.git.1706474063109.gitgitgadget@gmail.com>
source: <pull.1651.v2.git.1707324461.gitgitgadget@gmail.com>
* pb/complete-config (2024-01-29) 5 commits
- completion: add an use _ _git_compute_second_level_config_vars_for_section
- builtin/help: add --config-all-for-completion
- completion: add and use _ _git_compute_first_level_config_vars_for_section
- completion: complete 'submodule.*' config variables
- completion: add space after config variable names also in Bash 3
The command line completion script (in contrib/) learned to
complete configuration variable names better.
Needs review.
cf. <xmqq8r3w53nc.fsf@gitster.g>
source: <pull.1660.v2.git.git.1706534881.gitgitgadget@gmail.com>
* rj/complete-reflog (2024-01-26) 4 commits
- completion: reflog show <log-options>
- completion: reflog with implicit "show"
- completion: introduce __git_find_subcommand
- completion: introduce __gitcomp_subcommand
The command line completion script (in contrib/) learned to
complete "git reflog" better.
Needs review.
source: <98daf977-dbad-4d3b-a293-6a769895088f@gmail.com>
* ps/reftable-multi-level-indices-fix (2024-02-01) 6 commits
(merged to 'next' on 2024-02-07 at 143f47a079)
+ reftable: document reading and writing indices
+ reftable/writer: fix writing multi-level indices
+ reftable/writer: simplify writing index records
+ reftable/writer: use correct type to iterate through index entries
+ reftable/reader: be more careful about errors in indexed seeks
+ Merge branch 'jc/reftable-core-fsync' into ps/reftable-multi-level-indices-fix
Write multi-level indices for reftable has been corrected.
Will merge to 'master'.
source: <cover.1706773842.git.ps@pks.im>
* ml/log-merge-with-cherry-pick-and-other-pseudo-heads (2024-02-08) 2 commits
- revision: implement `git log --merge` also for rebase/cherry_pick/revert
- revision: ensure MERGE_HEAD is a ref in prepare_show_merge
"git log --merge" learned to pay attention to CHERRY_PICK_HEAD and
other kinds of *_HEAD pseudorefs.
Will merge to 'next'?
source: <20240117081405.14012-1-mi.al.lohmann@gmail.com>
source: <dfb582cf-b1e4-414d-bfe1-0f93d910ec54@kdbg.org>
* bk/complete-bisect (2024-02-06) 7 commits
(merged to 'next' on 2024-02-07 at ac95a595b7)
+ completion: bisect: recognize but do not complete view subcommand
+ completion: bisect: complete log opts for visualize subcommand
+ completion: new function __git_complete_log_opts
+ completion: bisect: complete missing --first-parent and - -no-checkout options
+ completion: bisect: complete custom terms and related options
+ completion: bisect: complete bad, new, old, and help subcommands
+ completion: tests: always use 'master' for default initial branch name
Command line completion support (in contrib/) has been
updated for "git bisect".
Will merge to 'master'.
source: <20240206215048.488344-1-britton.kerin@gmail.com>
* bk/complete-dirname-for-am-and-format-patch (2024-01-12) 1 commit
- completion: dir-type optargs for am, format-patch
Command line completion support (in contrib/) has been
updated for a few commands to complete directory names where a
directory name is expected.
Expecting a reroll.
cf. <40c3a824-a961-490b-94d4-4eb23c8f713d@gmail.com>
source: <d37781c3-6af2-409b-95a8-660a9b92d20b@smtp-relay.sendinblue.com>
* bk/complete-send-email (2024-01-12) 1 commit
- completion: don't complete revs when --no-format-patch
Command line completion support (in contrib/) has been taught to
avoid offering revision names as candidates to "git send-email" when
the command is used to send pre-generated files.
Needs review.
cf. <xmqq4jej6i1b.fsf@gitster.g>
source: <a718b5ee-afb0-44bd-a299-3208fac43506@smtp-relay.sendinblue.com>
* la/trailer-api (2024-02-06) 28 commits
- trailer: introduce "template" term for readability
- trailer_set_*(): put out parameter at the end
- trailer: unify "--trailer ..." arg handling
- trailer: deprecate "new_trailer_item" struct from API
- trailer_add_arg_item(): drop new_trailer_item usage
- trailer: add new helper functions to API
- trailer: prepare to delete "parse_trailers_from_command_line_args()"
- trailer: spread usage of "trailer_block" language
- trailer: retire trailer_info_get() from API
- trailer: make trailer_info struct private
- sequencer: use the trailer iterator
- trailer: teach iterator about non-trailer lines
- trailer: finish formatting unification
- format_trailer_info(): avoid double-printing the separator
- format_trailer_info(): teach it about opts->trim_empty
- trailer: begin formatting unification
- format_trailer_info(): append newline for non-trailer lines
- format_trailer_info(): drop redundant unfold_value()
- format_trailer_info(): use trailer_item objects
- format_trailers_from_commit(): indirectly call trailer_info_get()
- format_trailer_info(): move "fast path" to caller
- format_trailers(): use strbuf instead of FILE
- trailer_info_get(): reorder parameters
- trailer: start preparing for formatting unification
- trailer: move interpret_trailers() to interpret-trailers.c
- trailer: prepare to expose functions as part of API
- shortlog: add test for de-duplicating folded trailers
- trailer: free trailer_info _after_ all related usage
Code clean-up.
source: <pull.1632.v4.git.1707196348.gitgitgadget@gmail.com>
* cp/apply-core-filemode (2023-12-26) 3 commits
(merged to 'next' on 2024-02-07 at 089a3fbb86)
+ apply: code simplification
+ apply: correctly reverse patch's pre- and post-image mode bits
+ apply: ignore working tree filemode when !core.filemode
"git apply" on a filesystem without filemode support have learned
to take a hint from what is in the index for the path, even when
not working with the "--index" or "--cached" option, when checking
the executable bit match what is required by the preimage in the
patch.
Will cook in 'next'.
cf. <xmqqzfwb53a9.fsf@gitster.g>
source: <20231226233218.472054-1-gitster@pobox.com>
* jc/bisect-doc (2024-02-07) 2 commits
(merged to 'next' on 2024-02-07 at 914fa6775f)
+ bisect: document command line arguments for "bisect start"
+ bisect: document "terms" subcommand more fully
Doc update.
Will merge to 'master'.
source: <20240207214436.538586-1-gitster@pobox.com>
* tb/path-filter-fix (2024-01-31) 16 commits
- bloom: introduce `deinit_bloom_filters()`
- commit-graph: reuse existing Bloom filters where possible
- object.h: fix mis-aligned flag bits table
- commit-graph: new Bloom filter version that fixes murmur3
- commit-graph: unconditionally load Bloom filters
- bloom: prepare to discard incompatible Bloom filters
- bloom: annotate filters with hash version
- repo-settings: introduce commitgraph.changedPathsVersion
- t4216: test changed path filters with high bit paths
- t/helper/test-read-graph: implement `bloom-filters` mode
- bloom.h: make `load_bloom_filter_from_graph()` public
- t/helper/test-read-graph.c: extract `dump_graph_info()`
- gitformat-commit-graph: describe version 2 of BDAT
- commit-graph: ensure Bloom filters are read with consistent settings
- revision.c: consult Bloom filters for root commits
- t/t4216-log-bloom.sh: harden `test_bloom_filters_not_used()`
The Bloom filter used for path limited history traversal was broken
on systems whose "char" is unsigned; update the implementation and
bump the format version to 2.
Waiting for a final ack?
cf. <ZcFjkfbsBfk7JQIH@nand.local>
source: <cover.1706741516.git.me@ttaylorr.com>
* eb/hash-transition (2023-10-02) 30 commits
- t1016-compatObjectFormat: add tests to verify the conversion between objects
- t1006: test oid compatibility with cat-file
- t1006: rename sha1 to oid
- test-lib: compute the compatibility hash so tests may use it
- builtin/ls-tree: let the oid determine the output algorithm
- object-file: handle compat objects in check_object_signature
- tree-walk: init_tree_desc take an oid to get the hash algorithm
- builtin/cat-file: let the oid determine the output algorithm
- rev-parse: add an --output-object-format parameter
- repository: implement extensions.compatObjectFormat
- object-file: update object_info_extended to reencode objects
- object-file-convert: convert commits that embed signed tags
- object-file-convert: convert commit objects when writing
- object-file-convert: don't leak when converting tag objects
- object-file-convert: convert tag objects when writing
- object-file-convert: add a function to convert trees between algorithms
- object: factor out parse_mode out of fast-import and tree-walk into in object.h
- cache: add a function to read an OID of a specific algorithm
- tag: sign both hashes
- commit: export add_header_signature to support handling signatures on tags
- commit: convert mergetag before computing the signature of a commit
- commit: write commits for both hashes
- object-file: add a compat_oid_in parameter to write_object_file_flags
- object-file: update the loose object map when writing loose objects
- loose: compatibilty short name support
- loose: add a mapping between SHA-1 and SHA-256 for loose objects
- repository: add a compatibility hash algorithm
- object-names: support input of oids in any supported hash
- oid-array: teach oid-array to handle multiple kinds of oids
- object-file-convert: stubs for converting from one object format to another
Teach a repository to work with both SHA-1 and SHA-256 hash algorithms.
Will merge to and cook in 'next'?
cf. <xmqqv86z5359.fsf@gitster.g>
source: <878r8l929e.fsf@gmail.froward.int.ebiederm.org>
* jc/rerere-cleanup (2023-08-25) 4 commits
- rerere: modernize use of empty strbuf
- rerere: try_merge() should use LL_MERGE_ERROR when it means an error
- rerere: fix comment on handle_file() helper
- rerere: simplify check_one_conflict() helper function
Code clean-up.
Not ready to be reviewed yet.
source: <20230824205456.1231371-1-gitster@pobox.com>
--------------------------------------------------
[Discarded]
* tb/pair-chunk-expect (2023-11-10) 8 commits
. midx: read `OOFF` chunk with `pair_chunk_expect()`
. midx: read `OIDL` chunk with `pair_chunk_expect()`
. commit-graph: read `BIDX` chunk with `pair_chunk_expect()`
. commit-graph: read `GDAT` chunk with `pair_chunk_expect()`
. commit-graph: read `CDAT` chunk with `pair_chunk_expect()`
. commit-graph: read `OIDL` chunk with `pair_chunk_expect()`
. chunk-format: introduce `pair_chunk_expect()` helper
. Merge branch 'jk/chunk-bounds-more' into HEAD
Further code clean-up.
Retracted for now.
cf. <ZcFjkfbsBfk7JQIH@nand.local>
source: <cover.1699569246.git.me@ttaylorr.com>
* kn/for-all-refs (2024-01-29) 4 commits
(merged to 'next' on 2024-01-30 at e7a9234a8b)
+ for-each-ref: avoid filtering on empty pattern
+ refs: introduce `refs_for_each_all_refs()`
+ refs: extract out `loose_fill_ref_dir_regular_file()`
+ refs: introduce `is_pseudoref()` and `is_headref()`
"git for-each-ref" filters its output with prefixes given from the
command line, but it did not honor an empty string to mean "pass
everything", which has been corrected.
Reverted out of 'next' to revamp its UI.
source: <20240129113527.607022-1-karthik.188@gmail.com>
* ak/color-decorate-symbols (2023-10-23) 7 commits
- log: add color.decorate.pseudoref config variable
- refs: exempt pseudorefs from pattern prefixing
- refs: add pseudorefs array and iteration functions
- log: add color.decorate.ref config variable
- log: add color.decorate.symbol config variable
- log: use designated inits for decoration_colors
- config: restructure color.decorate documentation
A new config for coloring.
Ejected, to be rebuilt on updated kn/for-all-refs topic
cf. <xmqqcyt853vz.fsf@gitster.g>
source: <20231023221143.72489-1-andy.koppe@gmail.com>
^ permalink raw reply
* [ANNOUNCE] Git v2.43.1
From: Junio C Hamano @ 2024-02-09 17:24 UTC (permalink / raw)
To: git; +Cc: Linux Kernel, git-packagers
The latest maintenance release Git v2.43.1 is now available at
the usual places. This is only to flush the accumulated fixes
on the master front down to the maintenance track.
The tarballs are found at:
https://www.kernel.org/pub/software/scm/git/
The following public repositories all have a copy of the 'v2.43.1'
tag and the 'maint' branch that the tag points at:
url = https://git.kernel.org/pub/scm/git/git
url = https://kernel.googlesource.com/pub/scm/git/git
url = git://repo.or.cz/alt-git.git
url = https://github.com/gitster/git
----------------------------------------------------------------
Git 2.43.1 Release Notes
========================
There is nothing exciting to see here. Relative to Git 2.43, this
release contains the fixes that have already been merged to the
'master' branch of the development towards the next major release.
Fixes since Git 2.43.0
----------------------
* The way CI testing used "prove" could lead to running the test
suite twice needlessly, which has been corrected.
* Newer versions of Getopt::Long started giving warnings against our
(ab)use of it in "git send-email". Bump the minimum version
requirement for Perl to 5.8.1 (from September 2002) to allow
simplifying our implementation.
* Earlier we stopped relying on commit-graph that (still) records
information about commits that are lost from the object store,
which has negative performance implications. The default has been
flipped to disable this pessimization.
* Stale URLs have been updated to their current counterparts (or
archive.org) and HTTP links are replaced with working HTTPS links.
* trace2 streams used to record the URLs that potentially embed
authentication material, which has been corrected.
* The sample pre-commit hook that tries to catch introduction of new
paths that use potentially non-portable characters did not notice
an existing path getting renamed to such a problematic path, when
rename detection was enabled.
* The command line parser for the "log" family of commands was too
loose when parsing certain numbers, e.g., silently ignoring the
extra 'q' in "git log -n 1q" without complaining, which has been
tightened up.
* "git $cmd --end-of-options --rev -- --path" for some $cmd failed
to interpret "--rev" as a rev, and "--path" as a path. This was
fixed for many programs like "reset" and "checkout".
* "git bisect reset" has been taught to clean up state files and refs
even when BISECT_START file is gone.
* Some codepaths did not correctly parse configuration variables
specified with valueless "true", which has been corrected.
* Code clean-up for sanity checking of command line options for "git
show-ref".
* The code to parse the From e-mail header has been updated to avoid
recursion.
* "git fetch --atomic" issued an unnecessary empty error message,
which has been corrected.
* Command line completion script (in contrib/) learned to work better
with the reftable backend.
* "git status" is taught to show both the branch being bisected and
being rebased when both are in effect at the same time.
cf. <xmqqil76kyov.fsf@gitster.g>
* "git archive --list extra garbage" silently ignored excess command
line parameters, which has been corrected.
* "git sparse-checkout set" added default patterns even when the
patterns are being fed from the standard input, which has been
corrected.
* Unlike other environment variables that took the usual
true/false/yes/no as well as 0/1, GIT_FLUSH only understood 0/1,
which has been corrected.
* Clearing in-core repository (happens during e.g., "git fetch
--recurse-submodules" with commit graph enabled) made in-core
commit object in an inconsistent state by discarding the necessary
data from commit-graph too early, which has been corrected.
Also contains various documentation updates, code clean-ups and minor fixups.
----------------------------------------------------------------
Changes since v2.43.0 are as follows:
Chandra Pratap (2):
sideband.c: remove redundant 'NEEDSWORK' tag
write-or-die: make GIT_FLUSH a Boolean environment variable
Elijah Newren (12):
treewide: remove unnecessary includes from header files
treewide: remove unnecessary includes in source files
archive.h: remove unnecessary include
blame.h: remove unnecessary includes
fsmonitor--daemon.h: remove unnecessary includes
http.h: remove unnecessary include
line-log.h: remove unnecessary include
pkt-line.h: remove unnecessary include
submodule-config.h: remove unnecessary include
trace2/tr2_tls.h: remove unnecessary include
treewide: add direct includes currently only pulled in transitively
treewide: remove unnecessary includes in source files
Eric Sunshine (1):
git-add.txt: add missing short option -A to synopsis
Illia Bobyr (1):
rebase: clarify --reschedule-failed-exec default
Jeff Hostetler (3):
trace2: fix signature of trace2_def_param() macro
t0211: test URL redacting in PERF format
t0212: test URL redacting in EVENT format
Jeff King (24):
parse-options: decouple "--end-of-options" and "--"
bisect: always clean on reset
config: handle NULL value when parsing non-bools
setup: handle NULL value when parsing extensions
trace2: handle NULL values in tr2_sysenv config callback
help: handle NULL value for alias.* config
submodule: handle NULL value when parsing submodule.*.branch
trailer: handle NULL value when parsing trailer-specific config
fsck: handle NULL value when parsing message config
config: reject bogus values for core.checkstat
git_xmerge_config(): prefer error() to die()
imap-send: don't use git_die_config() inside callback
config: use config_error_nonbool() instead of custom messages
diff: give more detailed messages for bogus diff.* config
config: use git_config_string() for core.checkRoundTripEncoding
push: drop confusing configset/callback redundancy
gpg-interface: drop pointless config_error_nonbool() checks
sequencer: simplify away extra git_config_string() call
mailinfo: fix out-of-bounds memory reads in unquote_quoted_pair()
t5100: make rfc822 comment test more careful
mailinfo: avoid recursion when unquoting From headers
t1006: add tests for %(objectsize:disk)
commit-graph: retain commit slab when closing NULL commit_graph
index-pack: spawn threads atomically
Jiang Xin (5):
t5574: test porcelain output of atomic fetch
fetch: no redundant error message for atomic fetch
test-pkt-line: add option parser for unpack-sideband
pkt-line: memorize sideband fragment in reader
pkt-line: do not chomp newlines for sideband messages
Johannes Schindelin (3):
ci: avoid running the test suite _twice_
packfile.c: fix a typo in `each_file_in_pack_dir_fn()`'s declaration
trace2: redact passwords from https:// URLs by default
Josh Brobst (1):
builtin/reflog.c: fix dry-run option short name
Josh Soref (13):
doc: update links to current pages
doc: switch links to https
doc: update links for andre-simon.de
doc: refer to internet archive
CodingGuidelines: move period inside parentheses
CodingGuidelines: write punctuation marks
SubmittingPatches: drop ref to "What's in git.git"
SubmittingPatches: discourage new trailers
SubmittingPatches: update extra tags list
SubmittingPatches: provide tag naming advice
SubmittingPatches: clarify GitHub visual
SubmittingPatches: clarify GitHub artifact format
SubmittingPatches: hyphenate non-ASCII
Julian Prein (1):
hooks--pre-commit: detect non-ASCII when renaming
Junio C Hamano (13):
orphan/unborn: add to the glossary and use them consistently
orphan/unborn: fix use of 'orphan' in end-user facing messages
revision: parse integer arguments to --max-count, --skip, etc., more carefully
git.txt: HEAD is not that special
git-bisect.txt: BISECT_HEAD is not that special
refs.h: HEAD is not that special
docs: AUTO_MERGE is not that special
docs: MERGE_AUTOSTASH is not that special
doc: format.notes specify a ref under refs/notes/ hierarchy
remote.h: retire CAS_OPT_NAME
archive: "--list" does not take further options
sparse-checkout: use default patterns for 'set' only !stdin
Git 2.43.1
Linus Arver (3):
commit: ignore_non_trailer computes number of bytes to ignore
trailer: find the end of the log message
trailer: use offsets for trailer_start/trailer_end
Maarten van der Schrieck (1):
Documentation: fix statement about rebase.instructionFormat
Marcel Krause (1):
doc: make the gitfile syntax easier to discover
Michael Lohmann (2):
Documentation/git-merge.txt: fix reference to synopsis
Documentation/git-merge.txt: use backticks for command wrapping
Patrick Steinhardt (31):
ci: reorder definitions for grouping functions
ci: make grouping setup more generic
ci: group installation of Docker dependencies
ci: split out logic to set up failed test artifacts
ci: unify setup of some environment variables
ci: squelch warnings when testing with unusable Git repo
ci: install test dependencies for linux-musl
ci: add support for GitLab CI
commit-graph: disable GIT_COMMIT_GRAPH_PARANOIA by default
t0410: mark tests to require the reffiles backend
t1400: split up generic reflog tests from the reffile-specific ones
t1401: stop treating FETCH_HEAD as real reference
t1410: use test-tool to create empty reflog
t1417: make `reflog --updateref` tests backend agnostic
t3310: stop checking for reference existence via `test -f`
t4013: simplify magic parsing and drop "failure"
t5401: speed up creation of many branches
t5551: stop writing packed-refs directly
t6301: write invalid object ID via `test-tool ref-store`
reftable: wrap EXPECT macros in do/while
reftable: handle interrupted reads
reftable: handle interrupted writes
reftable/stack: verify that `reftable_stack_add()` uses auto-compaction
reftable/stack: perform auto-compaction with transactional interface
reftable/stack: reuse buffers when reloading stack
reftable/stack: fix stale lock when dying
reftable/stack: fix use of unseeded randomness
reftable/merged: reuse buffer to compute record keys
reftable/block: introduce macro to initialize `struct block_iter`
reftable/block: reuse buffer to compute record keys
tests: adjust whitespace in chainlint expectations
René Scharfe (14):
column: release strbuf and string_list after use
i18n: factorize even more 'incompatible options' messages
push: use die_for_incompatible_opt4() for - -delete/--tags/--all/--mirror
repack: use die_for_incompatible_opt3() for -A/-k/--cruft
revision: use die_for_incompatible_opt3() for - -graph/--reverse/--walk-reflogs
revision, rev-parse: factorize incompatibility messages about - -exclude-hidden
clean: factorize incompatibility message
worktree: standardize incompatibility messages
worktree: simplify incompatibility message for --orphan and commit-ish
show-ref: use die_for_incompatible_opt3()
t6300: avoid hard-coding object sizes
rebase: use strvec_pushf() for format-patch revisions
fast-import: use mem_pool_calloc()
t1006: prefer shell loop to awk for packed object sizes
Rubén Justo (1):
status: fix branch shown when not only bisecting
Shreyansh Paliwal (1):
test-lib-functions.sh: fix test_grep fail message wording
Stan Hu (2):
completion: refactor existence checks for pseudorefs
completion: support pseudoref existence checks for reftables
Todd Zullinger (2):
perl: bump the required Perl version to 5.8.1 from 5.8.0
send-email: avoid duplicate specification warnings
^ permalink raw reply
* [ANNOUNCE] Git v2.44.0-rc0
From: Junio C Hamano @ 2024-02-09 17:24 UTC (permalink / raw)
To: git; +Cc: Linux Kernel, git-packagers
An early preview release Git v2.44.0-rc0 is now available for
testing at the usual places. It is comprised of 432 non-merge
commits since v2.43.0, contributed by 67 people, 30 of which are new
faces [*]. Unlike previous cycles, I plan only for one release
candidate in the middle of next week until the final release around
the 20th.
The tarballs are found at:
https://www.kernel.org/pub/software/scm/git/testing/
The following public repositories all have a copy of the
'v2.44.0-rc0' tag and the 'master' branch that the tag points at:
url = https://git.kernel.org/pub/scm/git/git
url = https://kernel.googlesource.com/pub/scm/git/git
url = git://repo.or.cz/alt-git.git
url = https://github.com/gitster/git
New contributors whose contributions weren't in v2.43.0 are as follows.
Welcome to the Git development community!
Achu Luma, Antonin Delpeuch, Benjamin Lehmann, Britton Leo Kerin,
Carlos Andrés Ramírez Cataño, Chandra Pratap, Ghanshyam
Thakkar, Illia Bobyr, James Touton, Janik Haag, Joanna Wang,
Josh Brobst, Julian Prein, Justin Tobler, Kyle Lippincott,
Maarten van der Schrieck, Marcel Krause, Marcelo Roberto Jimenez,
Michael Lohmann, Nikolay Borisov, Nikolay Edigaryev, Ondrej
Pohorelsky, Sam Delmerico, Shreyansh Paliwal, Sören Krecker,
Stan Hu, Tamino Bauknecht, Wilfred Hughes, Willem Verstraeten,
and Zach FettersMoore.
Returning contributors who helped this release are as follows.
Thanks for your continued support.
Andy Koppe, Arthur Chan, Calvin Wan, Carlo Marcelo Arenas Belón,
Christian Couder, Dragan Simic, Elijah Newren, Eric Sunshine,
Glen Choo, Han-Wen Nienhuys, Jean-Noël Avila, Jeff Hostetler,
Jeff King, Jiang Xin, Johannes Schindelin, John Cai, Jonathan
Tan, Josh Soref, Josh Steadmon, Josip Sokcevic, Junio C Hamano,
Konstantin Ryabitsev, Kristoffer Haugsbakk, Linus Arver,
M Hickford, Oswald Buddenhagen, Patrick Steinhardt, Philippe
Blain, Phillip Wood, René Scharfe, Rubén Justo, Simon Ser,
SZEDER Gábor, Taylor Blau, Todd Zullinger, Toon Claes, and
Victoria Dye.
[*] We are counting not just the authorship contribution but issue
reporting, mentoring, helping and reviewing that are recorded in
the commit trailers.
----------------------------------------------------------------
Git v2.44 Release Notes (draft)
===============================
Backward Compatibility Notes
* "git chekcout -B <branch>" used to allow switching to a branch that
is in use on another worktree, but this was by mistake. The users
need to use "--ignore-other-worktrees" option.
UI, Workflows & Features
* "git add" and "git stash" learned to support the ":(attr:...)"
magic pathspec.
* "git rebase --autosquash" is now enabled for non-interactive rebase,
but it is still incompatible with the apply backend.
* Introduce "git replay", a tool meant on the server side without
working tree to recreate a history.
* "git merge-file" learned to take the "--diff-algorithm" option to
use algorithm different from the default "myers" diff.
* Command line completion (in contrib/) learned to complete path
arguments to the "add/set" subcommands of "git sparse-checkout"
better.
* "git checkout -B <branch> [<start-point>]" allowed a branch that is
in use in another worktree to be updated and checked out, which
might be a bit unexpected. The rule has been tightened, which is a
breaking change. "--ignore-other-worktrees" option is required to
unbreak you, if you are used to the current behaviour that "-B"
overrides the safety.
* The builtin_objectmode attribute is populated for each path
without adding anything in .gitattributes files, which would be
useful in magic pathspec, e.g., ":(attr:builtin_objectmode=100755)"
to limit to executables.
* "git fetch" learned to pay attention to "fetch.all" configuration
variable, which pretends as if "--all" was passed from the command
line when no remote parameter was given.
* In addition to (rather cryptic) Security Identifiers, show username
and domain in the error message when we barf on mismatch between
the Git directory and the current user on Windows.
* The error message given when "git branch -d branch" fails due to
commits unique to the branch has been split into an error and a new
conditional advice message.
* When given an existing but unreadable file as a configuration file,
gitweb behaved as if the file did not exist at all, but now it
errors out. This is a change that may break backward compatibility.
* When $HOME/.gitignore is missing but XDG config file available, we
should write into the latter, not former. "git gc" and "git
maintenance" wrote into a wrong "global config" file, which have
been corrected.
* Define "special ref" as a very narrow set that consists of
FETCH_HEAD and MERGE_HEAD, and clarify everything else that used to
be classified as such are actually just pseudorefs.
* All conditional "advice" messages show how to turn them off, which
becomes repetitive. Setting advice.* configuration explicitly on
now omits the instruction part.
* The "disable repository discovery of a bare repository" check,
triggered by setting safe.bareRepository configuration variable to
'explicit', has been loosened to exclude the ".git/" directory inside
a non-bare repository from the check. So you can do "cd .git &&
git cmd" to run a Git command that works on a bare repository without
explicitly specifying $GIT_DIR now.
* The completion script (in contrib/) learned more options that can
be used with "git log".
* The labels on conflict markers for the common ancestor, our version,
and the other version are available to custom 3-way merge driver
via %S, %X, and %Y placeholders.
* The write codepath for the reftable data learned to honor
core.fsync configuration.
* The "--fsck-objects" option of "git index-pack" now can take the
optional parameter to tweak severity of different fsck errors.
* The wincred credential backend has been taught to support oauth
refresh token the same way as credential-cache and
credential-libsecret backends.
Performance, Internal Implementation, Development Support etc.
* Process to add some form of low-level unit tests has started.
* Add support for GitLab CI.
* "git for-each-ref --no-sort" still sorted the refs alphabetically
which paid non-trivial cost. It has been redefined to show output
in an unspecified order, to allow certain optimizations to take
advantage of.
* Simplify API implementation to delete references by eliminating
duplication.
* Subject approxidate() and show_date() machinery to OSS-Fuzz.
* A new helper to let us pretend that we called lstat() when we know
our cache_entry is up-to-date via fsmonitor.
* The optimization based on fsmonitor in the "diff --cached"
codepath is resurrected with the "fake-lstat" introduced earlier.
* Test balloon to use C99 "bool" type from <stdbool.h> has been
added.
* "git clone" has been prepared to allow cloning a repository with
non-default hash function into a repository that uses the reftable
backend.
* Streaming spans of packfile data used to be done only from a
single, primary, pack in a repository with multiple packfiles. It
has been extended to allow reuse from other packfiles, too.
* Comment updates to help developers not to attempt to modify
messages from plumbing commands that must stay constant.
It might make sense to reassess the plumbing needs every few years,
but that should be done as a separate effort.
* Move test-ctype helper to the unit-test framework.
* Instead of manually creating refs/ hierarchy on disk upon a
creation of a secondary worktree, which is only usable via the
files backend, use the refs API to populate it.
* CI for GitLab learned to drive macOS jobs.
* A few tests to "git commit -o <pathspec>" and "git commit -i
<pathspec>" has been added.
* Tests on ref API are moved around to prepare for reftable.
* The Makefile often had to say "-L$(path) -R$(path)" that repeats
the path to the same library directory for link time and runtime.
A Makefile template is used to reduce such repetition.
* The priority queue test has been migrated to the unit testing
framework.
Fixes since v2.43
-----------------
* The way CI testing used "prove" could lead to running the test
suite twice needlessly, which has been corrected.
* Update ref-related tests.
* "git format-patch --encode-email-headers" ignored the option when
preparing the cover letter, which has been corrected.
* Newer versions of Getopt::Long started giving warnings against our
(ab)use of it in "git send-email". Bump the minimum version
requirement for Perl to 5.8.1 (from September 2002) to allow
simplifying our implementation.
* Earlier we stopped relying on commit-graph that (still) records
information about commits that are lost from the object store,
which has negative performance implications. The default has been
flipped to disable this pessimization.
* Stale URLs have been updated to their current counterparts (or
archive.org) and HTTP links are replaced with working HTTPS links.
* trace2 streams used to record the URLs that potentially embed
authentication material, which has been corrected.
* The sample pre-commit hook that tries to catch introduction of new
paths that use potentially non-portable characters did not notice
an existing path getting renamed to such a problematic path, when
rename detection was enabled.
* The command line parser for the "log" family of commands was too
loose when parsing certain numbers, e.g., silently ignoring the
extra 'q' in "git log -n 1q" without complaining, which has been
tightened up.
* "git $cmd --end-of-options --rev -- --path" for some $cmd failed
to interpret "--rev" as a rev, and "--path" as a path. This was
fixed for many programs like "reset" and "checkout".
* "git bisect reset" has been taught to clean up state files and refs
even when BISECT_START file is gone.
* Some codepaths did not correctly parse configuration variables
specified with valueless "true", which has been corrected.
* Code clean-up for sanity checking of command line options for "git
show-ref".
* The code to parse the From e-mail header has been updated to avoid
recursion.
* "git fetch --atomic" issued an unnecessary empty error message,
which has been corrected.
* Command line completion script (in contrib/) learned to work better
with the reftable backend.
* "git status" is taught to show both the branch being bisected and
being rebased when both are in effect at the same time.
* "git archive --list extra garbage" silently ignored excess command
line parameters, which has been corrected.
* "git sparse-checkout set" added default patterns even when the
patterns are being fed from the standard input, which has been
corrected.
* "git sparse-checkout (add|set) --[no-]cone --end-of-options" did
not handle "--end-of-options" correctly after a recent update.
* Unlike other environment variables that took the usual
true/false/yes/no as well as 0/1, GIT_FLUSH only understood 0/1,
which has been corrected.
* Clearing in-core repository (happens during e.g., "git fetch
--recurse-submodules" with commit graph enabled) made in-core
commit object in an inconsistent state by discarding the necessary
data from commit-graph too early, which has been corrected.
* Update to a new feature recently added, "git show-ref --exists".
(merge 0aabeaa562 tc/show-ref-exists-fix later to maint).
* oss-fuzz tests are built and run in CI.
(merge c4a9cf1df3 js/oss-fuzz-build-in-ci later to maint).
* Rename detection logic ignored the final line of a file if it is an
incomplete line.
(merge 1c5bc6971e en/diffcore-delta-final-line-fix later to maint).
* GitHub CI update.
(merge 0188b2c8e0 pb/ci-github-skip-logs-for-broken-tests later to maint).
* "git diff --no-rename A B" did not disable rename detection but did
not trigger an error from the command line parser.
(merge 457f96252f rs/parse-options-with-keep-unknown-abbrev-fix later to maint).
* "git archive --remote=<remote>" learned to talk over the smart
http (aka stateless) transport.
(merge 176cd68634 jx/remote-archive-over-smart-http later to maint).
* Fetching via protocol v0 over Smart HTTP transport sometimes failed
to correctly auto-follow tags.
(merge fba732c462 jk/fetch-auto-tag-following-fix later to maint).
* The documentation for the --exclude-per-directory option marked it
as deprecated, which confused readers into thinking there may be a
plan to remove it in the future, which was not our intention.
(merge 0009542cab jc/ls-files-doc-update later to maint).
* "git diff --no-index file1 file2" segfaulted while invoking the
external diff driver, which has been corrected.
(merge 85a9a63c92 jk/diff-external-with-no-index later to maint).
* Rewrite //-comments to /* comments */ in files whose comments
prevalently use the latter.
(merge de65079d7b jc/comment-style-fixes later to maint).
* Cirrus CI jobs started breaking because we specified version of
FreeBSD that is no longer available, which has been corrected.
(merge 81fffb66d3 cb/use-freebsd-13-2-at-cirrus-ci later to maint).
* A caller called index_file_exists() that takes a string expressed
as <ptr, length> with a wrong length, which has been corrected.
(merge 156e28b36d jh/sparse-index-expand-to-path-fix later to maint).
* Other code cleanup, docfix, build fix, etc.
(merge 5aea3955bc rj/clarify-branch-doc-m later to maint).
(merge 9cce3be2df bk/bisect-doc-fix later to maint).
(merge 8f50984cf4 ne/doc-filter-blob-limit-fix later to maint).
(merge f10b0989b8 la/strvec-comment-fix later to maint).
(merge 8430b438f6 vd/fsck-submodule-url-test later to maint).
(merge f10031fadd nb/rebase-x-shell-docfix later to maint).
(merge af3d2c160f jc/majordomo-to-subspace later to maint).
(merge ee9895b0ff sd/negotiate-trace-fix later to maint).
(merge 976d0251ce jc/coc-whitespace-fix later to maint).
(merge 9023198280 jt/p4-spell-re-with-raw-string later to maint).
(merge 36c9c44fa4 tb/pack-bitmap-drop-unused-struct-member later to maint).
(merge 19ed0dff8f js/win32-retry-pipe-write-on-enospc later to maint).
(merge 3cb4384683 jc/t0091-with-unknown-git later to maint).
----------------------------------------------------------------
Changes since v2.43.0 are as follows:
Achu Luma (2):
unit-tests: rewrite t/helper/test-ctype.c as a unit test
t2400: avoid losing exit status to pipes
Andy Koppe (3):
rebase: fully ignore rebase.autoSquash without -i
rebase: support --autosquash without -i
rebase: rewrite --(no-)autosquash documentation
Antonin Delpeuch (2):
merge-file: add --diff-algorithm option
merge-ll: expose revision names to custom drivers
Arthur Chan (1):
fuzz: add new oss-fuzz fuzzer for date.c / date.h
Britton Leo Kerin (2):
doc: use singular form of repeatable path arg
doc: refer to pathspec instead of path
Carlo Marcelo Arenas Belón (1):
ci: update FreeBSD cirrus job
Chandra Pratap (4):
sideband.c: remove redundant 'NEEDSWORK' tag
write-or-die: make GIT_FLUSH a Boolean environment variable
t4129: prevent loss of exit code due to the use of pipes
tests: move t0009-prio-queue.sh to the new unit testing framework
Elijah Newren (32):
t6429: remove switching aspects of fast-rebase
replay: introduce new builtin
replay: start using parse_options API
replay: die() instead of failing assert()
replay: introduce pick_regular_commit()
replay: change rev walking options
replay: add an important FIXME comment about gpg signing
replay: remove progress and info output
replay: remove HEAD related sanity check
replay: make it a minimal server side command
replay: use standard revision ranges
replay: add --advance or 'cherry-pick' mode
replay: add --contained to rebase contained branches
replay: stop assuming replayed branches do not diverge
completion: squelch stray errors in sparse-checkout completion
completion: fix logic for determining whether cone mode is active
completion: avoid misleading completions in cone mode
completion: avoid user confusion in non-cone mode
treewide: remove unnecessary includes from header files
treewide: remove unnecessary includes in source files
archive.h: remove unnecessary include
blame.h: remove unnecessary includes
fsmonitor--daemon.h: remove unnecessary includes
http.h: remove unnecessary include
line-log.h: remove unnecessary include
pkt-line.h: remove unnecessary include
submodule-config.h: remove unnecessary include
trace2/tr2_tls.h: remove unnecessary include
treewide: add direct includes currently only pulled in transitively
treewide: remove unnecessary includes in source files
sparse-checkout: be consistent with end of options markers
diffcore-delta: avoid ignoring final 'line' of file
Eric Sunshine (1):
git-add.txt: add missing short option -A to synopsis
Ghanshyam Thakkar (4):
t7501: add tests for --include and --only
t7501: add tests for --amend --signoff
t0024: avoid losing exit status to pipes
t0024: style fix
Illia Bobyr (1):
rebase: clarify --reschedule-failed-exec default
James Touton (1):
git-p4: use raw string literals for regular expressions
Jean-Noël Avila (2):
doc: enforce dashes in placeholders
doc: enforce placeholders in documentation
Jeff Hostetler (4):
trace2: fix signature of trace2_def_param() macro
t0211: test URL redacting in PERF format
t0212: test URL redacting in EVENT format
sparse-index: pass string length to index_file_exists()
Jeff King (38):
commit-graph: handle overflow in chunk_size checks
midx: check consistency of fanout table
commit-graph: drop redundant call to "lite" verification
commit-graph: clarify missing-chunk error messages
commit-graph: abort as soon as we see a bogus chunk
commit-graph: use fanout value for graph size
commit-graph: check order while reading fanout chunk
commit-graph: drop verify_commit_graph_lite()
commit-graph: mark chunk error messages for translation
parse-options: decouple "--end-of-options" and "--"
bisect: always clean on reset
config: handle NULL value when parsing non-bools
setup: handle NULL value when parsing extensions
trace2: handle NULL values in tr2_sysenv config callback
help: handle NULL value for alias.* config
submodule: handle NULL value when parsing submodule.*.branch
trailer: handle NULL value when parsing trailer-specific config
fsck: handle NULL value when parsing message config
config: reject bogus values for core.checkstat
git_xmerge_config(): prefer error() to die()
imap-send: don't use git_die_config() inside callback
config: use config_error_nonbool() instead of custom messages
diff: give more detailed messages for bogus diff.* config
config: use git_config_string() for core.checkRoundTripEncoding
push: drop confusing configset/callback redundancy
gpg-interface: drop pointless config_error_nonbool() checks
sequencer: simplify away extra git_config_string() call
mailinfo: fix out-of-bounds memory reads in unquote_quoted_pair()
t5100: make rfc822 comment test more careful
mailinfo: avoid recursion when unquoting From headers
t1006: add tests for %(objectsize:disk)
commit-graph: retain commit slab when closing NULL commit_graph
index-pack: spawn threads atomically
transport-helper: re-examine object dir after fetching
diff: handle NULL meta-info when spawning external diff
Makefile: use mkdir_p_parent_template for UNIT_TEST_BIN
Makefile: remove UNIT_TEST_BIN directory with "make clean"
t/Makefile: get UNIT_TESTS list from C sources
Jiang Xin (11):
t5574: test porcelain output of atomic fetch
fetch: no redundant error message for atomic fetch
test-pkt-line: add option parser for unpack-sideband
pkt-line: memorize sideband fragment in reader
pkt-line: do not chomp newlines for sideband messages
transport-helper: no connection restriction in connect_helper
remote-curl: supports git-upload-archive service
transport-helper: protocol v2 supports upload-archive
http-backend: new rpc-service for git-upload-archive
transport-helper: call do_take_over() in connect_helper
transport-helper: call do_take_over() in process_connect
Joanna Wang (2):
attr: enable attr pathspec magic for git-add and git-stash
attr: add builtin objectmode values support
Johannes Schindelin (11):
cmake: also build unit tests
unit-tests: do not mistake `.pdb` files for being executable
unit-tests: do show relative file paths
artifacts-tar: when including `.dll` files, don't forget the unit-tests
cmake: fix typo in variable name
cmake: use test names instead of full paths
cmake: handle also unit tests
ci: avoid running the test suite _twice_
packfile.c: fix a typo in `each_file_in_pack_dir_fn()`'s declaration
trace2: redact passwords from https:// URLs by default
win32: special-case `ENOSPC` when writing to a pipe
John Cai (15):
t3210: move to t0601
remove REFFILES prerequisite for some tests in t1405 and t2017
t1414: convert test to use Git commands instead of writing refs manually
t1404: move reffiles specific tests to t0600
t1405: move reffiles specific tests to t0601
t1406: move reffiles specific tests to t0600
t1410: move reffiles specific tests to t0600
t1415: move reffiles specific tests to t0601
t1503: move reffiles specific tests to t0600
t3903: make drop stash test ref backend agnostic
t4202: move reffiles specific tests to t0600
t5312: move reffiles specific tests to t0601
reftable: honor core.fsync
index-pack: test and document --strict=<msg-id>=<severity>...
index-pack: --fsck-objects to take an optional argument for fsck msgs
Josh Brobst (1):
builtin/reflog.c: fix dry-run option short name
Josh Soref (13):
doc: update links to current pages
doc: switch links to https
doc: update links for andre-simon.de
doc: refer to internet archive
CodingGuidelines: move period inside parentheses
CodingGuidelines: write punctuation marks
SubmittingPatches: drop ref to "What's in git.git"
SubmittingPatches: discourage new trailers
SubmittingPatches: update extra tags list
SubmittingPatches: provide tag naming advice
SubmittingPatches: clarify GitHub visual
SubmittingPatches: clarify GitHub artifact format
SubmittingPatches: hyphenate non-ASCII
Josh Steadmon (4):
unit tests: add a project plan document
ci: run unit tests in CI
fuzz: fix fuzz test build rules
ci: build and run minimal fuzzers in GitHub CI
Julian Prein (1):
hooks--pre-commit: detect non-ASCII when renaming
Junio C Hamano (44):
cache: add fake_lstat()
diff-lib: fix check_removed() when fsmonitor is active
checkout: refactor die_if_checked_out() caller
orphan/unborn: add to the glossary and use them consistently
orphan/unborn: fix use of 'orphan' in end-user facing messages
revision: parse integer arguments to --max-count, --skip, etc., more carefully
Start the 2.44 cycle
checkout: forbid "-B <branch>" from touching a branch used elsewhere
git.txt: HEAD is not that special
git-bisect.txt: BISECT_HEAD is not that special
refs.h: HEAD is not that special
docs: AUTO_MERGE is not that special
docs: MERGE_AUTOSTASH is not that special
doc: format.notes specify a ref under refs/notes/ hierarchy
The second batch
remote.h: retire CAS_OPT_NAME
The third batch
archive: "--list" does not take further options
sparse-checkout: use default patterns for 'set' only !stdin
The fourth batch
The fifth batch
The sixth batch
messages: mark some strings with "up-to-date" not to touch
The seventh batch
The eighth batch
The ninth batch
Docs: majordomo@vger.kernel.org has been decomissioned
CoC: whitespace fix
ls-files: avoid the verb "deprecate" for individual options
The tenth batch
builtin/worktree: comment style fixes
merge-ort.c: comment style fix
reftable/pq_test: comment style fix
The eleventh batch
t0091: allow test in a repository without tags
The twelfth batch
Makefile: reduce repetitive library paths
Makefile: simplify output of the libpath_template
The thirteenth batch
t/Makefile: say the default target upfront
The fourteenth batch
The fifteenth batch
Git 2.43.1
Git 2.44-rc0
Justin Tobler (2):
t1401: remove lockfile creation
t5541: remove lockfile creation
Kristoffer Haugsbakk (5):
config: format newlines
config: rename global config function
config: factor out global config file retrieval
maintenance: use XDG config if it exists
config: add back code comment
Kyle Lippincott (1):
setup: allow cwd=.git w/ bareRepository=explicit
Linus Arver (4):
commit: ignore_non_trailer computes number of bytes to ignore
trailer: find the end of the log message
trailer: use offsets for trailer_start/trailer_end
strvec: use correct member name in comments
M Hickford (1):
credential/wincred: store oauth_refresh_token
Maarten van der Schrieck (1):
Documentation: fix statement about rebase.instructionFormat
Marcel Krause (1):
doc: make the gitfile syntax easier to discover
Marcelo Roberto Jimenez (1):
gitweb: die when a configuration file cannot be read
Michael Lohmann (2):
Documentation/git-merge.txt: fix reference to synopsis
Documentation/git-merge.txt: use backticks for command wrapping
Nikolay Borisov (1):
rebase: fix documentation about used shell in -x
Nikolay Edigaryev (1):
rev-list-options: fix off-by-one in '--filter=blob:limit=<n>' explainer
Patrick Steinhardt (124):
t: allow skipping expected object ID in `ref-store update-ref`
t: convert tests to not write references via the filesystem
t: convert tests to not access symrefs via the filesystem
t: convert tests to not access reflog via the filesystem
t1450: convert tests to remove worktrees via git-worktree(1)
t4207: delete replace references via git-update-ref(1)
t7300: assert exact states of repo
t7900: assert the absence of refs via git-for-each-ref(1)
t: mark several tests that assume the files backend with REFFILES
ci: reorder definitions for grouping functions
ci: make grouping setup more generic
ci: group installation of Docker dependencies
ci: split out logic to set up failed test artifacts
ci: unify setup of some environment variables
ci: squelch warnings when testing with unusable Git repo
ci: install test dependencies for linux-musl
ci: add support for GitLab CI
t/lib-httpd: dynamically detect httpd and modules path
t/lib-httpd: stop using legacy crypt(3) for authentication
t9164: fix inability to find basename(1) in Subversion hooks
global: convert trivial usages of `test <expr> -a/-o <expr>`
contrib/subtree: stop using `-o` to test for number of args
contrib/subtree: convert subtree type check to use case statement
Makefile: stop using `test -o` when unlinking duplicate executables
t5510: ensure that the packed-refs file needs locking
refs/files: use transactions to delete references
refs: deduplicate code to delete references
refs: remove `delete_refs` callback from backends
commit-graph: disable GIT_COMMIT_GRAPH_PARANOIA by default
t0410: mark tests to require the reffiles backend
t1400: split up generic reflog tests from the reffile-specific ones
t1401: stop treating FETCH_HEAD as real reference
t1410: use test-tool to create empty reflog
t1417: make `reflog --updateref` tests backend agnostic
t3310: stop checking for reference existence via `test -f`
t4013: simplify magic parsing and drop "failure"
t5401: speed up creation of many branches
t5551: stop writing packed-refs directly
t6301: write invalid object ID via `test-tool ref-store`
reftable: wrap EXPECT macros in do/while
reftable: handle interrupted reads
reftable: handle interrupted writes
reftable/stack: verify that `reftable_stack_add()` uses auto-compaction
reftable/stack: perform auto-compaction with transactional interface
reftable/stack: reuse buffers when reloading stack
reftable/stack: fix stale lock when dying
reftable/stack: fix use of unseeded randomness
reftable/merged: reuse buffer to compute record keys
reftable/block: introduce macro to initialize `struct block_iter`
reftable/block: reuse buffer to compute record keys
setup: extract function to create the refdb
setup: allow skipping creation of the refdb
remote-curl: rediscover repository when fetching refs
builtin/clone: fix bundle URIs with mismatching object formats
builtin/clone: set up sparse checkout later
builtin/clone: skip reading HEAD when retrieving remote
builtin/clone: create the refdb with the correct object format
wt-status: read HEAD and ORIG_HEAD via the refdb
refs: propagate errno when reading special refs fails
refs: complete list of special refs
bisect: consistently write BISECT_EXPECTED_REV via the refdb
tests: adjust whitespace in chainlint expectations
t: introduce DEFAULT_REPO_FORMAT prereq
worktree: skip reading HEAD when repairing worktrees
refs: refactor logic to look up storage backends
setup: start tracking ref storage format
setup: set repository's formats on init
setup: introduce "extensions.refStorage" extension
setup: introduce GIT_DEFAULT_REF_FORMAT envvar
t: introduce GIT_TEST_DEFAULT_REF_FORMAT envvar
builtin/rev-parse: introduce `--show-ref-format` flag
builtin/init: introduce `--ref-format=` value flag
builtin/clone: introduce `--ref-format=` value flag
t9500: write "extensions.refstorage" into config
reftable/stack: do not overwrite errors when compacting
reftable/stack: do not auto-compact twice in `reftable_stack_add()`
reftable/writer: fix index corruption when writing multiple indices
reftable/record: constify some parts of the interface
reftable/record: store "val1" hashes as static arrays
reftable/record: store "val2" hashes as static arrays
reftable/merged: really reuse buffers to compute record keys
reftable/merged: transfer ownership of records when iterating
git-prompt: stop manually parsing HEAD with unknown ref formats
ci: add job performing static analysis on GitLab CI
refs: prepare `refs_init_db()` for initializing worktree refs
setup: move creation of "refs/" into the files backend
refs/files: skip creation of "refs/{heads,tags}" for worktrees
builtin/worktree: move setup of commondir file earlier
worktree: expose interface to look up worktree by name
builtin/worktree: create refdb via ref backend
reftable/stack: refactor stack reloading to have common exit path
reftable/stack: refactor reloading to use file descriptor
reftable/stack: use stat info to avoid re-reading stack list
reftable/blocksource: refactor code to match our coding style
reftable/blocksource: use mmap to read tables
git-p4: stop reaching into the refdb
commit-graph: fix memory leak when not writing graph
completion: discover repo path in `__git_pseudoref_exists ()`
t9902: verify that completion does not print anything
completion: improve existence check for pseudo-refs
completion: silence pseudoref existence check
completion: treat dangling symrefs as existing pseudorefs
t7527: decrease likelihood of racing with fsmonitor daemon
Makefile: detect new Homebrew location for ARM-based Macs
ci: handle TEST_OUTPUT_DIRECTORY when printing test failures
ci: make p4 setup on macOS more robust
ci: add macOS jobs to GitLab CI
reftable/stack: unconditionally reload stack after commit
reftable/stack: fix race in up-to-date check
sequencer: clean up pseudo refs with REF_NO_DEREF
sequencer: delete REBASE_HEAD in correct repo when picking commits
refs: convert AUTO_MERGE to become a normal pseudo-ref
sequencer: introduce functions to handle autostashes via refs
refs: convert MERGE_AUTOSTASH to become a normal pseudo-ref
refs: redefine special refs
Documentation: add "special refs" to the glossary
reftable/stack: adjust permissions of compacted tables
t1300: make tests more robust with non-default ref backends
t1301: mark test for `core.sharedRepository` as reffiles specific
t1302: make tests more robust with new extensions
t1419: mark test suite as files-backend specific
t5526: break test submodule differently
t: mark tests regarding git-pack-refs(1) to be backend specific
reftable/stack: fsync "tables.list" during compaction
Philippe Blain (6):
completion: complete missing rev-list options
completion: complete --patch-with-raw
completion: complete --encoding
completion: complete missing 'git log' options
ci(github): also skip logs of broken test cases
imap-send: add missing "strbuf.h" include under NO_CURL
Phillip Wood (1):
unit tests: add TAP unit test framework
René Scharfe (19):
column: release strbuf and string_list after use
i18n: factorize even more 'incompatible options' messages
push: use die_for_incompatible_opt4() for - -delete/--tags/--all/--mirror
repack: use die_for_incompatible_opt3() for -A/-k/--cruft
revision: use die_for_incompatible_opt3() for - -graph/--reverse/--walk-reflogs
revision, rev-parse: factorize incompatibility messages about - -exclude-hidden
clean: factorize incompatibility message
worktree: standardize incompatibility messages
worktree: simplify incompatibility message for --orphan and commit-ish
show-ref: use die_for_incompatible_opt3()
t6300: avoid hard-coding object sizes
git-compat-util: convert skip_{prefix,suffix}{,_mem} to bool
rebase: use strvec_pushf() for format-patch revisions
fast-import: use mem_pool_calloc()
mem-pool: fix big allocations
mem-pool: simplify alignment calculation
t1006: prefer shell loop to awk for packed object sizes
parse-options: fully disable option abbreviation with PARSE_OPT_KEEP_UNKNOWN
parse-options: simplify positivation handling
Rubén Justo (10):
status: fix branch shown when not only bisecting
branch: clarify <oldbranch> term
advice: sort the advice related lists
advice: fix an unexpected leading space
branch: make the advice to force-deleting a conditional one
advice: allow disabling the automatic hint in advise_if_enabled()
t5332: mark as leak-free
t6113: mark as leak-free
test-lib: check for TEST_PASSES_SANITIZE_LEAK
t0080: mark as leak-free
Sam Delmerico (1):
push: region_leave trace for negotiate_using_fetch
Shreyansh Paliwal (1):
test-lib-functions.sh: fix test_grep fail message wording
Simon Ser (1):
format-patch: fix ignored encode_email_headers for cover letter
Stan Hu (2):
completion: refactor existence checks for pseudorefs
completion: support pseudoref existence checks for reftables
Sören Krecker (1):
mingw: give more details about unsafe directory's ownership
Tamino Bauknecht (1):
fetch: add new config option fetch.all
Taylor Blau (27):
pack-objects: free packing_data in more places
pack-bitmap-write: deep-clear the `bb_commit` slab
pack-bitmap: plug leak in find_objects()
midx: factor out `fill_pack_info()`
midx: implement `BTMP` chunk
midx: implement `midx_locate_pack()`
pack-bitmap: pass `bitmapped_pack` struct to pack-reuse functions
ewah: implement `bitmap_is_empty()`
pack-bitmap: simplify `reuse_partial_packfile_from_bitmap()` signature
pack-bitmap: return multiple packs via `reuse_partial_packfile_from_bitmap()`
pack-objects: parameterize pack-reuse routines over a single pack
pack-objects: keep track of `pack_start` for each reuse pack
pack-objects: pass `bitmapped_pack`'s to pack-reuse functions
pack-objects: prepare `write_reused_pack()` for multi-pack reuse
pack-objects: prepare `write_reused_pack_verbatim()` for multi-pack reuse
pack-objects: include number of packs reused in output
git-compat-util.h: implement checked size_t to uint32_t conversion
midx: implement `midx_preferred_pack()`
pack-revindex: factor out `midx_key_to_pack_pos()` helper
pack-revindex: implement `midx_pair_to_pack_pos()`
pack-bitmap: prepare to mark objects from multiple packs for reuse
pack-objects: add tracing for various packfile metrics
t/test-lib-functions.sh: implement `test_trace2_data` helper
pack-objects: allow setting `pack.allowPackReuse` to "single"
pack-bitmap: enable reuse from all bitmapped packs
t/perf: add performance tests for multi-pack reuse
pack-bitmap: drop unused `reuse_objects`
Todd Zullinger (2):
perl: bump the required Perl version to 5.8.1 from 5.8.0
send-email: avoid duplicate specification warnings
Toon Claes (1):
builtin/show-ref: treat directory as non-existing in --exists
Victoria Dye (14):
ref-filter.c: really don't sort when using --no-sort
ref-filter.h: add max_count and omit_empty to ref_format
ref-filter.h: move contains caches into filter
ref-filter.h: add functions for filter/format & format-only
ref-filter.c: rename 'ref_filter_handler()' to 'filter_one()'
ref-filter.c: refactor to create common helper functions
ref-filter.c: filter & format refs in the same callback
for-each-ref: clean up documentation of --format
ref-filter.c: use peeled tag for '*' format fields
t/perf: add perf tests for for-each-ref
submodule-config.h: move check_submodule_url
test-submodule: remove command line handling for check-name
t7450: test submodule urls
submodule-config.c: strengthen URL fsck check
Zach FettersMoore (1):
subtree: fix split processing with multiple subtrees present
^ permalink raw reply
* Re: Bug: Commit fails when no global email address is set even though --author is used
From: Junio C Hamano @ 2024-02-09 17:30 UTC (permalink / raw)
To: Kristoffer Haugsbakk; +Cc: Marcus Tillmanns, git@vger.kernel.org, Phillip Wood
In-Reply-To: <5c25da43-c886-41d2-b057-b95a84b107ba@app.fastmail.com>
"Kristoffer Haugsbakk" <code@khaugsbakk.name> writes:
> So when a user gets this error:
>
> ```
> Committer identity unknown
>
> *** Please tell me who you are.
> ```
>
> And have never heard of “committer” before… what is she to think? I
> think it’s very natural to conclude that “author” and “committer” are
> the same thing. So she thinks:
>
> “ Okay, so the program is complaining about the author not being
> set. (It calls it “committer” here for some reason.) But I have set
> the author…
>
> Maybe this is another case of: it all makes perfect sense if you already
> know all the concepts.
>
>>> Your report would have been more clear if you included the error:
>>
>> Had I had any idea that the report was different between with / without
>> —author I probably would have added it, or found out what the issue was.
>
> You don’t know what you don’t know. That’s why it’s best to include all
> context.
So, now, let's be productive. When somebody who does not know much
about Git tries to commit without configuring anything and hits the
error, what is a more appropriate message to guide who does not know
what he or she does not know?
The user claims that "committer identity unknown, please tell me who
you are" were not helpful enough. Would it make it more helpful if
we append how to "tell who they are" after that message, perhaps
with "git config" on user.email and user.name variables, or
something?
Or do we need three-way switch that does
if (neither is known) {
printf("neither author or committer is known");
} else if (author is known but committer is not known) {
printf("author is known but committer is not"):
} else if (author is not known but committer is known) {
printf("committer is known but author is not"):
} else {
return happy;
}
printf("please tell us who you are...");
perhaps?
^ permalink raw reply
* Re: Bug: Commit fails when no global email address is set even though --author is used
From: Kristoffer Haugsbakk @ 2024-02-09 17:38 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Marcus Tillmanns, git@vger.kernel.org, Phillip Wood
In-Reply-To: <xmqqfry1h7ej.fsf@gitster.g>
On Fri, Feb 9, 2024, at 18:30, Junio C Hamano wrote:
> So, now, let's be productive. When somebody who does not know much
> about Git tries to commit without configuring anything and hits the
> error, what is a more appropriate message to guide who does not know
> what he or she does not know?
>
> The user claims that "committer identity unknown, please tell me who
> you are" were not helpful enough. Would it make it more helpful if
> we append how to "tell who they are" after that message, perhaps
> with "git config" on user.email and user.name variables, or
> something?
>
> Or do we need three-way switch that does
>
> if (neither is known) {
> printf("neither author or committer is known");
> } else if (author is known but committer is not known) {
> printf("author is known but committer is not"):
> } else if (author is not known but committer is known) {
> printf("committer is known but author is not"):
> } else {
> return happy;
> }
>
> printf("please tell us who you are...");
>
> perhaps?
I think a three-way switch looks good. With the amendment that it steers
you towards `user.*` instead of setting both `author.*` and
`committer.*`.
Something like
• Author is set, not committer
• Message: author is set but not committer: you might want to set
*user* instead (prints suggested config)
I can try to make a patch later.
--
Kristoffer Haugsbakk
^ permalink raw reply
* Re: Race condition in git-bundle(1) create when ref is updated while running
From: Junio C Hamano @ 2024-02-09 17:39 UTC (permalink / raw)
To: Toon Claes; +Cc: git
In-Reply-To: <87eddlpx5k.fsf@iotcl.com>
Toon Claes <toon@iotcl.com> writes:
> I discovered a bug in git-bundle(1) create. There is a race condition
> happening when a ref gets updated while the bundle creation process is
> running.
"--all" that tells "traverse from the tip of all the refs" to any
rev-list family of commands (like log and bundle) eventually boils
down to opendir("refs/...") followed by readdir(), and if somebody
creates or deletes files while you are reading in such a loop,
readdir() may appear to skip an entry, which is understandable.
Even "git for-each-ref" would race with a ref update (which involves
removing a file and then creating another file at the same path), I
would think. IOW, I do not think this is limited to "git bundle".
^ permalink raw reply
* [PATCH] column: disallow negative padding
From: Kristoffer Haugsbakk @ 2024-02-09 17:52 UTC (permalink / raw)
To: git; +Cc: Kristoffer Haugsbakk, Tiago Pascoal
In-Reply-To: <AS8P189MB21977ACC4866D9836DA29082BC4B2@AS8P189MB2197.EURP189.PROD.OUTLOOK.COM>
A negative padding can cause some problems in the memory allocator:
• floating point exception
• data too large to fit into virtual memory space
• OOM
Disallow negative padding. Reuse a translation string from
`fast-import`.
Reported-by: Tiago Pascoal <tiago@pascoal.net>
Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>
---
builtin/column.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/builtin/column.c b/builtin/column.c
index e80218f81f9..82902d149c2 100644
--- a/builtin/column.c
+++ b/builtin/column.c
@@ -45,6 +45,8 @@ int cmd_column(int argc, const char **argv, const char *prefix)
memset(&copts, 0, sizeof(copts));
copts.padding = 1;
argc = parse_options(argc, argv, prefix, options, builtin_column_usage, 0);
+ if (copts.padding < 0)
+ die("%s: argument must be a non-negative integer", "padding");
if (argc)
usage_with_options(builtin_column_usage, options);
if (real_command || command) {
--
2.43.0
^ permalink raw reply related
* Re: git column fails (or crashes) if padding is negative
From: Junio C Hamano @ 2024-02-09 17:57 UTC (permalink / raw)
To: Kristoffer Haugsbakk; +Cc: Tiago Pascoal, git@vger.kernel.org
In-Reply-To: <571fb353-af1d-4cc9-a2c2-197296685623@app.fastmail.com>
"Kristoffer Haugsbakk" <code@khaugsbakk.name> writes:
> ```
> $ seq 1 24 | git column --mode=column --padding=-1
> 12345678910<binary?><numbers>
> $ seq 1 24 | git column --mode=column --padding=-3
> fatal: Data too large to fit into virtual memory space.
> $ seq 1 24 | git column --mode=column --padding=-5
> fatal: Out of memory, malloc failed (tried to allocate 18446744073709551614 bytes)
> ```
>
> This is an “Internal helper command” under the “plumbing” suite. And I
> get the impression that sometimes these fallthroughs are treated as
> “don’t do that”. But I don’t know.
If the nonsense input is easy to tell, then telling "don't feed
nonsense input" to the user while rejecting such nonsense input
would be a good idea.
> On the other hand it failing inside malloc looks weird. Why not catch
> this before the malloc call is made?
Presumably, the parameter we prepare before calling malloc() is of
unsigned type, and feeding a negative value to such a callchain
would cast it to a large unsigned value?
Indeed, whereever cops.padding is referenced in column.c, it clearly
is assumed that it is a non-negative value. *width accumulates the
width of data items plus padding, and it also is used to divide some
number to arrive at the number of columns, so by tweaking the padding
to the right value, you probably should be able to cause division by
zero, too, in column.c:layout().
Hopefully the attached would be a good place to start (I am not
going to finish it with log message, tests, and fixes to other
places).
builtin/column.c | 2 ++
column.c | 4 ++--
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git c/builtin/column.c w/builtin/column.c
index e80218f81f..8537d09d2b 100644
--- c/builtin/column.c
+++ w/builtin/column.c
@@ -45,6 +45,8 @@ int cmd_column(int argc, const char **argv, const char *prefix)
memset(&copts, 0, sizeof(copts));
copts.padding = 1;
argc = parse_options(argc, argv, prefix, options, builtin_column_usage, 0);
+ if (copts.padding < 0)
+ die(_("--padding must be non-negative"));
if (argc)
usage_with_options(builtin_column_usage, options);
if (real_command || command) {
diff --git c/column.c w/column.c
index ff2f0abf39..9cc703832a 100644
--- c/column.c
+++ w/column.c
@@ -189,7 +189,7 @@ void print_columns(const struct string_list *list, unsigned int colopts,
memset(&nopts, 0, sizeof(nopts));
nopts.indent = opts && opts->indent ? opts->indent : "";
nopts.nl = opts && opts->nl ? opts->nl : "\n";
- nopts.padding = opts ? opts->padding : 1;
+ nopts.padding = (opts && 0 < opts->padding) ? opts->padding : 1;
nopts.width = opts && opts->width ? opts->width : term_columns() - 1;
if (!column_active(colopts)) {
display_plain(list, "", "\n");
@@ -373,7 +373,7 @@ int run_column_filter(int colopts, const struct column_options *opts)
strvec_pushf(argv, "--width=%d", opts->width);
if (opts && opts->indent)
strvec_pushf(argv, "--indent=%s", opts->indent);
- if (opts && opts->padding)
+ if (opts && 0 < opts->padding)
strvec_pushf(argv, "--padding=%d", opts->padding);
fflush(stdout);
^ permalink raw reply related
* Re: [PATCH v2] prune: mark rebase autostash and orig-head as reachable
From: Junio C Hamano @ 2024-02-09 18:04 UTC (permalink / raw)
To: Phillip Wood via GitGitGadget
Cc: git, Orgad Shaneh, Eric Sunshine, Phillip Wood
In-Reply-To: <pull.1656.v2.git.1707495579886.gitgitgadget@gmail.com>
"Phillip Wood via GitGitGadget" <gitgitgadget@gmail.com> writes:
> +static void add_rebase_files(struct rev_info *revs)
> +{
> + struct strbuf buf = STRBUF_INIT;
> + size_t len;
> + const char *path[] = {
> + "rebase-apply/autostash",
> + "rebase-apply/orig-head",
> + "rebase-merge/autostash",
> + "rebase-merge/orig-head",
> + };
Yuck.
Having this table here makes the sequencer subsystem even less
maintainable than it already is. I wonder if we can at least
somehow share some of these? #leftoverbits.
Thanks.
^ permalink raw reply
* Re: [PATCH] column: disallow negative padding
From: Kristoffer Haugsbakk @ 2024-02-09 18:26 UTC (permalink / raw)
To: git; +Cc: Tiago Pascoal
In-Reply-To: <76688ed2cc20031d70823d9f5d214f42b3bd1409.1707501064.git.code@khaugsbakk.name>
I forgot tests.
--
Kristoffer
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox