List for cgit developers and users
 help / color / mirror / Atom feed
* [RESEND] [PATCH v2 1/1] commit-links.sh: improve regular expressions
@ 2011-06-22 20:46 mailings
  2011-06-22 21:09 ` hjemli
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: mailings @ 2011-06-22 20:46 UTC (permalink / raw)


From: Ferry Huberts <ferry.huberts at pelagic.nl>

Signed-off-by: Ferry Huberts <ferry.huberts at pelagic.nl>
---
 filters/commit-links.sh |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/filters/commit-links.sh b/filters/commit-links.sh
index d2cd2b3..5881952 100755
--- a/filters/commit-links.sh
+++ b/filters/commit-links.sh
@@ -15,11 +15,14 @@
 # CGIT_REPO_CLONE_URL  ( = repo.clone-url setting )
 #
 
+regex=''
+
 # This expression generates links to commits referenced by their SHA1.
 regex=$regex'
-s|\b([0-9a-fA-F]{8,40})\b|<a href="./?id=\1">\1</a>|g'
+s|\b([0-9a-fA-F]{7,40})\b|<a href="./?id=\1">\1</a>|g'
+
 # This expression generates links to a fictional bugtracker.
 regex=$regex'
-s| #([0-9]+)\b|<a href="http://bugs.example.com/?bug=\1">#\1</a>|g'
+s|#([0-9]+)\b|<a href="http://bugs.example.com/?bug=\1">#\1</a>|g'
 
 sed -re "$regex"
-- 
1.7.5.4





^ permalink raw reply	[flat|nested] 6+ messages in thread

* [RESEND] [PATCH v2 1/1] commit-links.sh: improve regular expressions
  2011-06-22 20:46 [RESEND] [PATCH v2 1/1] commit-links.sh: improve regular expressions mailings
@ 2011-06-22 21:09 ` hjemli
       [not found]   ` <4E025ADA.7030603@hupie.com>
  2011-06-23  0:43 ` [PATCH v3 " mailings
  2011-07-18 10:45 ` [RESEND] " mailings
  2 siblings, 1 reply; 6+ messages in thread
From: hjemli @ 2011-06-22 21:09 UTC (permalink / raw)


On Wed, Jun 22, 2011 at 22:46, Ferry Huberts <mailings at hupie.com> wrote:
> From: Ferry Huberts <ferry.huberts at pelagic.nl>
>
> Signed-off-by: Ferry Huberts <ferry.huberts at pelagic.nl>

I still would like a commit message for this patch which describes the
rationale for the changes it introduces, i.e. what's wrong with the
first usage of $regex, why is 7 a better number than 8, and why
shouldn't the ticket hash be prefixed by a space? And are there any
other changes in the patch which I didn't spot?

--
larsh




^ permalink raw reply	[flat|nested] 6+ messages in thread

* [RESEND] [PATCH v2 1/1] commit-links.sh: improve regular expressions
       [not found]   ` <4E025ADA.7030603@hupie.com>
@ 2011-06-22 21:26     ` hjemli
  0 siblings, 0 replies; 6+ messages in thread
From: hjemli @ 2011-06-22 21:26 UTC (permalink / raw)


On Wed, Jun 22, 2011 at 23:12, Ferry Huberts <mailings at hupie.com> wrote:
> On 06/22/2011 11:09 PM, Lars Hjemli wrote:
>> I still would like a commit message for this patch which describes the
>> rationale for the changes it introduces
>
> [snip]
>
> or do you want a new patch?

Yes. I do agree that all three changes are improvements, but it would
be nice to get an explanation of the improvements in the commit
message.

-- 
larsh




^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v3 1/1] commit-links.sh: improve regular expressions
  2011-06-22 20:46 [RESEND] [PATCH v2 1/1] commit-links.sh: improve regular expressions mailings
  2011-06-22 21:09 ` hjemli
@ 2011-06-23  0:43 ` mailings
  2011-07-18 10:45 ` [RESEND] " mailings
  2 siblings, 0 replies; 6+ messages in thread
From: mailings @ 2011-06-23  0:43 UTC (permalink / raw)


From: Ferry Huberts <ferry.huberts at pelagic.nl>

The default length for sha1 abbreviations in git is 7.

A '#num' at the beginning of the commit message is now
recognised, a ':#num' as well, etc.: a '#num' anywhere
is now converted to a link.

Signed-off-by: Ferry Huberts <ferry.huberts at pelagic.nl>
---
 filters/commit-links.sh |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/filters/commit-links.sh b/filters/commit-links.sh
index d2cd2b3..5881952 100755
--- a/filters/commit-links.sh
+++ b/filters/commit-links.sh
@@ -15,11 +15,14 @@
 # CGIT_REPO_CLONE_URL  ( = repo.clone-url setting )
 #
 
+regex=''
+
 # This expression generates links to commits referenced by their SHA1.
 regex=$regex'
-s|\b([0-9a-fA-F]{8,40})\b|<a href="./?id=\1">\1</a>|g'
+s|\b([0-9a-fA-F]{7,40})\b|<a href="./?id=\1">\1</a>|g'
+
 # This expression generates links to a fictional bugtracker.
 regex=$regex'
-s| #([0-9]+)\b|<a href="http://bugs.example.com/?bug=\1">#\1</a>|g'
+s|#([0-9]+)\b|<a href="http://bugs.example.com/?bug=\1">#\1</a>|g'
 
 sed -re "$regex"
-- 
1.7.5.4





^ permalink raw reply	[flat|nested] 6+ messages in thread

* [RESEND] [PATCH v3 1/1] commit-links.sh: improve regular expressions
  2011-06-22 20:46 [RESEND] [PATCH v2 1/1] commit-links.sh: improve regular expressions mailings
  2011-06-22 21:09 ` hjemli
  2011-06-23  0:43 ` [PATCH v3 " mailings
@ 2011-07-18 10:45 ` mailings
  2011-07-19  7:14   ` larsh
  2 siblings, 1 reply; 6+ messages in thread
From: mailings @ 2011-07-18 10:45 UTC (permalink / raw)


From: Ferry Huberts <ferry.huberts at pelagic.nl>

The default length for sha1 abbreviations in git is 7.

A '#num' at the beginning of the commit message is now
recognised, a ':#num' as well, etc.: a '#num' anywhere
is now converted to a link.

Signed-off-by: Ferry Huberts <ferry.huberts at pelagic.nl>
---
 filters/commit-links.sh |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/filters/commit-links.sh b/filters/commit-links.sh
index d2cd2b3..5881952 100755
--- a/filters/commit-links.sh
+++ b/filters/commit-links.sh
@@ -15,11 +15,14 @@
 # CGIT_REPO_CLONE_URL  ( = repo.clone-url setting )
 #
 
+regex=''
+
 # This expression generates links to commits referenced by their SHA1.
 regex=$regex'
-s|\b([0-9a-fA-F]{8,40})\b|<a href="./?id=\1">\1</a>|g'
+s|\b([0-9a-fA-F]{7,40})\b|<a href="./?id=\1">\1</a>|g'
+
 # This expression generates links to a fictional bugtracker.
 regex=$regex'
-s| #([0-9]+)\b|<a href="http://bugs.example.com/?bug=\1">#\1</a>|g'
+s|#([0-9]+)\b|<a href="http://bugs.example.com/?bug=\1">#\1</a>|g'
 
 sed -re "$regex"
-- 
1.7.5.4





^ permalink raw reply	[flat|nested] 6+ messages in thread

* [RESEND] [PATCH v3 1/1] commit-links.sh: improve regular expressions
  2011-07-18 10:45 ` [RESEND] " mailings
@ 2011-07-19  7:14   ` larsh
  0 siblings, 0 replies; 6+ messages in thread
From: larsh @ 2011-07-19  7:14 UTC (permalink / raw)


On Mon, Jul 18, 2011 at 12:45:20PM +0200, Ferry Huberts wrote:
>  filters/commit-links.sh |    7 +++++--
>  1 files changed, 5 insertions(+), 2 deletions(-)

Thanks, and sorry for the late response (it's holiday season). I've
applied this patch to my master branch.

--
larsh




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-07-19  7:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-22 20:46 [RESEND] [PATCH v2 1/1] commit-links.sh: improve regular expressions mailings
2011-06-22 21:09 ` hjemli
     [not found]   ` <4E025ADA.7030603@hupie.com>
2011-06-22 21:26     ` hjemli
2011-06-23  0:43 ` [PATCH v3 " mailings
2011-07-18 10:45 ` [RESEND] " mailings
2011-07-19  7:14   ` larsh

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).