Skip to content

Instantly share code, notes, and snippets.

@SebCorbin
Forked from alikins/.gitattributes
Last active May 27, 2020 20:43
Show Gist options
  • Save SebCorbin/d196a96b1b5f30f3c3947c3d35fe420b to your computer and use it in GitHub Desktop.
Save SebCorbin/d196a96b1b5f30f3c3947c3d35fe420b to your computer and use it in GitHub Desktop.

Revisions

  1. SebCorbin revised this gist Mar 2, 2017. 3 changed files with 4 additions and 23 deletions.
    3 changes: 3 additions & 0 deletions .gitconfig
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@
    # From http://stackoverflow.com/questions/2006351/gettext-po-files-under-version-control/11291001#11291001
    [diff "msgcat"]
    textconv = msgcat --no-location --no-wrap --sort-output
    1 change: 1 addition & 0 deletions .gitattributes → attributes
    Original file line number Diff line number Diff line change
    @@ -1,2 +1,3 @@
    # ~/.config/git/attributes
    *.pot diff=msgcat
    *.po diff=msgcat
    23 changes: 0 additions & 23 deletions gitconfig
    Original file line number Diff line number Diff line change
    @@ -1,23 +0,0 @@
    # from http://stackoverflow.com/questions/2006351/gettext-po-files-under-version-control/11291001#11291001
    # more verbose than my minimal version
    [diff "msgcat"]
    textconv = msgcat --no-location --no-wrap --sort-output

    # these diff defs use po_diff/pot_diff from https://github.com/alikins/gitconfig
    # change the 'diff' in .gitattributes to diff=po or diff=pot to use

    # convert po files to a less noisy
    # # variant for display in git log -p etc
    # # note that textconv does not affect
    # # git-format-patch output
    [diff "po"]
    textconv = po_diff
    cachetextconv = true

    [diff "pot"]
    textconv = pot_diff
    # the line's it was picking for the "funcname"
    # context were kind of terrible for this case, so
    # just match a blank line so it's empty
    xfuncname = ^$
    cachetextconv = true
  2. @alikins alikins created this gist Oct 7, 2014.
    2 changes: 2 additions & 0 deletions .gitattributes
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,2 @@
    *.pot diff=msgcat
    *.po diff=msgcat
    23 changes: 23 additions & 0 deletions gitconfig
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,23 @@
    # from http://stackoverflow.com/questions/2006351/gettext-po-files-under-version-control/11291001#11291001
    # more verbose than my minimal version
    [diff "msgcat"]
    textconv = msgcat --no-location --no-wrap --sort-output

    # these diff defs use po_diff/pot_diff from https://github.com/alikins/gitconfig
    # change the 'diff' in .gitattributes to diff=po or diff=pot to use

    # convert po files to a less noisy
    # # variant for display in git log -p etc
    # # note that textconv does not affect
    # # git-format-patch output
    [diff "po"]
    textconv = po_diff
    cachetextconv = true

    [diff "pot"]
    textconv = pot_diff
    # the line's it was picking for the "funcname"
    # context were kind of terrible for this case, so
    # just match a blank line so it's empty
    xfuncname = ^$
    cachetextconv = true