git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Haggerty <mhagger@alum.mit.edu>
To: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
Cc: "git discussion list" <git@vger.kernel.org>,
	"Andy Parkins" <andyparkins@gmail.com>,
	"Sitaram Chamarty" <sitaramc@gmail.com>,
	"Junio C Hamano" <gitster@pobox.com>,
	"Marc Branchaud" <mbranchaud@xiplink.com>,
	"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
	"Chris Hiestand" <chiestand@salk.edu>
Subject: Re: [RFC v2] git-multimail: a replacement for post-receive-email
Date: Mon, 25 Feb 2013 11:50:43 +0100	[thread overview]
Message-ID: <512B4203.3090802@alum.mit.edu> (raw)
In-Reply-To: <vpqd2vok9bv.fsf@grenoble-inp.fr>

On 02/25/2013 10:54 AM, Matthieu Moy wrote:
> Michael Haggerty <mhagger@alum.mit.edu> writes:
> 
>> On 02/20/2013 01:28 PM, Matthieu Moy wrote:
>>> Michael Haggerty <mhagger@alum.mit.edu> writes:
>>>> A while ago, I submitted an RFC for adding a new email notification
>>>> script to "contrib" [...]
>>>
>>> We've discussed offline with Michael, a few patches have been merged,
>>> and there are still a few pending pull requests. I liked the script
>>> already, but it's getting even cooler ;-).
>>>
>>> A few more random thoughts (not on my personal todo-list):
>>>
>>> * It may make sense to add the short sha1 of the new reference in email
>>>   titles (branch foo updated -> branch foo updated to $sha1), so that
>>>   gmail users do not get a single huge thread "branch foo updated".
>>>
>>>   (Yes, I do know about the Reference field, but gmail uses Subject: for
>>>   threading).
>>> [...]
>>
>> I just implemented this in branch sha1s-in-subject [1].  Please let me
>> know if this works for you then I'll merge it to master.  (It depends on
>> the header-handling branch, which also includes your patch for non-ASCII
>> header fields.)
> 
> Works for me. One minor knit: you've included 10-characters sha1s (this
> comes from
> 
>         self.short = read_output(['git', 'rev-parse', '--short=10', sha1])
> 
> ), I'd find it better with shorter sha1s. In the case of branch update,
> if the branch name is a bit long, it could be nice to save a few
> characters.
> 
> Why not just say "git rev-parse --short", without argument? This way,
> the default is used, ie. AFAICT it uses 7 characters by default, but
> will use more if needed to keep the unicity.

I did this intentionally because the SHA1s appear in columns within the
refchange emails, and having varying-length SHA1s would cause subsequent
columns to be misaligned.  I figured that a length of 10, aside from
being a number that I can still count on my fingers, would be long
enough that it would rarely have to be extended.

I guess I will change the code to use $(git rev-parse --short) (i.e.,
shorter SHA1s) but reserving 10 columns in tables for them (which can be
done via Python string formatting in the templates).  That should give
the best of both worlds.

Thanks for the feedback!

Michael

-- 
Michael Haggerty
mhagger@alum.mit.edu
http://softwareswirl.blogspot.com/

  reply	other threads:[~2013-02-25 10:51 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-27  8:37 [RFC v2] git-multimail: a replacement for post-receive-email Michael Haggerty
2013-01-29 15:25 ` Ævar Arnfjörð Bjarmason
2013-01-30  2:27   ` Chris Hiestand
2013-02-13 14:56 ` Matthieu Moy
2013-02-13 15:26   ` Andy Parkins
2013-02-13 16:12     ` Matthieu Moy
2013-02-13 21:42   ` Michael Haggerty
2013-02-14 12:55     ` Matthieu Moy
2013-02-15  5:07       ` Michael Haggerty
2013-02-20 12:28 ` Matthieu Moy
2013-02-24  5:31   ` Michael Haggerty
2013-02-25  9:54     ` Matthieu Moy
2013-02-25 10:50       ` Michael Haggerty [this message]
2013-03-09  5:32         ` Michael Haggerty
2013-02-24  5:53   ` Michael Haggerty
2013-02-25 10:01     ` Matthieu Moy
2013-03-04  8:56   ` Matthieu Moy

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=512B4203.3090802@alum.mit.edu \
    --to=mhagger@alum.mit.edu \
    --cc=Matthieu.Moy@grenoble-inp.fr \
    --cc=andyparkins@gmail.com \
    --cc=avarab@gmail.com \
    --cc=chiestand@salk.edu \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=mbranchaud@xiplink.com \
    --cc=sitaramc@gmail.com \
    /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 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 NNTP newsgroup(s).