+
Skip to content

[pull] master from gitster:master #194

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 25 commits into from
Jul 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
96e5b72
docs: link OpenSSL's verify(1) manual page to know about -CAfile and …
AdityaGarg8 Jun 30, 2025
a717ef1
docs: add outlookidfix config option to sendemail documentation
AdityaGarg8 Jun 30, 2025
18617b2
docs: add an OAuth2.0 credential helper for AOL accounts
AdityaGarg8 Jun 30, 2025
95ce81f
docs: add a paragraph explaining the `sendmailCmd` option of sendemail
AdityaGarg8 Jun 30, 2025
ac1a32e
docs: mention possible options for Proton Mail users
AdityaGarg8 Jun 30, 2025
cc7dc40
fetch-prune: optimize dangling-ref reporting
phord Jul 2, 2025
0f84695
refs: remove old refs_warn_dangling_symref
phord Jul 2, 2025
87d8d8c
clean up interface for refs_warn_dangling_symrefs
phord Jul 2, 2025
ad7780b
docs/git-pack-refs: document heuristic used for packing loose refs
pks-t Jul 8, 2025
a3a7f20
refs/files: remove empty parent dirs when ref creation fails
pks-t Jul 8, 2025
52d0c32
t1006: fix broken TAP format
pks-t Jul 8, 2025
369e6d9
parse-options: require PARSE_OPT_NOARG for OPTION_BITOP
rscharfe Jul 9, 2025
0d3e045
parse-options: add precision handling for PARSE_OPT_CMDMODE
rscharfe Jul 9, 2025
c898bbc
parse-options: add precision handling for OPTION_SET_INT
rscharfe Jul 9, 2025
5228211
parse-options: add precision handling for OPTION_BIT
rscharfe Jul 9, 2025
feeebbf
parse-options: add precision handling for OPTION_NEGBIT
rscharfe Jul 9, 2025
1d918bf
parse-options: add precision handling for OPTION_BITOP
rscharfe Jul 9, 2025
c1e616c
parse-options: add precision handling for OPTION_COUNTUP
rscharfe Jul 9, 2025
7b625c2
Merge branch 'ph/fetch-prune-optim'
gitster Jul 16, 2025
362f695
Merge branch 'ps/t1006-tap-fix'
gitster Jul 16, 2025
ac5fd29
Merge branch 'ps/refs-files-remove-empty-parent'
gitster Jul 16, 2025
edb4fd9
Merge branch 'ps/doc-pack-refs-auto-with-files-backend-fix'
gitster Jul 16, 2025
0fd2a2e
Merge branch 'rs/parse-options-precision'
gitster Jul 16, 2025
fe6fb09
Merge branch 'ag/doc-send-email'
gitster Jul 16, 2025
90c0775
The eleventh batch
gitster Jul 16, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions Documentation/RelNotes/2.51.0.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ Performance, Internal Implementation, Development Support etc.

* Code clean-up around object access API.

* Define .precision to more canned parse-options type to avoid bugs
coming from using a variable with a wrong type to capture the
parsed values.


Fixes since v2.50
-----------------
Expand Down Expand Up @@ -166,6 +170,14 @@ including security updates, are included in this release.
* Leakfix with a new and a bit invasive test on pack-bitmap files.
(merge bfd5522e98 ly/load-bitmap-leakfix later to maint).

* "git fetch --prune" used to be O(n^2) expensive when there are many
refs, which has been corrected.
(merge 87d8d8c5d0 ph/fetch-prune-optim later to maint).

* When a ref creation at refs/heads/foo/bar fails, the files backend
now removes refs/heads/foo/ if the directory is otherwise not used.
(merge a3a7f20516 ps/refs-files-remove-empty-parent later to maint).

* Other code cleanup, docfix, build fix, etc.
(merge b257adb571 lo/my-first-ow-doc-update later to maint).
(merge 8b34b6a220 ly/sequencer-update-squash-is-fixup-only later to maint).
Expand All @@ -188,3 +200,4 @@ including security updates, are included in this release.
(merge de404249ab ps/perlless-test-fixes later to maint).
(merge 953049eed8 ts/merge-orig-head-doc-fix later to maint).
(merge 0c83bbc704 rj/freebsd-sysinfo-build-fix later to maint).
(merge ad7780b38f ps/doc-pack-refs-auto-with-files-backend-fix later to maint).
9 changes: 7 additions & 2 deletions Documentation/config/sendemail.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ sendemail.confirm::
values.

sendemail.mailmap::
If true, makes linkgit:git-send-email[1] assume `--mailmap`,
otherwise assume `--no-mailmap`. False by default.
If `true`, makes linkgit:git-send-email[1] assume `--mailmap`,
otherwise assume `--no-mailmap`. `False` by default.

sendemail.mailmap.file::
The location of a linkgit:git-send-email[1] specific augmenting
Expand Down Expand Up @@ -96,6 +96,11 @@ sendemail.xmailer::
linkgit:git-send-email[1] command-line options. See its
documentation for details.

sendemail.outlookidfix::
If `true`, makes linkgit:git-send-email[1] assume `--outlook-id-fix`,
and if `false` assume `--no-outlook-id-fix`. If not specified, it will
behave the same way as if `--outlook-id-fix` is not specified.

sendemail.signedOffCc (deprecated)::
Deprecated alias for `sendemail.signedOffByCc`.

Expand Down
5 changes: 4 additions & 1 deletion Documentation/git-pack-refs.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,10 @@ Pack refs as needed depending on the current state of the ref database. The
behavior depends on the ref format used by the repository and may change in the
future.
+
- "files": No special handling for `--auto` has been implemented.
- "files": Loose references are packed into the `packed-refs` file
based on the ratio of loose references to the size of the
`packed-refs` file. The bigger the `packed-refs` file, the more loose
references need to exist before we repack.
+
- "reftable": Tables are compacted such that they form a geometric
sequence. For two tables N and N+1, where N+1 is newer, this
Expand Down
54 changes: 48 additions & 6 deletions Documentation/git-send-email.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -280,12 +280,14 @@ must be used for each option.
Path to a store of trusted CA certificates for SMTP SSL/TLS
certificate validation (either a directory that has been processed
by `c_rehash`, or a single file containing one or more PEM format
certificates concatenated together: see verify(1) -CAfile and
-CApath for more information on these). Set it to an empty string
to disable certificate verification. Defaults to the value of the
`sendemail.smtpSSLCertPath` configuration variable, if set, or the
backing SSL library's compiled-in default otherwise (which should
be the best choice on most platforms).
certificates concatenated together: see the description of the
`-CAfile` _<file>_ and the `-CApath` _<dir>_ options of
https://docs.openssl.org/master/man1/openssl-verify/
[OpenSSL's verify(1) manual page] for more information on these).
Set it to an empty string to disable certificate verification.
Defaults to the value of the `sendemail.smtpSSLCertPath` configuration
variable, if set, or the backing SSL library's compiled-in default
otherwise (which should be the best choice on most platforms).

--smtp-user=<user>::
Username for SMTP-AUTH. Default is the value of `sendemail.smtpUser`;
Expand Down Expand Up @@ -598,9 +600,20 @@ available online. Community maintained credential helpers are also available:
- https://github.com/AdityaGarg8/git-credential-email[git-credential-yahoo]
(cross platform, dedicated helper for authenticating Yahoo accounts)

- https://github.com/AdityaGarg8/git-credential-email[git-credential-aol]
(cross platform, dedicated helper for authenticating AOL accounts)

You can also see linkgit:gitcredentials[7] for more OAuth based authentication
helpers.

Proton Mail does not provide an SMTP server to send emails. If you are a paid
customer of Proton Mail, you can use
https://proton.me/mail/bridge[Proton Mail Bridge]
officially provided by Proton Mail to create a local SMTP server for sending
emails. For both free and paid users, community maintained projects like
https://github.com/AdityaGarg8/git-credential-email[git-protonmail] can be
used.

Note: the following core Perl modules that may be installed with your
distribution of Perl are required:

Expand All @@ -614,6 +627,35 @@ These additional Perl modules are also required:
https://metacpan.org/pod/Authen::SASL[Authen::SASL] and
https://metacpan.org/pod/Mail::Address[Mail::Address].

Exploiting the `sendmailCmd` option of `git send-email`
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Apart from sending emails via an SMTP server, `git send-email` can also send
emails through any application that supports sendmail-like commands. You can
read documentation of `--sendmail-cmd=<command>` above for more information.
This ability can be very useful if you want to use another application as an
SMTP client for `git send-email`, or if your email provider uses proprietary
APIs instead of SMTP to send emails.

As an example, lets see how to configure https://marlam.de/msmtp/[msmtp], a
popular SMTP client found in many Linux distributions. Edit `~/.gitconfig`
to instruct `git-send-email` to use it for sending emails.

----
[sendemail]
sendmailCmd = /usr/bin/msmtp # Change this to the path where msmtp is installed
----

Links of a few such community maintained helpers are:

- https://marlam.de/msmtp/[msmtp]
(popular SMTP client with many features, available for Linux and macOS)

- https://github.com/AdityaGarg8/git-credential-email[git-protonmail]
(cross platform client that can send emails using the ProtonMail API)

- https://github.com/AdityaGarg8/git-credential-email[git-msgraph]
(cross platform client that can send emails using the Microsoft Graph API)

SEE ALSO
--------
Expand Down
1 change: 1 addition & 0 deletions builtin/am.c
Original file line number Diff line number Diff line change
Expand Up @@ -2406,6 +2406,7 @@ int cmd_am(int argc,
.type = OPTION_CALLBACK,
.long_name = "show-current-patch",
.value = &resume_mode,
.precision = sizeof(resume_mode),
.argh = "(diff|raw)",
.help = N_("show the patch being applied"),
.flags = PARSE_OPT_CMDMODE | PARSE_OPT_OPTARG | PARSE_OPT_NONEG | PARSE_OPT_LITERAL_ARGHELP,
Expand Down
19 changes: 8 additions & 11 deletions builtin/fetch.c
Original file line number Diff line number Diff line change
Expand Up @@ -1340,9 +1340,10 @@ static int prune_refs(struct display_state *display_state,
int result = 0;
struct ref *ref, *stale_refs = get_stale_heads(rs, ref_map);
struct strbuf err = STRBUF_INIT;
const char *dangling_msg = dry_run
? _(" (%s will become dangling)")
: _(" (%s has become dangling)");
struct string_list refnames = STRING_LIST_INIT_NODUP;

for (ref = stale_refs; ref; ref = ref->next)
string_list_append(&refnames, ref->name);

if (!dry_run) {
if (transaction) {
Expand All @@ -1353,15 +1354,9 @@ static int prune_refs(struct display_state *display_state,
goto cleanup;
}
} else {
struct string_list refnames = STRING_LIST_INIT_NODUP;

for (ref = stale_refs; ref; ref = ref->next)
string_list_append(&refnames, ref->name);

result = refs_delete_refs(get_main_ref_store(the_repository),
"fetch: prune", &refnames,
0);
string_list_clear(&refnames, 0);
}
}

Expand All @@ -1373,12 +1368,14 @@ static int prune_refs(struct display_state *display_state,
_("(none)"), ref->name,
&ref->new_oid, &ref->old_oid,
summary_width);
refs_warn_dangling_symref(get_main_ref_store(the_repository),
stderr, dangling_msg, ref->name);
}
string_list_sort(&refnames);
refs_warn_dangling_symrefs(get_main_ref_store(the_repository),
stderr, " ", dry_run, &refnames);
}

cleanup:
string_list_clear(&refnames, 0);
strbuf_release(&err);
free_refs(stale_refs);
return result;
Expand Down
1 change: 1 addition & 0 deletions builtin/rebase.c
Original file line number Diff line number Diff line change
Expand Up @@ -1128,6 +1128,7 @@ int cmd_rebase(int argc,
.short_name = 'n',
.long_name = "no-stat",
.value = &options.flags,
.precision = sizeof(options.flags),
.help = N_("do not show diffstat of what changed upstream"),
.flags = PARSE_OPT_NOARG,
.defval = REBASE_DIFFSTAT,
Expand Down
5 changes: 1 addition & 4 deletions builtin/remote.c
Original file line number Diff line number Diff line change
Expand Up @@ -1521,9 +1521,6 @@ static int prune_remote(const char *remote, int dry_run)
struct ref_states states = REF_STATES_INIT;
struct string_list refs_to_prune = STRING_LIST_INIT_NODUP;
struct string_list_item *item;
const char *dangling_msg = dry_run
? _(" %s will become dangling!")
: _(" %s has become dangling!");

get_remote_ref_states(remote, &states, GET_REF_STATES);

Expand Down Expand Up @@ -1555,7 +1552,7 @@ static int prune_remote(const char *remote, int dry_run)
}

refs_warn_dangling_symrefs(get_main_ref_store(the_repository),
stdout, dangling_msg, &refs_to_prune);
stdout, " ", dry_run, &refs_to_prune);

string_list_clear(&refs_to_prune, 0);
free_remote_ref_states(&states);
Expand Down
6 changes: 6 additions & 0 deletions builtin/update-index.c
Original file line number Diff line number Diff line change
Expand Up @@ -981,6 +981,7 @@ int cmd_update_index(int argc,
.type = OPTION_SET_INT,
.long_name = "assume-unchanged",
.value = &mark_valid_only,
.precision = sizeof(mark_valid_only),
.help = N_("mark files as \"not changing\""),
.flags = PARSE_OPT_NOARG | PARSE_OPT_NONEG,
.defval = MARK_FLAG,
Expand All @@ -989,6 +990,7 @@ int cmd_update_index(int argc,
.type = OPTION_SET_INT,
.long_name = "no-assume-unchanged",
.value = &mark_valid_only,
.precision = sizeof(mark_valid_only),
.help = N_("clear assumed-unchanged bit"),
.flags = PARSE_OPT_NOARG | PARSE_OPT_NONEG,
.defval = UNMARK_FLAG,
Expand All @@ -997,6 +999,7 @@ int cmd_update_index(int argc,
.type = OPTION_SET_INT,
.long_name = "skip-worktree",
.value = &mark_skip_worktree_only,
.precision = sizeof(mark_skip_worktree_only),
.help = N_("mark files as \"index-only\""),
.flags = PARSE_OPT_NOARG | PARSE_OPT_NONEG,
.defval = MARK_FLAG,
Expand All @@ -1005,6 +1008,7 @@ int cmd_update_index(int argc,
.type = OPTION_SET_INT,
.long_name = "no-skip-worktree",
.value = &mark_skip_worktree_only,
.precision = sizeof(mark_skip_worktree_only),
.help = N_("clear skip-worktree bit"),
.flags = PARSE_OPT_NOARG | PARSE_OPT_NONEG,
.defval = UNMARK_FLAG,
Expand Down Expand Up @@ -1079,6 +1083,7 @@ int cmd_update_index(int argc,
.type = OPTION_SET_INT,
.long_name = "fsmonitor-valid",
.value = &mark_fsmonitor_only,
.precision = sizeof(mark_fsmonitor_only),
.help = N_("mark files as fsmonitor valid"),
.flags = PARSE_OPT_NOARG | PARSE_OPT_NONEG,
.defval = MARK_FLAG,
Expand All @@ -1087,6 +1092,7 @@ int cmd_update_index(int argc,
.type = OPTION_SET_INT,
.long_name = "no-fsmonitor-valid",
.value = &mark_fsmonitor_only,
.precision = sizeof(mark_fsmonitor_only),
.help = N_("clear fsmonitor valid bit"),
.flags = PARSE_OPT_NOARG | PARSE_OPT_NONEG,
.defval = UNMARK_FLAG,
Expand Down
1 change: 1 addition & 0 deletions builtin/write-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ int cmd_write_tree(int argc,
.type = OPTION_BIT,
.long_name = "ignore-cache-tree",
.value = &flags,
.precision = sizeof(flags),
.help = N_("only useful for debugging"),
.flags = PARSE_OPT_HIDDEN | PARSE_OPT_NOARG,
.defval = WRITE_TREE_IGNORE_CACHE_TREE,
Expand Down
Loading
Loading
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载