Merge branch 'ap/merge-backend-opts'
authorJunio C Hamano <gitster@pobox.com>
Thu, 21 Jan 2010 04:28:50 +0000 (20:28 -0800)
committerJunio C Hamano <gitster@pobox.com>
Thu, 21 Jan 2010 04:28:50 +0000 (20:28 -0800)
* 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

1  2 
Documentation/git-merge-file.txt
Documentation/merge-options.txt
builtin-merge.c
cache.h
git-compat-util.h
git-pull.sh
git.c
ll-merge.c
merge-recursive.c
merge-recursive.h
strbuf.c
Simple merge
Simple merge
diff --cc builtin-merge.c
index 9f60ffa2cd32fd78c04d81135cee42b584627e7c,3aa7ea4052c2eb3c41d955b24fdbd3cfd1ec1124..3aaec7bed76af9efdfe5647be0da64373db2011e
@@@ -51,9 -50,10 +51,11 @@@ static struct commit_list *remoteheads
  static unsigned char head[20], stash[20];
  static struct strategy **use_strategies;
  static size_t use_strategies_nr, use_strategies_alloc;
+ static const char **xopts;
+ static size_t xopts_nr, xopts_alloc;
  static const char *branch;
  static int verbosity;
 +static int allow_rerere_auto;
  
  static struct strategy all_strategy[] = {
        { "recursive",  DEFAULT_TWOHEAD | NO_TRIVIAL },
@@@ -172,9 -183,10 +185,11 @@@ static struct option builtin_merge_opti
                "allow fast-forward (default)"),
        OPT_BOOLEAN(0, "ff-only", &fast_forward_only,
                "abort if fast-forward is not possible"),
 +      OPT_RERERE_AUTOUPDATE(&allow_rerere_auto),
        OPT_CALLBACK('s', "strategy", &use_strategies, "strategy",
                "merge strategy to use", option_parse_strategy),
+       OPT_CALLBACK('X', "strategy-option", &xopts, "option=value",
+               "option for selected merge strategy", option_parse_x),
        OPT_CALLBACK('m', "message", &merge_msg, "message",
                "message to be used for the merge commit (if any)",
                option_parse_message),
diff --cc cache.h
Simple merge
index 60c8432f854f345b77b469d64dd1429cee74d30d,f64cc454e7b63b7922bd425218dfdb52ba5c6038..aff627a85a812bb782e68cd27d06eb42d7dac537
@@@ -199,6 -198,8 +199,7 @@@ extern void warning(const char *err, ..
  extern void set_die_routine(NORETURN_PTR void (*routine)(const char *err, va_list params));
  
  extern int prefixcmp(const char *str, const char *prefix);
 -extern time_t tm_to_time_t(const struct tm *tm);
+ extern int suffixcmp(const char *str, const char *suffix);
  
  static inline const char *skip_prefix(const char *str, const char *prefix)
  {
diff --cc git-pull.sh
Simple merge
diff --cc git.c
Simple merge
diff --cc ll-merge.c
Simple merge
Simple merge
Simple merge
diff --cc strbuf.c
Simple merge