git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Uses git-credential for git-imap-send

From
Jeff King <peff@peff.net>
Date
Apr 27, 2014, 07:51 UTC
Message-ID
<20140427075110.GA19976@sigill.intra.peff.net>
In-Reply-To
<CAFVaGhuXvZhRCHRFurKNOC4tsiQ7WZnGb2CbRnoSSYg=XknJtg@mail.gmail.com>
On Sat, Apr 26, 2014 at 11:30:11AM -0700, Dan Albert wrote:
> I had resent a less broken patch after I noticed the tabs, but it seems to
> have gotten lost. Better formatted patch at the bottom of this message.

Your emails (including this one) are multipart/alternatives with an html part, which will cause the mailing list software to reject them.

This email also still seems whitespace-damaged to me (the leading tabs are collapsed to a single space).

It looks like you're using gmail to send; you might try using "git send-email" (the example at the end of "git help send-email" can walk you through it).

Show 6 quoted lines
> About imap vs. imaps: I actually had your exact line in before, but decided
> that as long as its for the same host the user probably wants to use the
> same credentials for both imap and imaps (if they for some reason had both
> configured). Hard coding "imap" allows them to use either protocol with
> only one keychain entry. The use case is a stretch, but it doesn't do any
> harm to implement it this way.
My concerns with conflating the two are:
  1. The system helper might care about the distinction and prefer imaps
     (e.g., it might already have the credential stored for your regular
     mail client, which uses imaps). But osxkeychain is the only helper
     that makes the distinction, and I don't really know how OS X's
     keychain code handles the distinction.
  2. With http and https, we are careful to make the distinction,
     because we would not want to accidentally share a credential over http
     that was stored via https. But it's pretty easy to use an http URL
     rather than an https one. It's probably pretty rare to accidentally
     turn off imap SSL.

So I'd be OK with leaving it as "imap" for now, and waiting for somebody to actually come up with a real case where the distinction matters.

Show 15 quoted lines
> ---
> 
> Uses git-credential for git-imap-send
> 
> git-imap-send was directly prompting for a password rather than using
> git-credential. git-send-email, on the other hand, supports git-credential.
> 
> This is a necessary improvement for users that use two factor
> authentication, as
> they should not be expected to remember all of their app specific passwords.
> 
> Signed-off-by: Dan Albert <danalbert@google.com>
> ---
>  imap-send.c | 29 +++++++++++++++--------------
>  1 file changed, 15 insertions(+), 14 deletions(-)

A side note on formatting your commit message: The maintainer picks up patches from the list with "git am", which will take everything up to the first "---" as the commit message, and discard everything after up to the start of the diff. So in this case it would take your cover-letter material as the commit message, and drop your actual commit message.

The usual formats are either to put the cover letter material after the "---", like:

  $COMMIT_MESSAGE
  Signed-off-by: You
  ---
  $COVER_LETTER
  $DIFFSTAT
  $DIFF
or to use a scissors-line "-- >8 --" instead of three-dash:
  $COVER_LETTER
  -- >8 --
  $COMMIT_MESSAGE
  ---
  $DIFFSTAT
  $DIFF
-Peff
Previous: Junio C Hamano
Message 8 of 8 in “Uses git-credential for git-imap-send”
  1. Uses git-credential for git-imap-sendDan Albert, Apr 26, 2014
  2. Jeff KingApr 26, 2014
  3. Uses git-credential for git-imap-sendDan Albert, Apr 27, 2014
  4. Jeff KingApr 28, 2014
  5. Uses git-credential for git-imap-sendDan Albert, Apr 29, 2014
  6. Jeff KingApr 29, 2014
  7. Junio C HamanoApr 29, 2014
  8. Jeff KingApr 27, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.