#6 Git: commit message might have double quotes

closed-fixed
None
5
2012-08-14
2012-08-14
No

In russian keyboard layout encoding (and printouts tradition) double-quotesare used often. While single quotes and back-ticks are used rarely (those are just missed from the layout).

As of now function TGitClient.Commit uses ' commit -m ' + AnsiQuotedStr(AMessage, '"') approach that does not do.
Escaping semantics is determined by MS VC++ runtime for most usual Git/MSys. It is probably different for Git/Cygwin and non-Windows Git implementations.

Probably temp file should be used to carry message. Which solves all escaping problems, but asks for pre-determining of encoding and converting it to windows codepage numbers

More on that:
// Pity, Git/MSys is not aware of temporary auto-deleted files semantics, so for know
// explicit closing file to be done before invoking Git, and deleting to be made after.
// Hopefully that would change later.
// * https://github.com/msysgit/git/issues/27
// ToDo - check that default encoding can differ from UTF8, then choose codepage after ISO encoding label
// * git config --get -z i18n.commitencoding
// * http://www.kernel.org/pub/software/scm/git/docs/git-config.html#_options
// * http://www.kernel.org/pub/software/scm/git/docs/git-commit.html#_discussion

Discussion

  • Burov Dmitry

    Burov Dmitry - 2012-08-14

    sketch UTF-8-only implementation

     
  • Burov Dmitry

    Burov Dmitry - 2012-08-14

    well, i feel like forking it onto some Git repo and make local branches, rather than patchset :-)

     
  • Uwe Schuster

    Uwe Schuster - 2012-08-14
    • assigned_to: nobody --> uschuster
     
  • Uwe Schuster

    Uwe Schuster - 2012-08-14

    Fixed in rev 198 (200)

     
  • Uwe Schuster

    Uwe Schuster - 2012-08-14
    • status: open --> closed-fixed