git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/8] remote-bzr: fix export of utf-8 authors

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Aug 28, 2013, 22:25 UTC
Message-ID
<CAMP44s0t71X8dhTVmeEoGEbgsUiVWsKYe5eYj=tCN0oB96cSqQ@mail.gmail.com>
In-Reply-To
<xmqq7gf58okw.fsf@gitster.dls.corp.google.com>
On Wed, Aug 28, 2013 at 4:58 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 24 quoted lines
> Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:
>
>> Felipe Contreras <felipe.contreras@gmail.com> writes:
>>
>>> On Wed, Aug 28, 2013 at 3:05 PM, Matthieu Moy
>>> <Matthieu.Moy@grenoble-inp.fr> wrote:
>>>
>>>>> +     bzr log | grep "^committer: " > ../actual
>>>>> +     ) &&
>>>>> +
>>>>> +     echo "committer: Grégoire <committer@example.com>" > expected &&
>>>>
>>>> Git's source code usually says >../actual and >expected, without space
>>>> after '>'.
>>>
>>> Not that usually:
>>>
>>> % git grep ' > ' t/*.sh | wc -l
>>> 1943
>>
>> Do I really need to quote the paragraph in CodingGuidelines?
>
> Existing violations are not an excuse to make things worse by adding
> more.
1)

By definition following a guideline is not mandatory: https://en.wikipedia.org/wiki/Guideline

Violation is a too strong word for not following something that is not mandatory in the first place; deviation is a more appropriate word.

2)

This code is part of the 'contrib' area, and part of the tests, most of the code in this area doesn't even have tests.

3)
Blindly following guidelines is not a good idea.

cmd >out cmd >out 2>err if (n > 1) cmd1 | cmd2

Clearly, those are inconsistent.

cmd > out cmd > out 2> err if (n > 1) cmd1 | cmd2

Those are not.

Fortunately since these rules are only guidelines, there's no need to engage in bike-sheding argumentation if the code deviates from guideline, specially for this insignificantly trivial issue.

Blocking a patch that would be obviously advantageous for the users on the basis of a single white-space on the tests which aren't even run by default is simply stupid.

> I think with these comments we can expect a reroll coming,
> and it should be trivial for any contributor to fix it while at it.

I already send the update, I do not see the need for any more changes, so no more changes will come from me unless there is valid feedback.

If it makes you happier, apply this:
From 7db40fa6b2780f9b5787c7d38f0d2dac01b175d3 Mon Sep 17 00:00:00 2001
From: Felipe Contreras <felipe.contreras@gmail.com>
Date: Sun, 4 Aug 2013 19:27:51 -0500
Subject: [PATCH] remote-bzr: fix export of utf-8 authors
Reported-by: Joakim Verona <joakim@verona.se>
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 contrib/remote-helpers/git-remote-bzr | 1 +
 1 file changed, 1 insertion(+)
diff --git a/contrib/remote-helpers/git-remote-bzr
b/contrib/remote-helpers/git-remote-bzr
index c3a3cac..08b0b61 100755
--- a/contrib/remote-helpers/git-remote-bzr
+++ b/contrib/remote-helpers/git-remote-bzr
@@ -168,6 +168,7 @@ class Parser:
         if not m:
             return None
         _, name, email, date, tz = m.groups()
+        name = name.decode('utf-8')
         committer = '%s <%s>' % (name, email)
         tz = int(tz)
         tz = ((tz / 100) * 3600) + ((tz % 100) * 60)
-- 
1.8.4-fc-3-g64bc480

There, there is no more test GUIDEline "violation".

-- 
Felipe Contreras
Previous: Junio C HamanoNext: Junio C Hamano
Message 11 of 32 in “remote-{hg,bzr}: updates”
  1. 0/8 remote-{hg,bzr}: updatesFelipe Contreras, Aug 28, 2013
  2. 1/8 remote-bzr: fix export of utf-8 authorsFelipe Contreras, Aug 28, 2013
  3. Matthieu MoyAug 28, 2013
  4. Felipe ContrerasAug 28, 2013
  5. Antoine PelisseAug 28, 2013
  6. Felipe ContrerasAug 28, 2013
  7. Felipe ContrerasAug 28, 2013
  8. Matthieu MoyAug 28, 2013
  9. Felipe ContrerasAug 28, 2013
  10. Junio C HamanoAug 28, 2013
  11. Felipe ContrerasAug 28, 2013
  12. Re* [PATCH 1/8] remote-bzr: fix export of utf-8 authorsJunio C Hamano, Aug 29, 2013
  13. Junio C HamanoAug 29, 2013
  14. Michael HaggertySep 1, 2013
  15. Antoine PelisseAug 29, 2013
  16. Junio C HamanoAug 29, 2013
  17. Junio C HamanoAug 29, 2013
  18. Michael HaggertySep 1, 2013
  19. Eric SunshineAug 28, 2013
  20. remote-bzr: fix export of utf-8 authorsFelipe Contreras, Aug 28, 2013
  21. 2/8 remote-bzr: make bzr branches configurable per-repoFelipe Contreras, Aug 28, 2013
  22. 3/8 remote-hg: fix testFelipe Contreras, Aug 28, 2013
  23. 4/8 remote-hg: add missing &&s in the testFelipe Contreras, Aug 28, 2013
  24. 5/8 remote-hg: improve basic testFelipe Contreras, Aug 28, 2013
  25. 6/8 remote-helpers: trivial style fixesFelipe Contreras, Aug 28, 2013
  26. 7/8 remote-helpers: cleanup more global variablesFelipe Contreras, Aug 28, 2013
  27. 8/8 remote-hg: support for notesFelipe Contreras, Aug 28, 2013
  28. Junio C HamanoAug 29, 2013
  29. remote-hg: support for notesFelipe Contreras, Aug 29, 2013
  30. Junio C HamanoAug 29, 2013
  31. remote-hg: support for notesFelipe Contreras, Aug 29, 2013
  32. Junio C HamanoAug 29, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.