Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on May 9, 2012
  1. @gitster

    xdiff: remove emit_func() and xdi_diff_hunks()

    René Scharfe authored gitster committed
    The functions are unused now, remove them.
    
    Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on May 4, 2010
  1. @gitster

    Merge branch 'maint-1.7.0' into maint

    gitster authored
    * maint-1.7.0:
      remove ecb parameter from xdi_diff_outf()
  2. @gitster

    remove ecb parameter from xdi_diff_outf()

    René Scharfe authored gitster committed
    xdi_diff_outf() overrides the structure members of its last parameter,
    ignoring any value that callers pass in.  It's no surprise then that all
    callers pass a pointer to an uninitialized structure.  They also don't
    read it after the call, so the parameter is neither used for input nor
    for output.   Turn it into a local variable of xdi_diff_outf().
    
    Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
    Acked-by: Jeff King <peff@peff.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Feb 17, 2010
  1. @michaellukashov @gitster

    refactor duplicated fill_mm() in checkout and merge-recursive

    michaellukashov authored gitster committed
    The following function is duplicated:
    
      fill_mm
    
    Move it to xdiff-interface.c and rename it 'read_mmblob', as suggested
    by Junio C Hamano.
    
    Also, change parameters order for consistency with read_mmfile().
    
    Signed-off-by: Michael Lukashov <michael.lukashov@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Jul 2, 2009
  1. @gitster

    userdiff: add xdiff_clear_find_func()

    René Scharfe authored gitster committed
    xdiff_set_find_func() is used to set user defined regular expressions
    for finding function signatures.  Add xdiff_clear_find_func(), which
    frees the memory allocated by the former, making the API complete.
    
    Also, use the new function in diff.c (the only call site of
    xdiff_set_find_func()) to clean up after ourselves.
    
    Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Oct 25, 2008
  1. @gitster

    add xdi_diff_hunks() for callers that only need hunk lengths

    René Scharfe authored gitster committed
    Based on a patch by Brian Downing, this uses the xdiff emit_func feature
    to implement xdi_diff_hunks().  It's a function that calls a callback for
    each hunk of a diff, passing its lengths.
    
    Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Sep 29, 2008
  1. @spearce

    Merge branch 'bc/master-diff-hunk-header-fix'

    spearce authored
    * bc/master-diff-hunk-header-fix:
      Clarify commit error message for unmerged files
      Use strchrnul() instead of strchr() plus manual workaround
      Use remove_path from dir.c instead of own implementation
      Add remove_path: a function to remove as much as possible of a path
      git-submodule: Fix "Unable to checkout" for the initial 'update'
      Clarify how the user can satisfy stash's 'dirty state' check.
      t4018-diff-funcname: test syntax of builtin xfuncname patterns
      t4018-diff-funcname: test syntax of builtin xfuncname patterns
      make "git remote" report multiple URLs
      diff hunk pattern: fix misconverted "\{" tex macro introducers
      diff: fix "multiple regexp" semantics to find hunk header comment
      diff: use extended regexp to find hunk headers
      diff: use extended regexp to find hunk headers
      diff.*.xfuncname which uses "extended" regex's for hunk header selection
      diff.c: associate a flag with each pattern and use it for compiling regex
      diff.c: return pattern entry pointer rather than just the hunk header pattern
    
    Conflicts:
    	builtin-merge-recursive.c
    	t/t7201-co.sh
    	xdiff-interface.h
  2. @spearce

    Merge branch 'jc/better-conflict-resolution'

    spearce authored
    * jc/better-conflict-resolution:
      Fix AsciiDoc errors in merge documentation
      git-merge documentation: describe how conflict is presented
      checkout --conflict=<style>: recreate merge in a non-default style
      checkout -m: recreate merge when checking out of unmerged index
      git-merge-recursive: learn to honor merge.conflictstyle
      merge.conflictstyle: choose between "merge" and "diff3 -m" styles
      rerere: understand "diff3 -m" style conflicts with the original
      rerere.c: use symbolic constants to keep track of parsing states
      xmerge.c: "diff3 -m" style clips merge reduction level to EAGER or less
      xmerge.c: minimum readability fixups
      xdiff-merge: optionally show conflicts in "diff3 -m" style
      xdl_fill_merge_buffer(): separate out a too deeply nested function
      checkout --ours/--theirs: allow checking out one side of a conflicting merge
      checkout -f: allow ignoring unmerged paths when checking out of the index
    
    Conflicts:
    	Documentation/git-checkout.txt
    	builtin-checkout.c
    	builtin-merge-recursive.c
    	t/t7201-co.sh
Commits on Sep 19, 2008
  1. @gitster

    Merge branch 'bc/maint-diff-hunk-header-fix' into bc/master-diff-hunk…

    gitster authored
    …-header-fix
    
    * bc/maint-diff-hunk-header-fix:
      diff.*.xfuncname which uses "extended" regex's for hunk header selection
      diff.c: associate a flag with each pattern and use it for compiling regex
      diff.c: return pattern entry pointer rather than just the hunk header pattern
      Cosmetical command name fix
      Start conforming code to "git subcmd" style part 3
      t9700/test.pl: remove File::Temp requirement
      t9700/test.pl: avoid bareword 'STDERR' in 3-argument open()
      GIT 1.6.0.2
      Fix some manual typos.
      Use compatibility regex library also on FreeBSD
      Use compatibility regex library also on AIX
      Update draft release notes for 1.6.0.2
      Use compatibility regex library for OSX/Darwin
      git-svn: Fixes my() parameter list syntax error in pre-5.8 Perl
      Git.pm: Use File::Temp->tempfile instead of ->new
      t7501: always use test_cmp instead of diff
      Start conforming code to "git subcmd" style part 2
      diff: Help "less" hide ^M from the output
      checkout: do not check out unmerged higher stages randomly
    
    Conflicts:
    	Documentation/git.txt
    	Documentation/gitattributes.txt
    	Makefile
    	diff.c
    	t/t7201-co.sh
  2. @gitster

    diff.c: associate a flag with each pattern and use it for compiling r…

    Brandon Casey authored gitster committed
    …egex
    
    This is in preparation for allowing extended regular expression patterns.
    
    Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Aug 31, 2008
  1. @gitster

    merge.conflictstyle: choose between "merge" and "diff3 -m" styles

    gitster authored
    This teaches "git merge-file" to honor merge.conflictstyle configuration
    variable, whose value can be "merge" (default) or "diff3".
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Aug 14, 2008
  1. @gitster

    xdiff-interface: hide the whole "xdiff_emit_state" business from the …

    gitster authored
    …caller
    
    This further enhances xdi_diff_outf() interface so that it takes two
    common parameters: the callback function that processes one line at a
    time, and a pointer to its application specific callback data structure.
    xdi_diff_outf() creates its own "xdiff_emit_state" structure and stashes
    these two away inside it, which is used by the lowest level output
    function in the xdiff_outf() callchain, consume_one(), to call back to the
    application layer.  With this restructuring, we lift the requirement that
    the caller supplied callback data structure embeds xdiff_emit_state
    structure as its first member.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. @bdowning @gitster

    Use strbuf for struct xdiff_emit_state's remainder

    bdowning authored gitster committed
    Continually xreallocing and freeing the remainder member of struct
    xdiff_emit_state was a noticeable performance hit.  Use a strbuf
    instead.
    
    This yields a decent performance improvement on "git blame" on certain
    repositories.  For example, before this commit:
    
    $ time git blame -M -C -C -p --incremental server.c >/dev/null
    101.52user 0.17system 1:41.73elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
    0inputs+0outputs (0major+39561minor)pagefaults 0swaps
    
    With this commit:
    
    $ time git blame -M -C -C -p --incremental server.c >/dev/null
    80.38user 0.30system 1:20.81elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
    0inputs+0outputs (0major+50979minor)pagefaults 0swaps
    
    Signed-off-by: Brian Downing <bdowning@lavos.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  3. @bdowning @gitster

    Make xdi_diff_outf interface for running xdiff_outf diffs

    bdowning authored gitster committed
    To prepare for the need to initialize and release resources for an
    xdi_diff with the xdiff_outf output function, make a new function to
    wrap this usage.
    
    Old:
    
    	ecb.outf = xdiff_outf;
    	ecb.priv = &state;
    	...
    	xdi_diff(file_p, file_o, &xpp, &xecfg, &ecb);
    
    New:
    
    	xdi_diff_outf(file_p, file_o, &state.xm, &xpp, &xecfg, &ecb);
    
    Signed-off-by: Brian Downing <bdowning@lavos.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Dec 14, 2007
  1. @gitster

    xdl_diff: identify call sites.

    gitster authored
    This inserts a new function xdi_diff() that currently does not
    do anything other than calling the underlying xdl_diff() to the
    callchain of current callers of xdl_diff() function.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Jul 6, 2007
  1. @gitster

    Per-path attribute based hunk header selection.

    gitster authored
    This makes"diff -p" hunk headers customizable via gitattributes mechanism.
    It is based on Johannes's earlier patch that allowed to define a single
    regexp to be used for everything.
    
    The mechanism to arrive at the regexp that is used to define hunk header
    is the same as other use of gitattributes.  You assign an attribute, funcname
    (because "diff -p" typically uses the name of the function the patch is about
    as the hunk header), a simple string value.  This can be one of the names of
    built-in pattern (currently, "java" is defined) or a custom pattern name, to
    be looked up from the configuration file.
    
      (in .gitattributes)
      *.java   funcname=java
      *.perl   funcname=perl
    
      (in .git/config)
      [funcname]
        java = ... # ugly and complicated regexp to override the built-in one.
        perl = ... # another ugly and complicated regexp to define a new one.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Jun 5, 2007
  1. @dscho @gitster

    Move buffer_is_binary() to xdiff-interface.h

    dscho authored gitster committed
    We already have two instances where we want to determine if a buffer
    contains binary data as opposed to text.
    
    Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Dec 22, 2006
  1. @dscho

    move read_mmfile() into xdiff-interface

    dscho authored Junio C Hamano committed
    read_file() was a useful function if you want to work with the xdiff stuff,
    so it was renamed and put into a more central place.
    
    Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
    Signed-off-by: Junio C Hamano <junkio@cox.net>
Commits on Apr 7, 2006
  1. Match ofs/cnt types in diff interface.

    Junio C Hamano authored
    Signed-off-by: Junio C Hamano <junkio@cox.net>
Commits on Apr 5, 2006
  1. combine-diff: move the code to parse hunk-header into common library.

    Junio C Hamano authored
    Signed-off-by: Junio C Hamano <junkio@cox.net>
  2. combine-diff: refactor built-in xdiff interface.

    Junio C Hamano authored
    This refactors the line-by-line callback mechanism used in
    combine-diff so that other programs can reuse it more easily.
    
    Signed-off-by: Junio C Hamano <junkio@cox.net>
Something went wrong with that request. Please try again.