Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
a8f959c
contrib: remove "remotes2config.sh"
pks-t May 12, 2025
6672b90
contrib: remove "examples" directory
pks-t May 12, 2025
9a5e587
contrib: remove remote-helper stubs
pks-t May 12, 2025
5e16d46
contrib: remove "thunderbird-patch-inline"
pks-t May 12, 2025
9a19b79
contrib: remove "hooks" directory
pks-t May 12, 2025
21b4f90
contrib: remove "mw-to-git"
pks-t May 12, 2025
1248fb0
contrib: remove "persistent-https" remote helper
pks-t May 12, 2025
bb9a929
contrib: remove "git-resurrect.sh"
pks-t May 12, 2025
95bc447
contrib: remove "emacs" directory
pks-t May 12, 2025
15405cd
contrib: remove "git-new-workdir"
pks-t May 12, 2025
af2a4b3
contrib: remove some scripts in "stats" directory
pks-t May 12, 2025
44ba4b0
imap-send: fix bug causing cfg->folder being set to NULL
AdityaGarg8 Jun 20, 2025
ac4e02c
imap-send: fix memory leak in case auth_cram_md5 fails
AdityaGarg8 Jun 20, 2025
b9e7666
imap-send: gracefully fail if CRAM-MD5 authentication is requested wi…
AdityaGarg8 Jun 20, 2025
103d7b1
imap-send: add support for OAuth2.0 authentication
AdityaGarg8 Jun 20, 2025
ea8681e
imap-send: add PLAIN authentication method to OpenSSL
AdityaGarg8 Jun 20, 2025
3168514
imap-send: enable specifying the folder using the command line
AdityaGarg8 Jun 20, 2025
067a91b
imap-send: add ability to list the available folders
AdityaGarg8 Jun 20, 2025
2dacd35
imap-send: display port alongwith host when git credential is invoked
AdityaGarg8 Jun 20, 2025
bf22c37
imap-send: display the destination mailbox when sending a message
AdityaGarg8 Jun 20, 2025
5ec81b3
imap-send: fix minor mistakes in the logs
AdityaGarg8 Jun 20, 2025
0ed16dc
Merge branch 'ag/imap-send-resurrection' into jt/imap-send-message-fix
gitster Jun 20, 2025
1d304ce
imap-send: fix confusing 'store' terminology in error message
Mic92 Jun 20, 2025
d30bf28
imap-send: improve error messages with configuration hints
Mic92 Jun 20, 2025
e6c3028
Merge branch 'ag/imap-send-resurrection'
gitster Jul 2, 2025
94c9350
Merge branch 'ps/contrib-sweep'
gitster Jul 2, 2025
41d0310
Merge branch 'jt/imap-send-message-fix'
gitster Jul 2, 2025
8b6f19c
The sixth batch
gitster Jul 2, 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
7 changes: 7 additions & 0 deletions Documentation/RelNotes/2.51.0.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ UI, Workflows & Features
use the compact-summary format, intead of diffstat, when showing
the summary of the incoming changes.

* "git imap-send" has been broken for a long time, which has been
resurrected and then taught to talk OAuth2.0 etc.

* Some error messages from "git imap-send" has been updated.


Performance, Internal Implementation, Development Support etc.
--------------------------------------------------------------
Expand All @@ -51,6 +56,8 @@ Performance, Internal Implementation, Development Support etc.
* A test helper "test_seq" function learned the "-f <fmt>" option,
which allowed us to simplify a lot of test scripts.

* A lot of stale stuff has been removed from the contrib/ hierarchy.


Fixes since v2.50
-----------------
Expand Down
11 changes: 7 additions & 4 deletions Documentation/config/imap.adoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
imap.folder::
The folder to drop the mails into, which is typically the Drafts
folder. For example: "INBOX.Drafts", "INBOX/Drafts" or
"[Gmail]/Drafts". Required.
folder. For example: `INBOX.Drafts`, `INBOX/Drafts` or
`[Gmail]/Drafts`. The IMAP folder to interact with MUST be specified;
the value of this configuration variable is used as the fallback
default value when the `--folder` option is not given.

imap.tunnel::
Command used to set up a tunnel to the IMAP server through which
Expand Down Expand Up @@ -40,5 +42,6 @@ imap.authMethod::
Specify the authentication method for authenticating with the IMAP server.
If Git was built with the NO_CURL option, or if your curl version is older
than 7.34.0, or if you're running git-imap-send with the `--no-curl`
option, the only supported method is 'CRAM-MD5'. If this is not set
then 'git imap-send' uses the basic IMAP plaintext LOGIN command.
option, the only supported methods are `PLAIN`, `CRAM-MD5`, `OAUTHBEARER`
and `XOAUTH2`. If this is not set then `git imap-send` uses the basic IMAP
plaintext `LOGIN` command.
68 changes: 59 additions & 9 deletions Documentation/git-imap-send.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,24 @@ git-imap-send - Send a collection of patches from stdin to an IMAP folder
SYNOPSIS
--------
[verse]
'git imap-send' [-v] [-q] [--[no-]curl]
'git imap-send' [-v] [-q] [--[no-]curl] [(--folder|-f) <folder>]
'git imap-send' --list


DESCRIPTION
-----------
This command uploads a mailbox generated with 'git format-patch'
This command uploads a mailbox generated with `git format-patch`
into an IMAP drafts folder. This allows patches to be sent as
other email is when using mail clients that cannot read mailbox
files directly. The command also works with any general mailbox
in which emails have the fields "From", "Date", and "Subject" in
in which emails have the fields `From`, `Date`, and `Subject` in
that order.

Typical usage is something like:

git format-patch --signoff --stdout --attach origin | git imap-send
------
$ git format-patch --signoff --stdout --attach origin | git imap-send
------


OPTIONS
Expand All @@ -37,6 +40,11 @@ OPTIONS
--quiet::
Be quiet.

-f <folder>::
--folder=<folder>::
Specify the folder in which the emails have to saved.
For example: `--folder=[Gmail]/Drafts` or `-f INBOX/Drafts`.

--curl::
Use libcurl to communicate with the IMAP server, unless tunneling
into it. Ignored if Git was built without the USE_CURL_FOR_IMAP_SEND
Expand All @@ -47,6 +55,8 @@ OPTIONS
using libcurl. Ignored if Git was built with the NO_OPENSSL option
set.

--list::
Run the IMAP LIST command to output a list of all the folders present.

CONFIGURATION
-------------
Expand Down Expand Up @@ -102,20 +112,56 @@ Using Gmail's IMAP interface:

---------
[imap]
folder = "[Gmail]/Drafts"
host = imaps://imap.gmail.com
user = user@gmail.com
port = 993
folder = "[Gmail]/Drafts"
host = imaps://imap.gmail.com
user = user@gmail.com
port = 993
---------

Gmail does not allow using your regular password for `git imap-send`.
If you have multi-factor authentication set up on your Gmail account, you
can generate an app-specific password for use with `git imap-send`.
Visit https://security.google.com/settings/security/apppasswords to create
it. Alternatively, use OAuth2.0 authentication as described below.

[NOTE]
You might need to instead use: `folder = "[Google Mail]/Drafts"` if you get an error
that the "Folder doesn't exist".
that the "Folder doesn't exist". You can also run `git imap-send --list` to get a
list of available folders.

[NOTE]
If your Gmail account is set to another language than English, the name of the "Drafts"
folder will be localized.

If you want to use OAuth2.0 based authentication, you can specify
`OAUTHBEARER` or `XOAUTH2` mechanism in your config. It is more secure
than using app-specific passwords, and also does not enforce the need of
having multi-factor authentication. You will have to use an OAuth2.0
access token in place of your password when using this authentication.

---------
[imap]
folder = "[Gmail]/Drafts"
host = imaps://imap.gmail.com
user = user@gmail.com
port = 993
authmethod = OAUTHBEARER
---------

Using Outlook's IMAP interface:

Unlike Gmail, Outlook only supports OAuth2.0 based authentication. Also, it
supports only `XOAUTH2` as the mechanism.

---------
[imap]
folder = "Drafts"
host = imaps://outlook.office365.com
user = user@outlook.com
port = 993
authmethod = XOAUTH2
---------

Once the commits are ready to be sent, run the following command:

$ git format-patch --cover-letter -M --stdout origin/master | git imap-send
Expand All @@ -124,6 +170,10 @@ Just make sure to disable line wrapping in the email client (Gmail's web
interface will wrap lines no matter what, so you need to use a real
IMAP client).

In case you are using OAuth2.0 authentication, it is easier to use credential
helpers to generate tokens. Credential helpers suggested in
linkgit:git-send-email[1] can be used for `git imap-send` as well.

CAUTION
-------
It is still your responsibility to make sure that the email message
Expand Down
33 changes: 0 additions & 33 deletions contrib/emacs/README

This file was deleted.

6 changes: 0 additions & 6 deletions contrib/emacs/git-blame.el

This file was deleted.

6 changes: 0 additions & 6 deletions contrib/emacs/git.el

This file was deleted.

20 changes: 0 additions & 20 deletions contrib/examples/README

This file was deleted.

Loading