git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Rasmus Villemoes <rv@rasmusvillemoes.dk>
Cc: sandals@crustytoothpaste.net, git@vger.kernel.org
Subject: Re: [PATCH v2 0/2] git-send-email: Message-ID caching
Date: Wed, 21 Aug 2013 17:20:24 -0700	[thread overview]
Message-ID: <xmqqbo4qshiv.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <1377111862-13199-1-git-send-email-rv@rasmusvillemoes.dk> (Rasmus Villemoes's message of "Wed, 21 Aug 2013 19:04:20 +0000")

Rasmus Villemoes <rv@rasmusvillemoes.dk> writes:

>> Rasmus Villemoes <rv@rasmusvillemoes.dk> writes:
>>>  my %config_path_settings = (
>>> @@ -311,6 +314,7 @@ my $rc = GetOptions("h" => \$help,
>>>  		    "8bit-encoding=s" => \$auto_8bit_encoding,
>>>  		    "compose-encoding=s" => \$compose_encoding,
>>>  		    "force" => \$force,
>>> +		    "msgid-cache-file=s" => \$msgid_cache_file,
>>>  	 );
>>
>> Is there a standard, recommended location we suggest users to store
>> this?  
>
> I don't know. It is obviously a local, per-repository, thing. I don't
> know enough about git's internals to know if something breaks if one
> puts it in .git (say, ".git/msgid.cache").

I think $GIT_DIR is OK, when we _know_ we are in a Git controlled
directory.  "git send-email" can however be invoked in a random
directory that is _not_ a Git controlled directory, though.

In any case, if we were to store it inside $GIT_DIR, I'd prefer to
have "send-email" somewhere in the name of the file, as there are
other Git programs that deal with things that have "msgid" (notably,
"am") that will not have anything to do with this file.

> If storing it under .git is possible, one could consider making the
> option a boolean ('msgid-use-cache' ?) and always use
> ".git/msgid.cache".

Another possibility is to have it in the output directory specified
via the "format-patch -o $dir" option.  When you are rerolling a
series multiple times, you will only look at the message ID from the
previous round; you do not even need to look at old messages in an
unrelated topic.

I could imagine that

	git send-email $dir/0*.txt

can notice that these input files are all in the same $dir
directory, check to see if $dir/message-id file exists, read it to
offer it as the suggested initial-reply-to.  Similarly, when sending
the _first_ message in such an invocation, it can just write the
generated message-id to that file.  Then we need no choices.  It is
sufficient to just keep a single message-id of the first message in
the previous round and offer it as a possible initial-reply-to in a
Yes/No question.

Just a random thought.

      parent reply	other threads:[~2013-08-22  0:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-17  0:58 [RFC] git-send-email: Cache generated message-ids, use them when prompting Rasmus Villemoes
2013-08-18 21:08 ` Junio C Hamano
2013-08-18 22:24   ` brian m. carlson
2013-08-21 19:04 ` [PATCH v2 0/2] git-send-email: Message-ID caching Rasmus Villemoes
2013-08-21 19:04   ` [PATCH 1/2] git-send-email: add optional 'choices' parameter to the ask sub Rasmus Villemoes
2013-08-21 19:04   ` [PATCH 2/2] git-send-email: Cache generated message-ids, use them when prompting Rasmus Villemoes
2013-08-22  0:20   ` Junio C Hamano [this message]

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=xmqqbo4qshiv.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=rv@rasmusvillemoes.dk \
    --cc=sandals@crustytoothpaste.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).