Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Commits on Oct 29, 2012
  1. @pclouds @peff

    Move try_merge_command and checkout_fast_forward to libgit.a

    pclouds authored peff committed
    These functions are called in sequencer.c, which is part of
    libgit.a. This makes libgit.a potentially require builtin/merge.c for
    external git commands.
    
    Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
    Signed-off-by: Jeff King <peff@peff.net>
Commits on Aug 14, 2011
  1. @newren @gitster

    merge-recursive: Save D/F conflict filenames instead of unlinking them

    newren authored gitster committed
    Rename make_room_for_directories_of_df_conflicts() to
    record_df_conflict_files() to reflect the change in functionality.
    
    Signed-off-by: Elijah Newren <newren@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Mar 20, 2011
  1. @gitster

    Merge branch 'jk/merge-rename-ux'

    gitster authored
    * jk/merge-rename-ux:
      pull: propagate --progress to merge
      merge: enable progress reporting for rename detection
      add inexact rename detection progress infrastructure
      commit: stop setting rename limit
      bump rename limit defaults (again)
      merge: improve inexact rename limit warning
Commits on Feb 21, 2011
  1. @peff @gitster

    merge: enable progress reporting for rename detection

    peff authored gitster committed
    The user can enable or disable it explicitly with the new
    --progress, but it defaults to checking isatty(2).
    
    This works only with merge-recursive and subtree. In theory
    we could pass a progress flag to other strategies, but none
    of them support progress at this point, so let's wait until
    they grow such a feature before worrying about propagating
    it.
    
    Signed-off-by: Jeff King <peff@peff.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. @peff @gitster

    merge: improve inexact rename limit warning

    peff authored gitster committed
    The warning is generated deep in the diffcore code, which
    means that it will come first, followed possibly by a spew
    of conflicts, making it hard to see.
    
    Instead, let's have diffcore pass back the information about
    how big the rename limit would needed to have been, and then
    the caller can provide a more appropriate message (and at a
    more appropriate time).
    
    No refactoring of other non-merge callers is necessary,
    because nobody else was even using the warn_on_rename_limit
    feature.
    
    Signed-off-by: Jeff King <peff@peff.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Dec 28, 2010
  1. @jrn @gitster

    cherry-pick/revert: add support for -X/--strategy-option

    jrn authored gitster committed
    For example, this would allow cherry-picking or reverting patches from
    a piece of history with a different end-of-line style, like so:
    
    	$ git revert -Xrenormalize old-problematic-commit
    
    Currently that is possible with manual use of merge-recursive but the
    cherry-pick/revert porcelain does not expose the functionality.
    
    While at it, document the existing support for --strategy.
    
    Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Oct 27, 2010
  1. @gitster

    Merge branch 'kb/merge-recursive-rename-threshold'

    gitster authored
    * kb/merge-recursive-rename-threshold:
      diff: add synonyms for -M, -C, -B
      merge-recursive: option to specify rename threshold
    
    Conflicts:
    	Documentation/diff-options.txt
    	Documentation/merge-strategies.txt
  2. @gitster

    Merge branch 'jf/merge-ignore-ws'

    gitster authored
    * jf/merge-ignore-ws:
      merge-recursive: options to ignore whitespace changes
      merge-recursive --patience
      ll-merge: replace flag argument with options struct
      merge-recursive: expose merge options for builtin merge
Commits on Sep 29, 2010
  1. @kballard @gitster

    merge-recursive: option to specify rename threshold

    kballard authored gitster committed
    The recursive merge strategy turns on rename detection but leaves the
    rename threshold at the default. Add a strategy option to allow the user
    to specify a rename threshold to use.
    
    Signed-off-by: Kevin Ballard <kevin@sb.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Sep 4, 2010
  1. @gitster

    Merge branch 'dg/local-mod-error-messages'

    gitster authored
    * dg/local-mod-error-messages:
      t7609-merge-co-error-msgs: test non-fast forward case too.
      Move "show_all_errors = 1" to setup_unpack_trees_porcelain()
      setup_unpack_trees_porcelain: take the whole options struct as parameter
      Move set_porcelain_error_msgs to unpack-trees.c and rename it
    
    Conflicts:
    	merge-recursive.c
Commits on Sep 3, 2010
  1. @gitster

    Merge branch 'jn/merge-renormalize'

    gitster authored
    * jn/merge-renormalize:
      merge-recursive --renormalize
      rerere: never renormalize
      rerere: migrate to parse-options API
      t4200 (rerere): modernize style
      ll-merge: let caller decide whether to renormalize
      ll-merge: make flag easier to populate
      Documentation/technical: document ll_merge
      merge-trees: let caller decide whether to renormalize
      merge-trees: push choice to renormalize away from low level
      t6038 (merge.renormalize): check that it can be turned off
      t6038 (merge.renormalize): try checkout -m and cherry-pick
      t6038 (merge.renormalize): style nitpicks
      Don't expand CRLFs when normalizing text during merge
      Try normalizing files to avoid delete/modify conflicts when merging
      Avoid conflicts when merging branches with mixed normalization
    
    Conflicts:
    	builtin/rerere.c
    	t/t4200-rerere.sh
  2. @moy @gitster

    Move set_porcelain_error_msgs to unpack-trees.c and rename it

    moy authored gitster committed
    The function is currently dealing only with error messages, but the
    intent of calling it is really to notify the unpack-tree mechanics that
    it is running in porcelain mode.
    
    Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Aug 26, 2010
  1. @gitster

    merge-recursive --patience

    Justin Frankel authored gitster committed
    Teach the merge-recursive strategy a --patience option to use the
    "patience diff" algorithm, which tends to improve results when
    cherry-picking a patch that reorders functions at the same time as
    refactoring them.
    
    To support this, struct merge_options and ll_merge_options gain an
    xdl_opts member, so programs can use arbitrary xdiff flags (think
    "XDF_IGNORE_WHITESPACE") in a git-aware merge.
    
    git merge and git rebase can be passed the -Xpatience option to
    use this.
    
    [jn: split from --ignore-space patch; with documentation]
    
    Signed-off-by: Justin Frankel <justin@cockos.com>
    Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. @jrn @gitster

    merge-recursive: expose merge options for builtin merge

    jrn authored gitster committed
    There are two very similar blocks of code that recognize options for
    the "recursive" merge strategy.  Unify them.
    
    No functional change intended.
    
    Cc: Avery Pennarun <apenwarr@gmail.com>
    Helped-by: Junio C Hamano <gitster@pobox.com>
    Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Aug 11, 2010
  1. @gitster

    merge-recursive: porcelain messages for checkout

    Diane Gasselin authored gitster committed
    A porcelain message was first added in checkout.c in the commit
    8ccba00 (Junio C Hamano, Sat May 17 21:03:49 2008, unpack-trees:
    allow Porcelain to give different error messages) to give better feedback
    in the case of merge errors.
    
    This patch adapts the porcelain messages for the case of checkout
    instead. This way, when having a checkout error, "merge" no longer
    appears in the error message.
    
    While we're there, we add an advice in the case of
    would_lose_untracked_file.
    
    Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. @moy @gitster

    Turn unpack_trees_options.msgs into an array + enum

    moy authored gitster committed
    The list of error messages was introduced as a structure, but an array
    indexed over an enum is more flexible, since it allows one to store a
    type of error message (index in the array) in a variable.
    
    This change needs to rename would_lose_untracked ->
    would_lose_untracked_file to avoid a clash with the function
    would_lose_untracked in merge-recursive.c.
    
    Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Aug 6, 2010
  1. @jrn @gitster

    merge-trees: let caller decide whether to renormalize

    jrn authored gitster committed
    Add a "renormalize" option to struct merge_options so callers can
    decide on a case-by-case basis whether the merge is likely to have
    overlapped with a change in smudge/clean rules.  The option defaults
    to the global merge_renormalize setting for now.
    
    No change in behavior intended.
    
    Cc: Eyvind Bernhardsen <eyvind.bernhardsen@gmail.com>
    Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Jun 21, 2010
  1. @gitster

    Merge branch 'gv/portable'

    gitster authored
    * gv/portable:
      test-lib: use DIFF definition from GIT-BUILD-OPTIONS
      build: propagate $DIFF to scripts
      Makefile: Tru64 portability fix
      Makefile: HP-UX 10.20 portability fixes
      Makefile: HPUX11 portability fixes
      Makefile: SunOS 5.6 portability fix
      inline declaration does not work on AIX
      Allow disabling "inline"
      Some platforms lack socklen_t type
      Make NO_{INET_NTOP,INET_PTON} configured independently
      Makefile: some platforms do not have hstrerror anywhere
      git-compat-util.h: some platforms with mmap() lack MAP_FAILED definition
      test_cmp: do not use "diff -u" on platforms that lack one
      fixup: do not unconditionally disable "diff -u"
      tests: use "test_cmp", not "diff", when verifying the result
      Do not use "diff" found on PATH while building and installing
      enums: omit trailing comma for portability
      Makefile: -lpthread may still be necessary when libc has only pthread stubs
      Rewrite dynamic structure initializations to runtime assignment
      Makefile: pass CPPFLAGS through to fllow customization
    
    Conflicts:
    	Makefile
    	wt-status.h
Commits on May 31, 2010
  1. @gitster

    enums: omit trailing comma for portability

    Gary V. Vaughan authored gitster committed
    Without this patch at least IBM VisualAge C 5.0 (I have 5.0.2) on AIX
    5.1 fails to compile git.
    
    enum style is inconsistent already, with some enums declared on one
    line, some over 3 lines with the enum values all on the middle line,
    sometimes with 1 enum value per line... and independently of that the
    trailing comma is sometimes present and other times absent, often
    mixing with/without trailing comma styles in a single file, and
    sometimes in consecutive enum declarations.
    
    Clearly, omitting the comma is the more portable style, and this patch
    changes all enum declarations to use the portable omitted dangling
    comma style consistently.
    
    Signed-off-by: Gary V. Vaughan <gary@thewrittenword.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Apr 1, 2010
  1. @chriscool @gitster

    merge: make function try_merge_command non static

    chriscool authored gitster committed
    Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Mar 21, 2010
  1. @jrn @gitster

    merge_trees(): add ancestor label parameter for diff3-style output

    jrn authored gitster committed
    Commands using the merge_trees() machinery will present conflict hunks
    in output something like what ‘diff3 -m’ produces if the
    merge.conflictstyle configuration option is set to diff3.  The output
    lacks the name of the merge base on the ||||||| line of the output,
    and tools can misparse the conflict hunks without it.  Add a new
    o->ancestor parameter to merge_trees() for use as a label for the
    ancestor in conflict hunks.
    
    If o->ancestor is NULL, the output format is as before.  All callers
    pass NULL for now.
    
    If o->ancestor is non-NULL and both branches renamed the base file
    to the same name, that name is included in the conflict hunk labels.
    Even if o->ancestor is NULL I think this would be a good change, but
    this patch only does it in the non-NULL case to ensure the output
    format does not change where it might matter.
    
    Requested-by: Stefan Monnier <monnier@iro.umontreal.ca>
    Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Jan 21, 2010
  1. @gitster

    Merge branch 'ap/merge-backend-opts'

    gitster authored
    * ap/merge-backend-opts:
      Document that merge strategies can now take their own options
      Extend merge-subtree tests to test -Xsubtree=dir.
      Make "subtree" part more orthogonal to the rest of merge-recursive.
      pull: Fix parsing of -X<option>
      Teach git-pull to pass -X<option> to git-merge
      git merge -X<option>
      git-merge-file --ours, --theirs
    
    Conflicts:
    	git-compat-util.h
Commits on Jan 18, 2010
  1. @gitster

    Make "subtree" part more orthogonal to the rest of merge-recursive.

    gitster authored
    This makes "subtree" more orthogonal to the rest of recursive merge, so
    that you can use subtree and ours/theirs features at the same time.  For
    example, you can now say:
    
    	git merge -s subtree -Xtheirs other
    
    to merge with "other" branch while shifting it up or down to match the
    shape of the tree of the current branch, and resolving conflicts favoring
    the changes "other" branch made over changes made in the current branch.
    
    It also allows the prefix used to shift the trees to be specified using
    the "-Xsubtree=$prefix" option.  Giving an empty prefix tells the command
    to figure out how much to shift trees automatically as we have always
    done.  "merge -s subtree" is the same as "merge -s recursive -Xsubtree="
    (or "merge -s recursive -Xsubtree").
    
    Based on an old patch done back in the days when git-merge was a script;
    Avery ported the script part to builtin-merge.c.  Bugs in shift_tree()
    is mine.
    
    Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. @apenwarr @gitster

    git merge -X<option>

    apenwarr authored gitster committed
    Teach "-X <option>" command line argument to "git merge" that is passed to
    strategy implementations.  "ours" and "theirs" autoresolution introduced
    by the previous commit can be asked to the recursive strategy.
    
    Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Nov 30, 2009
  1. @moy @gitster

    merge-recursive: make the error-message generation an extern function

    moy authored gitster committed
    The construction of the struct unpack_trees_error_msgs was done within
    git_merge_trees(), which prevented using the same messages easily from
    another function.
    
    [jc: backported for 1.6.5 maint before advice_commit_before_merge]
    
    Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Sep 5, 2008
  1. @gitster

    merge-recursive: move current_{file,directory}_set to struct merge_op…

    Miklos Vajna authored gitster committed
    …tions
    
    Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
  2. @gitster

    merge-recursive: move the global obuf to struct merge_options

    Miklos Vajna authored gitster committed
    Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Commits on Sep 4, 2008
  1. @gitster

    merge-recursive: move call_depth to struct merge_options

    Miklos Vajna authored gitster committed
    Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Commits on Aug 31, 2008
  1. @gitster

    merge-recursive: introduce merge_options

    Miklos Vajna authored gitster committed
    This makes it possible to avoid passing the labels of branches as
    arguments to merge_recursive(), merge_trees() and
    merge_recursive_generic().
    
    It also takes care of subtree merge, output buffering, verbosity, and
    rename limits - these were global variables till now in
    merge-recursive.c.
    
    A new function, named init_merge_options(), is introduced as well, it
    clears the struct merge_info, then initializes with default values,
    finally updates the default values based on the config and environment
    variables.
    
    Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. @sbeyer @gitster

    merge-recursive.c: Add more generic merge_recursive_generic()

    sbeyer authored gitster committed
    merge_recursive_generic() takes, in comparison to to merge_recursive(),
    no commit ("struct commit *") arguments but SHA ids ("unsigned char *"),
    and no commit list of bases but an array of refs ("const char **").
    
    This makes it more generic in the case that it can also take the SHA
    of a tree to merge trees without commits, for the bases, the head
    and the remote.
    
    merge_recursive_generic() also handles locking and updating of the
    index, which is a common use case of merge_recursive().
    
    This patch also rewrites builtin-merge-recursive.c to make use of
    merge_recursive_generic().  By doing this, I stumbled over the
    limitation of 20 bases and I've added a warning if this limitation
    is exceeded.
    
    This patch qualifies make_virtual_commit() as static again because
    this function is not needed anymore outside merge-recursive.c.
    
    Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  3. @gitster

    Split out merge_recursive() to merge-recursive.c

    Miklos Vajna authored gitster committed
    Move most of the of code from builtin-merge-recursive.c to a new file
    merge-recursive.c and introduce merge_recursive_setup() in there so that
    builtin-merge-recursive and other builtins call it.
    
    Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Feb 10, 2008
  1. @gitster

    Build-in merge-recursive

    Daniel Barkalow authored gitster committed
    This makes write_tree_from_memory(), which writes the active cache as
    a tree and returns the struct tree for it, available to other code. It
    also makes available merge_trees(), which does the internal merge of
    two trees with a known base, and merge_recursive(), which does the
    recursive internal merge of two commits with a list of common
    ancestors.
    
    The first two of these will be used by checkout -m, and the third is
    presumably useful in general, although the implementation of checkout
    -m which entirely matches the behavior of the shell version does not
    use it (since it ignores the difference of ancestry between the old
    branch and the new branch).
    
    Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
Something went wrong with that request. Please try again.