1. 04 Nov, 2014 1 commit
  2. 18 Aug, 2014 1 commit
  3. 14 Jan, 2014 1 commit
  4. 01 Feb, 2013 1 commit
  5. 15 Oct, 2012 1 commit
    • Duy Nguyen's avatar
      attr: more matching optimizations from .gitignore · 82dce998
      Duy Nguyen authored
      .gitattributes and .gitignore share the same pattern syntax but has
      separate matching implementation. Over the years, ignore's
      implementation accumulates more optimizations while attr's stays the
      This patch reuses the core matching functions that are also used by
      excluded_from_list. excluded_from_list and path_matches can't be
      merged due to differences in exclude and attr, for example:
      * "!pattern" syntax is forbidden in .gitattributes.  As an attribute
        can be unset (i.e. set to a special value "false") or made back to
        unspecified (i.e. not even set to "false"), "!pattern attr" is unclear
        which one it means.
      * we support attaching attributes to directories, but git-core
        internally does not currently make use of attributes on
      Signed-off-by: Duy Nguyen's avatarNguyễn Thái Ngọc Duy <[email protected]>
      Signed-off-by: default avatarJunio C Hamano <[email protected]>
  6. 10 Oct, 2012 1 commit
  7. 17 Sep, 2012 1 commit
  8. 09 Sep, 2012 1 commit
  9. 25 Jun, 2012 1 commit
  10. 17 Feb, 2012 1 commit
    • Jehan Bing's avatar
      Add a setting to require a filter to be successful · 36daaaca
      Jehan Bing authored
      By default, a missing filter driver or a failure from the filter driver is
      not an error, but merely makes the filter operation a no-op pass through.
      This is useful to massage the content into a shape that is more convenient
      for the platform, filesystem, and the user to use, and the content filter
      mechanism is not used to turn something unusable into usable.
      However, we could also use of the content filtering mechanism and store
      the content that cannot be directly used in the repository (e.g. a UUID
      that refers to the true content stored outside git, or an encrypted
      content) and turn it into a usable form upon checkout (e.g. download the
      external content, or decrypt the encrypted content).  For such a use case,
      the content cannot be used when filter driver fails, and we need a way to
      tell Git to abort the whole operation for such a failing or missing filter
      Add a new "filter.<driver>.required" configuration variable to mark the
      second use case.  When it is set, git will abort the operation when the
      filter driver does not exist or exits with a non-zero status code.
      Signed-off-by: default avatarJehan Bing <[email protected]>
      Signed-off-by: default avatarJunio C Hamano <[email protected]>
  11. 16 Nov, 2011 1 commit
  12. 04 Aug, 2011 1 commit
  13. 03 Aug, 2011 2 commits
  14. 24 May, 2011 1 commit
  15. 18 Mar, 2011 1 commit
  16. 10 Jan, 2011 1 commit
  17. 27 Dec, 2010 1 commit
    • Jonathan Nieder's avatar
      diff: funcname and word patterns for perl · 71a5d4bc
      Jonathan Nieder authored
      The default function name discovery already works quite well for Perl
      code... with the exception of here-documents (or rather their ending).
       sub foo {
      	print <<END
      	return 1;
      The default funcname pattern treats the unindented END line as a
      function declaration and puts it in the @@ line of diff and "grep
      --show-function" output.
      With a little knowledge of perl syntax, we can do better.  You can
      try it out by adding "*.perl diff=perl" to the gitattributes file.
      Signed-off-by: default avatarJonathan Nieder <[email protected]>
      Signed-off-by: default avatarJunio C Hamano <[email protected]>
  18. 22 Dec, 2010 1 commit
    • Pete Wyckoff's avatar
      convert filter: supply path to external driver · a2b665de
      Pete Wyckoff authored
      Filtering to support keyword expansion may need the name of
      the file being filtered.  In particular, to support p4 keywords
          $File: //depot/product/dir/script.sh $
      the smudge filter needs to know the name of the file it is
      Allow "%f" in the custom filter command line specified in the
      configuration.  This will be substituted by the filename
      inside a single-quote pair to be passed to the shell.
      Signed-off-by: default avatarPete Wyckoff <[email protected]>
      Signed-off-by: default avatarJunio C Hamano <[email protected]>
  19. 01 Dec, 2010 1 commit
  20. 10 Sep, 2010 1 commit
    • Brandon Casey's avatar
      userdiff.c: add builtin fortran regex patterns · 909a5494
      Brandon Casey authored
      This adds fortran xfuncname and wordRegex patterns to the list of builtin
      patterns.  The intention is for the patterns to be appropriate for all
      versions of fortran including 77, 90, 95.  The patterns can be enabled by
      adding the diff=fortran attribute to the .gitattributes file for the
      desired file glob.
      This also adds a new macro named IPATTERN which is just like the PATTERNS
      macro except it sets the REG_ICASE flag so that case will be ignored.
      The test code in t4018 and the docs were updated as appropriate.
      Signed-off-by: default avatarBrandon Casey <[email protected]>
      Signed-off-by: default avatarJunio C Hamano <[email protected]>
  21. 01 Sep, 2010 1 commit
  22. 17 Aug, 2010 1 commit
  23. 02 Jul, 2010 1 commit
    • Eyvind Bernhardsen's avatar
      Avoid conflicts when merging branches with mixed normalization · f217f0e8
      Eyvind Bernhardsen authored
      Currently, merging across changes in line ending normalization is
      painful since files containing CRLF will conflict with normalized files,
      even if the only difference between the two versions is the line
      endings.  Additionally, any "real" merge conflicts that exist are
      obscured because every line in the file has a conflict.
      Assume you start out with a repo that has a lot of text files with CRLF
      checked in (A):
           /     \
      B: Add "* text=auto" to .gitattributes and normalize all files to
      C: Modify some of the text files
      D: Try to merge C
      You will get a ridiculous number of LF/CRLF conflicts when trying to
      merge C into D, since the repository contents for C are "wrong" wrt the
      new .gitattributes file.
      Fix ll-merge so that the "base", "theirs" and "ours" stages are passed
      through convert_to_worktree() and convert_to_git() before a three-way
      merge.  This ensures that all three stages are normalized in the same
      way, removing from consideration differences that are only due to
      This feature is optional for now since it changes a low-level mechanism
      and is not necessary for the majority of users.  The "merge.renormalize"
      config variable enables it.
      Signed-off-by: default avatarEyvind Bernhardsen <[email protected]>
      Signed-off-by: default avatarJunio C Hamano <[email protected]>
  24. 07 Jun, 2010 1 commit
    • Eyvind Bernhardsen's avatar
      Add "core.eol" config variable · 942e7747
      Eyvind Bernhardsen authored
      Introduce a new configuration variable, "core.eol", that allows the user
      to set which line endings to use for end-of-line-normalized files in the
      working directory.  It defaults to "native", which means CRLF on Windows
      and LF everywhere else.
      Note that "core.autocrlf" overrides core.eol.  This means that
      	autocrlf = true
      puts CRLFs in the working directory even if core.eol is set to "lf".
      Signed-off-by: default avatarEyvind Bernhardsen <[email protected]>
      Signed-off-by: default avatarJunio C Hamano <[email protected]>
  25. 20 May, 2010 2 commits
  26. 14 Apr, 2010 1 commit
    • Thomas Rast's avatar
      diff: add --word-diff option that generalizes --color-words · 882749a0
      Thomas Rast authored
      This teaches the --color-words engine a more general interface that
      supports two new modes:
      * --word-diff=plain, inspired by the 'wdiff' utility (most similar to
        'wdiff -n <old> <new>'): uses delimiters [-removed-] and {+added+}
      * --word-diff=porcelain, which generates an ad-hoc machine readable
        - each diff unit is prefixed by [-+ ] and terminated by newline as
          in unified diff
        - newlines in the input are output as a line consisting only of a
          tilde '~'
      Both of these formats still support color if it is enabled, using it
      to highlight the differences.  --color-words becomes a synonym for
      --word-diff=color, which is the color-only format.  Also adds some
      compatibility/convenience options.
      Thanks to Junio C Hamano and Miles Bader for good ideas.
      Signed-off-by: default avatarThomas Rast <[email protected]>
      Signed-off-by: default avatarJunio C Hamano <[email protected]>
  27. 02 Apr, 2010 1 commit
    • Jeff King's avatar
      diff: cache textconv output · d9bae1a1
      Jeff King authored
      Running a textconv filter can take a long time. It's
      particularly bad for a large file which needs to be spooled
      to disk, but even for small files, the fork+exec overhead
      can add up for something like "git log -p".
      This patch uses the notes-cache mechanism to keep a fast
      cache of textconv output. Caches are stored in
      refs/notes/textconv/$x, where $x is the userdiff driver
      defined in gitattributes.
      Caching is enabled only if diff.$x.cachetextconv is true.
      In my test repo, on a commit with 45 jpg and avi files
      changed and a textconv to show their exif tags:
        $ time git show >/dev/null
        real    0m13.724s
        user    0m12.057s
        sys     0m1.624s
        [after, first run]
        $ git config diff.mfo.cachetextconv true
        $ time git show >/dev/null
        real    0m14.252s
        user    0m12.197s
        sys     0m1.800s
        [after, subsequent runs]
        $ time git show >/dev/null
        real    0m0.352s
        user    0m0.148s
        sys     0m0.200s
      So for a slight (3.8%) cost on the first run, we achieve an
      almost 40x speed up on subsequent runs.
      Signed-off-by: default avatarJeff King <[email protected]>
      Signed-off-by: default avatarJunio C Hamano <[email protected]>
  28. 23 Feb, 2010 1 commit
  29. 21 Jan, 2010 1 commit
  30. 10 Jan, 2010 1 commit
    • Thomas Rast's avatar
      Documentation: spell 'git cmd' without dash throughout · 0b444cdb
      Thomas Rast authored
      The documentation was quite inconsistent when spelling 'git cmd' if it
      only refers to the program, not to some specific invocation syntax:
      both 'git-cmd' and 'git cmd' spellings exist.
      The current trend goes towards dashless forms, and there is precedent
      in 647ac702 (git-svn.txt: stop using dash-form of commands.,
      2009-07-07) to actively eliminate the dashed variants.
      Replace 'git-cmd' with 'git cmd' throughout, except where git-shell,
      git-cvsserver, git-upload-pack, git-receive-pack, and
      git-upload-archive are concerned, because those really live in the
  31. 15 Dec, 2009 1 commit
  32. 21 Oct, 2009 1 commit
  33. 12 Aug, 2009 1 commit
  34. 18 Apr, 2009 1 commit
    • Jeff King's avatar
      doc/gitattributes: clarify location of config text · c4c86d23
      Jeff King authored
      The gitattributes documentation has a section on the "diff"
      attribute, with subsections for each of the things you might
      want to configure in your diff config section (external
      diff, hunk headers, etc). The first such subsection
      specifically notes that the definition of the diff driver
      should go into $GIT_DIR/config, but subsequent sections do
      This location is implied if you are reading the
      documentation sequentially, but it is not uncommon for a new
      user to jump to (or be referred to) a specific section. For
      a new user who does not know git well enough to recognize
      the config syntax, it is not clear that those directives
      don't also go into the gitattributes file.
      This patch just mentions the config file in each subsection,
      similar to the way it is mentioned in the first.
      Signed-off-by: default avatarJeff King <[email protected]>
      Signed-off-by: default avatarJunio C Hamano <[email protected]>
  35. 08 Apr, 2009 1 commit
  36. 25 Feb, 2009 1 commit
  37. 22 Jan, 2009 1 commit
  38. 17 Jan, 2009 1 commit
    • Thomas Rast's avatar
      color-words: make regex configurable via attributes · 80c49c3d
      Thomas Rast authored
      Make the --color-words splitting regular expression configurable via
      the diff driver's 'wordregex' attribute.  The user can then set the
      driver on a file in .gitattributes.  If a regex is given on the
      command line, it overrides the driver's setting.
      We also provide built-in regexes for the languages that already had
      funcname patterns, and add an appropriate diff driver entry for C/++.
      (The patterns are designed to run UTF-8 sequences into a single chunk
      to make sure they remain readable.)
      Signed-off-by: default avatarThomas Rast <[email protected]>
      Signed-off-by: default avatarJunio C Hamano <[email protected]>