All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ted Zlatanov <tzz@lifelogs.com>
To: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
Cc: Junio C Hamano <gitster@pobox.com>, Jeff King <peff@peff.net>,
	Michal Nazarewicz <mpn@google.com>,
	git@vger.kernel.org, Krzysztof Mazur <krzysiek@podlesie.net>,
	Michal Nazarewicz <mina86@mina86.com>
Subject: Re: [PATCH] git-send-email: add ~/.authinfo parsing
Date: Wed, 06 Feb 2013 10:58:13 -0500	[thread overview]
Message-ID: <87sj59mo2y.fsf@lifelogs.com> (raw)
In-Reply-To: <vpqmwvhxyuj.fsf@grenoble-inp.fr> (Matthieu Moy's message of "Wed, 06 Feb 2013 16:10:12 +0100")

On Wed, 06 Feb 2013 16:10:12 +0100 Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> wrote: 

MM> Ted Zlatanov <tzz@lifelogs.com> writes:
MM> [...] so the way to go for send-email is probably to libify the
MM> credential support in git-remote-mediawiki, and to use it in send-email.
>> 
>> I looked and that's indeed very useful.  If it's put in a library, I'd
>> use credential_read() and credential_write() in my netrc credential
>> helper.  But I would formalize it a little more about the token names
>> and output,

MM> Can you elaborate on this? The idea of the Perl code was to mimick a
MM> call to the C API, keeping essentially the same names.

None of these are a big deal, and Michal said he's working on libifying
this anyhow:

- making 'fill' a special operation is weird
- anchor the key regex to beginning of line (not strictly necessary)
- sort the output tokens (after 'url' is extracted) so the output is consistent and testable

>> and I wouldn't necessarily die() on error. 

MM> Sure, die()ing in a library is bad.

>> Maybe this can be merged with the netrc credential helper's
>> read_credential_data_from_stdin() and print_credential_data()?

MM> I don't know about the netrc credential helper, but I guess that's
MM> another layer. The git-remote-mediawiki code is the code to call the
MM> credential C API, that in turn may (or may not) call a credential
MM> helper.

Yup.  But what you call "read" and "write" are, to the credential
helper, "write" and "read" but it's the same protocol :)  So maybe the
names should be changed to reflect that, e.g. "query" and "response."

MM> One thing to be careful about: git-remote-mediawiki is currently a
MM> standalone script, so it can be installed with a plain "cp
MM> git-remote-mediawiki $somewhere/".  One consequence of libification
MM> is that it adds a dependency on the library (e.g. Git.pm). We should
MM> be carefull to keep it easy for the user to install it (e.g. some
MM> kind of "make install", or update the doc).

I don't know--it's up to the `git-remote-mediawiki' maintainers...  But
I think anywhere you have Git, you also have Git.pm, right?  Maybe?  But
then you also have to look at whether Git.pm has the functionality you
need... so I better go quiet :)

Ted

  reply	other threads:[~2013-02-06 15:58 UTC|newest]

Thread overview: 78+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-29 19:13 [PATCH] git-send-email: add ~/.authinfo parsing Michal Nazarewicz
2013-01-29 19:53 ` Junio C Hamano
2013-01-29 21:08   ` [PATCHv2] " Michal Nazarewicz
2013-01-29 22:38     ` Junio C Hamano
2013-01-30  0:03       ` [PATCHv3] " Michal Nazarewicz
2013-01-30  0:34         ` Junio C Hamano
2013-01-30  7:43   ` [PATCH] " Jeff King
2013-01-30 15:57     ` Junio C Hamano
2013-01-31 15:23       ` Ted Zlatanov
2013-01-31 19:38         ` Jeff King
2013-02-02 11:57           ` Ted Zlatanov
2013-02-03 19:41             ` Jeff King
2013-02-04 16:40               ` Ted Zlatanov
2013-02-04 16:42               ` [PATCH 1/3] Add contrib/credentials/netrc with GPG support Ted Zlatanov
2013-02-04 16:57                 ` Ted Zlatanov
2013-02-04 17:24                 ` Junio C Hamano
2013-02-04 18:33                   ` Ted Zlatanov
2013-02-04 19:06                     ` Junio C Hamano
2013-02-04 19:40                       ` Ted Zlatanov
2013-02-04 23:10                         ` Junio C Hamano
2013-02-06 15:10                           ` CodingGuidelines Perl amendment (was: [PATCH 1/3] Add contrib/credentials/netrc with GPG support) Ted Zlatanov
2013-02-06 16:29                             ` CodingGuidelines Perl amendment Junio C Hamano
2013-02-06 17:45                               ` demerphq
2013-02-06 18:08                                 ` Ted Zlatanov
2013-02-06 18:14                                 ` Junio C Hamano
2013-02-06 18:18                                   ` demerphq
2013-02-06 17:55                               ` [PATCH] Update CodingGuidelines for Perl 5 Ted Zlatanov
2013-02-06 18:05                               ` CodingGuidelines Perl amendment Ted Zlatanov
2013-02-06 18:16                                 ` Junio C Hamano
2013-02-06 18:27                                   ` Ted Zlatanov
2013-02-06 18:25                                 ` demerphq
2013-02-06 18:35                                   ` Ted Zlatanov
2013-02-06 18:44                                     ` demerphq
2013-02-06 18:54                                       ` Ted Zlatanov
2013-02-06 19:37                                         ` Junio C Hamano
2013-02-06 19:49                                           ` [PATCH v2] Update CodingGuidelines for Perl 5 Ted Zlatanov
2013-02-04 16:42               ` [PATCH 2/3] Skip blank and commented lines in contrib/credentials/netrc Ted Zlatanov
2013-02-04 16:43               ` [PATCH 3/3] Fix contrib/credentials/netrc minor issues: exit quietly; use 3-parameter open; etc Ted Zlatanov
2013-02-04 17:27                 ` Junio C Hamano
2013-02-04 18:41                   ` Ted Zlatanov
2013-02-04 16:33     ` [PATCH] git-send-email: add ~/.authinfo parsing Michal Nazarewicz
2013-02-04 17:00       ` Ted Zlatanov
2013-02-04 20:10         ` Jeff King
2013-02-04 20:28           ` Ted Zlatanov
2013-02-04 20:59             ` Jeff King
2013-02-04 21:08               ` Ted Zlatanov
2013-02-04 21:22                 ` Jeff King
2013-02-04 21:41                   ` Ted Zlatanov
2013-02-05 23:10     ` Junio C Hamano
2013-02-06  8:11       ` Matthieu Moy
2013-02-06 14:53         ` Ted Zlatanov
2013-02-06 15:10           ` Matthieu Moy
2013-02-06 15:58             ` Ted Zlatanov [this message]
2013-02-06 16:41               ` Matthieu Moy
2013-02-06 17:40                 ` Ted Zlatanov
2013-02-06 18:11                 ` [PATCH 0/4] Allow contrib/ to use Git's Makefile for perl code Matthieu Moy
2013-02-06 18:11                   ` [PATCH 1/4] Makefile: extract perl-related rules to make them available from other dirs Matthieu Moy
2013-02-07 19:16                     ` Junio C Hamano
2013-02-06 18:11                   ` [PATCH 2/4] perl.mak: introduce $(GIT_ROOT_DIR) to allow inclusion from other directories Matthieu Moy
2013-02-06 18:11                   ` [PATCH 3/4] Makefile: factor common configuration in git-default-config.mak Matthieu Moy
2013-02-07 19:28                     ` Junio C Hamano
2013-02-08 17:05                       ` Matthieu Moy
2013-02-08 17:31                         ` [PATCH 1/2] Makefile: make script-related rules usable from subdirectories Matthieu Moy
2013-02-08 17:31                           ` [PATCH 2/2] git-remote-mediawiki: use toplevel's Makefile Matthieu Moy
2013-02-06 18:11                   ` [PATCH 4/4] git-remote-mediawiki: use Git's Makefile to build the script Matthieu Moy
2013-02-07 19:28                     ` Junio C Hamano
2013-02-08  4:28                       ` Jeff King
2013-02-08 17:34                         ` Matthieu Moy
2013-02-08 17:43                           ` Jeff King
2013-02-08 18:13                             ` Junio C Hamano
2013-02-08 18:15                               ` Jeff King
2013-02-06 21:57               ` [PATCH] git-send-email: add ~/.authinfo parsing Jeff King
2013-02-06 23:12                 ` Ted Zlatanov
2013-02-07  7:08                   ` Matthieu Moy
2013-02-07 14:30                     ` Ted Zlatanov
2013-02-06 13:26       ` Michal Nazarewicz
2013-02-06 14:47         ` Ted Zlatanov
2013-01-30 15:03   ` Ted Zlatanov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87sj59mo2y.fsf@lifelogs.com \
    --to=tzz@lifelogs.com \
    --cc=Matthieu.Moy@grenoble-inp.fr \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=krzysiek@podlesie.net \
    --cc=mina86@mina86.com \
    --cc=mpn@google.com \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.