Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: git/git
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 7d7d051c5e
Choose a base ref
...
head repository: git/git
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: e92d622536
Choose a head ref
  • 10 commits
  • 13 files changed
  • 1 contributor

Commits on Feb 15, 2018

  1. strbuf: remove unnecessary NUL assignment in xstrdup_tolower()

    Since 3733e69 (use xmallocz to avoid size arithmetic, 2016-02-22) we
    allocate the buffer for the lower case string with xmallocz(). This
    already ensures a NUL at the end of the allocated buffer.
    
    Remove the unnecessary assignment.
    
    Signed-off-by: Lars Schneider <larsxschneider@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    larsxschneider authored and gitster committed Feb 15, 2018
    Configuration menu
    Copy the full SHA
    a8270b0 View commit details
    Browse the repository at this point in the history
  2. strbuf: add xstrdup_toupper()

    Create a copy of an existing string and make all characters upper case.
    Similar xstrdup_tolower().
    
    This function is used in a subsequent commit.
    
    Signed-off-by: Lars Schneider <larsxschneider@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    larsxschneider authored and gitster committed Feb 15, 2018
    Configuration menu
    Copy the full SHA
    13ecb46 View commit details
    Browse the repository at this point in the history

Commits on Mar 9, 2018

  1. strbuf: add a case insensitive starts_with()

    Check in a case insensitive manner if one string is a prefix of another
    string.
    
    This function is used in a subsequent commit.
    
    Signed-off-by: Lars Schneider <larsxschneider@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    larsxschneider authored and gitster committed Mar 9, 2018
    Configuration menu
    Copy the full SHA
    66b8af3 View commit details
    Browse the repository at this point in the history

Commits on Apr 16, 2018

  1. utf8: teach same_encoding() alternative UTF encoding names

    The function same_encoding() could only recognize alternative names for
    UTF-8 encodings. Teach it to recognize all kinds of alternative UTF
    encoding names (e.g. utf16).
    
    While we are at it, fix a crash that would occur if same_encoding() was
    called with a NULL argument and a non-NULL argument.
    
    This function is used in a subsequent commit.
    
    Signed-off-by: Lars Schneider <larsxschneider@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    larsxschneider authored and gitster committed Apr 16, 2018
    Configuration menu
    Copy the full SHA
    2f0c4a3 View commit details
    Browse the repository at this point in the history
  2. utf8: add function to detect prohibited UTF-16/32 BOM

    Whenever a data stream is declared to be UTF-16BE, UTF-16LE, UTF-32BE
    or UTF-32LE a BOM must not be used [1]. The function returns true if
    this is the case.
    
    This function is used in a subsequent commit.
    
    [1] http://unicode.org/faq/utf_bom.html#bom10
    
    Signed-off-by: Lars Schneider <larsxschneider@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    larsxschneider authored and gitster committed Apr 16, 2018
    Configuration menu
    Copy the full SHA
    10ecb82 View commit details
    Browse the repository at this point in the history
  3. utf8: add function to detect a missing UTF-16/32 BOM

    If the endianness is not defined in the encoding name, then let's
    be strict and require a BOM to avoid any encoding confusion. The
    is_missing_required_utf_bom() function returns true if a required BOM
    is missing.
    
    The Unicode standard instructs to assume big-endian if there in no BOM
    for UTF-16/32 [1][2]. However, the W3C/WHATWG encoding standard used
    in HTML5 recommends to assume little-endian to "deal with deployed
    content" [3]. Strictly requiring a BOM seems to be the safest option
    for content in Git.
    
    This function is used in a subsequent commit.
    
    [1] http://unicode.org/faq/utf_bom.html#gen6
    [2] http://www.unicode.org/versions/Unicode10.0.0/ch03.pdf
         Section 3.10, D98, page 132
    [3] https://encoding.spec.whatwg.org/#utf-16le
    
    Signed-off-by: Lars Schneider <larsxschneider@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    larsxschneider authored and gitster committed Apr 16, 2018
    Configuration menu
    Copy the full SHA
    c6e4865 View commit details
    Browse the repository at this point in the history
  4. convert: add 'working-tree-encoding' attribute

    Git recognizes files encoded with ASCII or one of its supersets (e.g.
    UTF-8 or ISO-8859-1) as text files. All other encodings are usually
    interpreted as binary and consequently built-in Git text processing
    tools (e.g. 'git diff') as well as most Git web front ends do not
    visualize the content.
    
    Add an attribute to tell Git what encoding the user has defined for a
    given file. If the content is added to the index, then Git reencodes
    the content to a canonical UTF-8 representation. On checkout Git will
    reverse this operation.
    
    Signed-off-by: Lars Schneider <larsxschneider@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    larsxschneider authored and gitster committed Apr 16, 2018
    Configuration menu
    Copy the full SHA
    107642f View commit details
    Browse the repository at this point in the history
  5. convert: check for detectable errors in UTF encodings

    Check that new content is valid with respect to the user defined
    'working-tree-encoding' attribute.
    
    Signed-off-by: Lars Schneider <larsxschneider@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    larsxschneider authored and gitster committed Apr 16, 2018
    Configuration menu
    Copy the full SHA
    7a17918 View commit details
    Browse the repository at this point in the history
  6. convert: add tracing for 'working-tree-encoding' attribute

    Add the GIT_TRACE_WORKING_TREE_ENCODING environment variable to enable
    tracing for content that is reencoded with the 'working-tree-encoding'
    attribute. This is useful to debug encoding issues.
    
    Signed-off-by: Lars Schneider <larsxschneider@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    larsxschneider authored and gitster committed Apr 16, 2018
    Configuration menu
    Copy the full SHA
    541d059 View commit details
    Browse the repository at this point in the history
  7. convert: add round trip check based on 'core.checkRoundtripEncoding'

    UTF supports lossless conversion round tripping and conversions between
    UTF and other encodings are mostly round trip safe as Unicode aims to be
    a superset of all other character encodings. However, certain encodings
    (e.g. SHIFT-JIS) are known to have round trip issues [1].
    
    Add 'core.checkRoundtripEncoding', which contains a comma separated
    list of encodings, to define for what encodings Git should check the
    conversion round trip if they are used in the 'working-tree-encoding'
    attribute.
    
    Set SHIFT-JIS as default value for 'core.checkRoundtripEncoding'.
    
    [1] https://support.microsoft.com/en-us/help/170559/prb-conversion-problem-between-shift-jis-and-unicode
    
    Signed-off-by: Lars Schneider <larsxschneider@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    larsxschneider authored and gitster committed Apr 16, 2018
    Configuration menu
    Copy the full SHA
    e92d622 View commit details
    Browse the repository at this point in the history
Loading