<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>38240</bug_id>
          
          <creation_ts>2020-03-19 14:44:20 +0300</creation_ts>
          <short_desc>gear-changelog: add option to translit/ascii non-ascii characters</short_desc>
          <delta_ts>2020-03-25 00:24:29 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>gear</component>
          <version>unstable</version>
          <rep_platform>x86_64</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://git.altlinux.org/people/lakostis/packages/gear.git?p=gear.git;a=shortlog;h=refs/heads/feature/filter-changelog</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>relnote</keywords>
          <priority>P5</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Konstantin A Lepikhov (L.A. Kostis)">lakostis</reporter>
          <assigned_to name="Dmitry V. Levin">ldv</assigned_to>
          <cc>glebfm</cc>
    
    <cc>ldv</cc>
    
    <cc>legion</cc>
    
    <cc>placeholder</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>188622</commentid>
    <comment_count>0</comment_count>
    <who name="Konstantin A Lepikhov (L.A. Kostis)">lakostis</who>
    <bug_when>2020-03-19 14:44:20 +0300</bug_when>
    <thetext>Привет!

По итогам обсуждения ошибки с changelog у firmware-linux я сделал патч

http://git.altlinux.org/people/lakostis/packages/gear.git?p=gear.git;a=commit;h=d426c0ca28d6609a0e567af5da1721521c239846

Прошу применить, чтобы я смог починить cronbuilds.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>188623</commentid>
    <comment_count>1</comment_count>
    <who name="Konstantin A Lepikhov (L.A. Kostis)">lakostis</who>
    <bug_when>2020-03-19 14:45:02 +0300</bug_when>
    <thetext>[lakostis@lks .gear]$ ~/bin/gear-changelog --ascii cbd2178 --no-rules
* Thu Mar 19 2020 Konstantin A. Lepikhov &lt;lakostis@altlinux.ru&gt; 0.10.1-alt3
- .spec: bump release e e

[lakostis@lks .gear]$ ~/bin/gear-changelog cbd2178 --no-rules
* Thu Mar 19 2020 Konstantin A. Lepikhov &lt;lakostis@altlinux.ru&gt; 0.10.1-alt3
- .spec: bump release é é</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>188627</commentid>
    <comment_count>2</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2020-03-19 14:59:49 +0300</bug_when>
    <thetext>(In reply to Konstantin A Lepikhov (L.A. Kostis) from comment #0)
&gt; Привет!
&gt; 
&gt; По итогам обсуждения ошибки с changelog у firmware-linux я сделал патч
&gt; 
&gt; http://git.altlinux.org/people/lakostis/packages/gear.git?p=gear.git;
&gt; a=commit;h=d426c0ca28d6609a0e567af5da1721521c239846
&gt; 
&gt; Прошу применить, чтобы я смог починить cronbuilds.

Вопрос, стоит ли зашивать -f utf8 в реализацию?
+ предсказуемость, независимость от текущей локали;
- негибкость, невозможность перекодировать из другой кодировки.

В printf &apos;%s\n&apos; лишний \n, но это мелочи.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>188629</commentid>
    <comment_count>3</comment_count>
    <who name="Konstantin A Lepikhov (L.A. Kostis)">lakostis</who>
    <bug_when>2020-03-19 15:06:42 +0300</bug_when>
    <thetext>(In reply to Dmitry V. Levin from comment #2)
&gt; (In reply to Konstantin A Lepikhov (L.A. Kostis) from comment #0)
&gt; &gt; Привет!
&gt; &gt; 
&gt; &gt; По итогам обсуждения ошибки с changelog у firmware-linux я сделал патч
&gt; &gt; 
&gt; &gt; http://git.altlinux.org/people/lakostis/packages/gear.git?p=gear.git;
&gt; &gt; a=commit;h=d426c0ca28d6609a0e567af5da1721521c239846
&gt; &gt; 
&gt; &gt; Прошу применить, чтобы я смог починить cronbuilds.
&gt; 
&gt; Вопрос, стоит ли зашивать -f utf8 в реализацию?
&gt; + предсказуемость, независимость от текущей локали;
&gt; - негибкость, невозможность перекодировать из другой кодировки.
Да, но мы же читаем только вывод от git, где, я думаю, utf8 это кодировка по-умолчанию.

&gt; 
&gt; В printf &apos;%s\n&apos; лишний \n, но это мелочи.

Ok, это поправлю.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>188630</commentid>
    <comment_count>4</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2020-03-19 15:18:49 +0300</bug_when>
    <thetext>(In reply to Konstantin A Lepikhov (L.A. Kostis) from comment #3)
&gt; (In reply to Dmitry V. Levin from comment #2)
&gt; &gt; (In reply to Konstantin A Lepikhov (L.A. Kostis) from comment #0)
&gt; &gt; &gt; Привет!
&gt; &gt; &gt; 
&gt; &gt; &gt; По итогам обсуждения ошибки с changelog у firmware-linux я сделал патч
&gt; &gt; &gt; 
&gt; &gt; &gt; http://git.altlinux.org/people/lakostis/packages/gear.git?p=gear.git;
&gt; &gt; &gt; a=commit;h=d426c0ca28d6609a0e567af5da1721521c239846
&gt; &gt; &gt; 
&gt; &gt; &gt; Прошу применить, чтобы я смог починить cronbuilds.
&gt; &gt; 
&gt; &gt; Вопрос, стоит ли зашивать -f utf8 в реализацию?
&gt; &gt; + предсказуемость, независимость от текущей локали;
&gt; &gt; - негибкость, невозможность перекодировать из другой кодировки.
&gt; Да, но мы же читаем только вывод от git, где, я думаю, utf8 это кодировка
&gt; по-умолчанию.

В документации к git log написано следующее:

git log, git show, git blame and friends look at the encoding header of a commit object, and try to re-code the log message into UTF-8 unless otherwise specified. You can specify the desired output encoding with i18n.logOutputEncoding in .git/config file, like this:
    [i18n]
        logOutputEncoding = ISO-8859-1
If you do not have this configuration variable, the value of i18n.commitEncoding is used instead.

Получается, что имеет смысл сделать так:
1. взять вывод git config i18n.logOutputEncoding, если там пусто, то
2. взять вывод git config i18n.commitEncoding, если там пусто, то
3. использовать UTF-8 в качестве значения по умолчанию.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>188631</commentid>
    <comment_count>5</comment_count>
    <who name="Konstantin A Lepikhov (L.A. Kostis)">lakostis</who>
    <bug_when>2020-03-19 15:21:29 +0300</bug_when>
    <thetext>(In reply to Dmitry V. Levin from comment #4)
&gt;skip&gt;
&gt; В документации к git log написано следующее:
&gt; 
&gt; git log, git show, git blame and friends look at the encoding header of a
&gt; commit object, and try to re-code the log message into UTF-8 unless
&gt; otherwise specified. You can specify the desired output encoding with
&gt; i18n.logOutputEncoding in .git/config file, like this:
&gt;     [i18n]
&gt;         logOutputEncoding = ISO-8859-1
&gt; If you do not have this configuration variable, the value of
&gt; i18n.commitEncoding is used instead.
&gt; 
&gt; Получается, что имеет смысл сделать так:
&gt; 1. взять вывод git config i18n.logOutputEncoding, если там пусто, то
мне кажется, этот вывода будет более чем достаточно, т.к. в случае cronbuild мы рабоаем с удаленными репозиториями где на параметр commitEncoding нельзя влиять.

&gt; 2. взять вывод git config i18n.commitEncoding, если там пусто, то
&gt; 3. использовать UTF-8 в качестве значения по умолчанию.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>188632</commentid>
    <comment_count>6</comment_count>
    <who name="Konstantin A Lepikhov (L.A. Kostis)">lakostis</who>
    <bug_when>2020-03-19 15:22:56 +0300</bug_when>
    <thetext>(In reply to Konstantin A Lepikhov (L.A. Kostis) from comment #5)
&gt; (In reply to Dmitry V. Levin from comment #4)
&gt; &gt;skip&gt;
&gt; &gt; В документации к git log написано следующее:
&gt; &gt; 
&gt; &gt; git log, git show, git blame and friends look at the encoding header of a
&gt; &gt; commit object, and try to re-code the log message into UTF-8 unless
&gt; &gt; otherwise specified. You can specify the desired output encoding with
&gt; &gt; i18n.logOutputEncoding in .git/config file, like this:
&gt; &gt;     [i18n]
&gt; &gt;         logOutputEncoding = ISO-8859-1
&gt; &gt; If you do not have this configuration variable, the value of
&gt; &gt; i18n.commitEncoding is used instead.
&gt; &gt; 
&gt; &gt; Получается, что имеет смысл сделать так:
&gt; &gt; 1. взять вывод git config i18n.logOutputEncoding, если там пусто, то
&gt; мне кажется, этот вывода будет более чем достаточно, т.к. в случае cronbuild
&gt; мы рабоаем с удаленными репозиториями где на параметр commitEncoding нельзя
&gt; влиять.
хм, а может, вообще забить на это и настроить git config для cronbuild? )) Тогда и конвертировать ничего не надо.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>188633</commentid>
    <comment_count>7</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2020-03-19 15:44:11 +0300</bug_when>
    <thetext>(In reply to Konstantin A Lepikhov (L.A. Kostis) from comment #6)
&gt; (In reply to Konstantin A Lepikhov (L.A. Kostis) from comment #5)
&gt; &gt; (In reply to Dmitry V. Levin from comment #4)
&gt; &gt; &gt;skip&gt;
&gt; &gt; &gt; В документации к git log написано следующее:
&gt; &gt; &gt; 
&gt; &gt; &gt; git log, git show, git blame and friends look at the encoding header of a
&gt; &gt; &gt; commit object, and try to re-code the log message into UTF-8 unless
&gt; &gt; &gt; otherwise specified. You can specify the desired output encoding with
&gt; &gt; &gt; i18n.logOutputEncoding in .git/config file, like this:
&gt; &gt; &gt;     [i18n]
&gt; &gt; &gt;         logOutputEncoding = ISO-8859-1
&gt; &gt; &gt; If you do not have this configuration variable, the value of
&gt; &gt; &gt; i18n.commitEncoding is used instead.
&gt; &gt; &gt; 
&gt; &gt; &gt; Получается, что имеет смысл сделать так:
&gt; &gt; &gt; 1. взять вывод git config i18n.logOutputEncoding, если там пусто, то
&gt; &gt; мне кажется, этот вывода будет более чем достаточно, т.к. в случае cronbuild
&gt; &gt; мы рабоаем с удаленными репозиториями где на параметр commitEncoding нельзя
&gt; &gt; влиять.
&gt; хм, а может, вообще забить на это и настроить git config для cronbuild? ))
&gt; Тогда и конвертировать ничего не надо.

Тоже вариант.  По крайней мере, у меня после
git config --add i18n.logOutputEncoding ASCII//TRANSLIT
gear-changelog всё сконвертировал.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>188778</commentid>
    <comment_count>8</comment_count>
    <who name="Konstantin A Lepikhov (L.A. Kostis)">lakostis</who>
    <bug_when>2020-03-25 00:24:29 +0300</bug_when>
    <thetext>Пока закрываю, т.к. проблема скорее в конфигурации git клиента, а не в gear-changelog.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>