1. 31 Jan, 2019 1 commit
    • Torsten Bögershausen's avatar
      Support working-tree-encoding "UTF-16LE-BOM" · aab2a1ae
      Torsten Bögershausen authored
      Users who want UTF-16 files in the working tree set the .gitattributes
      like this:
      test.txt working-tree-encoding=UTF-16
      
      The unicode standard itself defines 3 allowed ways how to encode UTF-16.
      The following 3 versions convert all back to 'g' 'i' 't' in UTF-8:
      
      a) UTF-16, without BOM, big endian:
      $ printf "\000g\000i\000t" | iconv -f UTF-16 -t UTF-8 | od -c
      0000000    g   i   t
      
      b) UTF-16, with BOM, little endian:
      $ printf "\377\376g\000i\000t\000" | iconv -f UTF-16 -t UTF-8 | od -c
      0000000    g   i   t
      
      c) UTF-16, with BOM, big endian:
      $ printf "\376\377\000g\000i\000t" | iconv -f UTF-16 -t UTF-8 | od -c
      0000000    g   i   t
      
      Git uses libiconv to convert from UTF-8 in the index into ITF-16 in the
      working tree.
      After a checkout, the resulting file has a BOM and is encoded in "UTF-16",
      in the version (c) above.
      This is what iconv generates, more details follow below.
      
      iconv (and libiconv) can generate UTF-16, UTF-16LE or UTF-16BE:
      
      d) UTF-16
      $ printf 'git' | iconv -f UTF-8 -t UTF-16 | od -c
      0000000  376 377  \0   g  \0   i  \0   t
      
      e) UTF-16LE
      $ printf 'git' | iconv -f UTF-8 -t UTF-16LE | od -c
      0000000    g  \0   i  \0   t  \0
      
      f)  UTF-16BE
      $ printf 'git' | iconv -f UTF-8 -t UTF-16BE | od -c
      0000000   \0   g  \0   i  \0   t
      
      There is no way to generate version (b) from above in a Git working tree,
      but that is what some applications need.
      (All fully unicode aware applications should be able to read all 3 variants,
      but in practise we are not there yet).
      
      When producing UTF-16 as an output, iconv generates the big endian version
      with a BOM. (big endian is probably chosen for historical reasons).
      
      iconv can produce UTF-16 files with little endianess by using "UTF-16LE"
      as encoding, and that file does not have a BOM.
      
      Not all users (especially under Windows) are happy with this.
      Some tools are not fully unicode aware and can only handle version (b).
      
      Today there is no way to produce version (b) with iconv (or libiconv).
      Looking into the history of iconv, it seems as if version (c) will
      be used in all future iconv versions (for compatibility reasons).
      
      Solve this dilemma and introduce a Git-specific "UTF-16LE-BOM".
      libiconv can not handle the encoding, so Git pick it up, handles the BOM
      and uses libiconv to convert the rest of the stream.
      (UTF-16BE-BOM is added for consistency)
      Rported-by: Adrián's avatarAdrián Gimeno Balaguer <adrigibal@gmail.com>
      Signed-off-by: default avatarTorsten Bögershausen <tboegi@web.de>
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
      aab2a1ae
  2. 15 Dec, 2018 7 commits
  3. 14 Dec, 2018 2 commits
    • Derrick Stolee's avatar
      .gitattributes: ensure t/oid-info/* has eol=lf · fc767afe
      Derrick Stolee authored
      The new test_oid machinery in the test library requires reading
      some information from t/oid-info/hash-info and t/oid-info/oid.
      
      The logic to read from these files in shell uses built-in "read"
      command, which leaves CR at the end of these text files when they
      are checked out with CRLF line endings, at least when run with bash
      shipped with Git for Windows.  This results in an unexpected value
      in the variable these lines are read into, leading the tests to
      fail.
      
      Mark them to be checked out always with the LF line endings.
      Signed-off-by: default avatarDerrick Stolee <dstolee@microsoft.com>
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
      fc767afe
    • Johannes Schindelin's avatar
      t9902: 'send-email' test case requires PERL · 0365b9ec
      Johannes Schindelin authored
      The oneline notwithstanding, 13374987 (completion: use _gitcompbuiltin
      for format-patch, 2018-11-03) changed also the way send-email options
      are completed, by asking the git send-email command itself what options
      it offers.
      
      Necessarily, this must fail when built with NO_PERL because send-email
      itself is a Perl script. Which means that we need the PERL prerequisite
      for the send-email test case in t9902.
      Signed-off-by: Johannes Schindelin's avatarJohannes Schindelin <johannes.schindelin@gmx.de>
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
      0365b9ec
  4. 13 Dec, 2018 1 commit
  5. 12 Dec, 2018 4 commits
  6. 09 Dec, 2018 2 commits
    • Junio C Hamano's avatar
      Git 2.20 · 5d826e97
      Junio C Hamano authored
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
      5d826e97
    • Junio C Hamano's avatar
      Merge tag 'l10n-2.20.0-rnd3' of https://github.com/git-l10n/git-po · b5796d9a
      Junio C Hamano authored
      l10n-2.20.0-rnd3
      
      * tag 'l10n-2.20.0-rnd3' of https://github.com/git-l10n/git-po: (22 commits)
        l10n: de.po: fix two messages
        l10n: zh_CN: for git v2.20.0 l10n round 1 to 3
        l10n: update German translation
        l10n: bg.po: Updated Bulgarian translation (4187t)
        l10n: sv.po: Update Swedish translation (4187t0f0u)
        l10n: fr.po v2.20.0 round 3
        l10n: vi(4187t): Updated Vietnamese translation for v2.20.0 rd3
        l10n: es.po v2.20.0 round 3
        l10n: git.pot: v2.20.0 round 3 (5 new, 3 removed)
        l10n: vi(4185t): Updated Vietnamese translation for v2.20.0
        l10n: es.po v2.20.0 round 1
        l10n: bg.po: Updated Bulgarian translation (4185t)
        l10n: git.pot: v2.20.0 round 2 (2 new, 2 removed)
        l10n: bg.po: Updated Bulgarian translation (4185t)
        l10n: sv.po: Update Swedish translation (4185t0f0u)
        l10n: fr.po v2.20 rnd 1
        l10n: Update Catalan translation
        l10n: git.pot: v2.20.0 round 1 (254 new, 27 removed)
        l10n: Update Catalan translation
        l10n: vi.po: fix typo in pack-objects
        ...
      b5796d9a
  7. 07 Dec, 2018 1 commit
  8. 06 Dec, 2018 2 commits
  9. 04 Dec, 2018 7 commits
  10. 03 Dec, 2018 1 commit
  11. 02 Dec, 2018 11 commits
  12. 01 Dec, 2018 1 commit