lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject Re: git email format customizability: add branch to subject?
Date Sat, 20 Feb 2016 00:38:22 GMT

: seems to 
: suggest there is per project flexibility. Branch not one of the
: (currently) available variables though, no?   
: +1 for "the branch be included in the subject"

Thanks for finding that link Christine,

I pinged #infra on HipChat to try and find the actual code in question to 
see how hard it would be to add "branch" based variables so I could 
propose a patch to infra rather then just a general "can we do this?" type 
request, but aparently that code is ASF specific and lives in a private 
infra repo, so only infra members can read/write.  Gavin said new subject 
variables are usually not a big deal though.

That said, before I request any changes, I want to make sure I'm 
not wasting the time of any infra volunteers -- so I'd like to make sure 
we have some concensus on what we'd ideally like...

: Perhaps the script could only include the last N elements of the name,
: so we get lucene-5438-nrt-replication or
: jira/lucene-5438-nrt-replication instead of the full branch name.  Or
: maybe a regex could be used to target refs\/.*?\/ (or something more
: complex) for removal -- for some of the existing branch names, having
: the last three path elements would be good, but for others, one or two
: would be better.

good point ... given that this is a general infra tool for all projects, 
and currently the only per-project configuration is (aparently) what the 
subject should be comprised of, i'm hesitent to try and request a lot of 
custom regex rules, and/or making any general assumptions about only using 
the last "N" elements of the name.

(a common workflow i've seen is things 
like refs/head/jira/solr-xyz for a shared collaboration on that feature, 
while refs/head/hossman/jira/solr-xyz might be my proposed new direction 
for the code to take -- we wouldn't want those to get confused.)

That said, i think it would totally make sense to request that 
"%(branch)s" should refering to the full branch path, and 
"%(shortbranch)s" should be the result of regex stripping 
"^refs\/(heads\/)?" from the full branch path.  

So "refs/heads/branch_7_5 => "branch_7_5" 

But "refs/tags/releases/lucene-solr/7.5.0"
 => "tags/releases/lucene-solr/7.5.0" 

: There is normally a fairly limited amount of space for the subject in
: the list view of an email client, so it seems like a good idea to keep
: it short but relevant.

Agreed -- so perhaps we should also request reducing some other 
redundencies? (ie: "git commit")

what do folks think about requesting as our pattern...

  "git: %(repo_name)s:%(shortbranch)s: %(subject)s"

With some examples of what that would look like for a handful of commits 
from the past month...

git: lucene-solr:branch_5x: fix test bug, using different randomness when creating the two

[1/3] git: lucene-solr:lucene-6835: cut back to Directory.deleteFile(String); disable 'could
not removed segments_N so I don't remove any other files it may reference' heroics

[1/2] git: lucene-solr:master: LUCENE-7002: Fixed MultiCollector to not throw a NPE if setScorer
is called after one of the sub collectors is done collecting.

[2/2] git: lucene-solr:branch_5x: LUCENE-7002: Fixed MultiCollector to not throw a NPE if
setScorer is called after one of the sub collectors is done collecting.

...note in particular those last two emails.  As I understand it they 
were two commits from the same "push", on diff branches (the master change 
and the 5x backport) ... which is now more clear with the branch name in 
the subject.

Are folks in favor of requesting this from infra?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message