Junio C Hamano
74e8bc59cb
merge: handle FETCH_HEAD internally
...
The collect_parents() function now is responsible for
1. parsing the commits given on the command line into a list of
commits to be merged;
2. filtering these parents into independent ones; and
3. optionally calling fmt_merge_msg() via prepare_merge_message()
to prepare an auto-generated merge log message, using fake
contents that FETCH_HEAD would have had if these commits were
fetched from the current repository with "git pull . $args..."
Make "git merge FETCH_HEAD" to be the same as the traditional
git merge "$(git fmt-merge-msg <.git/FETCH_HEAD)" $commits
invocation of the command in "git pull", where $commits are the ones
that appear in FETCH_HEAD that are not marked as not-for-merge, by
making it do a bit more, specifically:
- noticing "FETCH_HEAD" is the only "commit" on the command line
and picking the commits that are not marked as not-for-merge as
the list of commits to be merged (substitute for step #1 above);
- letting the resulting list fed to step #2 above;
- doing the step #3 above, using the contents of the FETCH_HEAD
instead of fake contents crafted from the list of commits parsed
in the step #1 above.
Note that this changes the semantics. "git merge FETCH_HEAD" has
always behaved as if the first commit in the FETCH_HEAD file were
directly specified on the command line, creating a two-way merge
whose auto-generated merge log said "merge commit xyz". With this
change, if the previous fetch was to grab multiple branches (e.g.
"git fetch $there topic-a topic-b"), the new world order is to
create an octopus, behaving as if "git pull $there topic-a topic-b"
were run. This is a deliberate change to make that happen, and
can be seen in the changes to t3033 tests.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-04-29 13:27:31 -07:00
..
2014-11-04 13:14:44 -08:00
2015-01-12 14:06:12 -08:00
2014-11-04 13:14:44 -08:00
2013-02-02 21:46:52 -08:00
2013-02-01 13:53:25 -08:00
2013-08-06 14:34:43 -07:00
2013-04-03 16:14:19 -07:00
2014-07-16 11:33:03 -07:00
2014-12-22 12:16:58 -08:00
2013-11-12 10:47:17 -08:00
2014-05-21 13:57:10 -07:00
2010-01-31 10:24:53 -08:00
2014-03-31 15:16:22 -07:00
2014-03-31 15:16:22 -07:00
2009-04-06 00:27:09 -07:00
2010-08-20 10:53:56 -07:00
2014-10-10 16:02:26 -07:00
2014-06-05 15:13:12 -07:00
2014-04-08 12:00:28 -07:00
2015-01-12 14:00:16 -08:00
2011-07-06 14:26:26 -07:00
2013-02-01 13:53:33 -08:00
2013-02-01 13:53:33 -08:00
2014-02-28 09:55:35 -08:00
2014-11-04 13:14:44 -08:00
2014-05-21 13:57:10 -07:00
2014-02-11 11:03:07 -08:00
2013-09-09 11:03:01 -07:00
2013-02-01 13:53:33 -08:00
2013-12-26 11:54:26 -08:00
2013-09-04 12:23:25 -07:00
2013-09-12 15:40:29 -07:00
2013-07-13 10:19:37 -07:00
2013-09-12 14:39:34 -07:00
2011-03-11 10:59:16 -05:00
2014-01-21 13:50:00 -08:00
2014-03-24 10:43:34 -07:00
2013-11-27 12:16:49 -08:00
2011-07-06 14:26:26 -07:00
2014-11-04 13:14:44 -08:00
2014-02-11 11:03:07 -08:00
2014-01-27 08:34:34 -08:00
2014-02-24 14:51:35 -08:00
2014-11-18 10:19:42 -08:00
2014-05-21 13:57:10 -07:00
2014-03-31 15:16:22 -07:00
2014-09-16 11:11:58 -07:00
2013-02-01 13:53:33 -08:00
2014-11-06 09:51:08 -08:00
2013-09-06 14:49:06 -07:00
2013-02-01 13:53:33 -08:00
2014-11-04 13:14:44 -08:00
2014-11-04 13:14:44 -08:00
2014-05-21 13:57:10 -07:00
2013-09-04 15:03:03 -07:00
2011-07-06 14:26:26 -07:00
2013-05-20 15:50:44 -07:00
2011-05-26 22:15:39 -07:00
2014-03-31 15:16:22 -07:00
2014-10-28 10:36:57 -07:00
2014-11-19 13:47:56 -08:00
2014-11-11 14:47:04 -08:00
2013-12-17 11:34:24 -08:00
2014-06-12 09:59:13 -07:00
2014-11-04 13:14:44 -08:00
2013-05-17 12:09:21 -07:00
2014-01-27 08:34:34 -08:00
2014-05-27 12:38:32 -07:00
2011-07-06 14:26:26 -07:00
2013-05-17 12:09:21 -07:00
2014-03-31 10:26:24 -07:00
2011-07-06 14:26:26 -07:00
2014-03-20 12:38:00 -07:00
2013-02-01 13:53:33 -08:00
2013-02-01 13:53:33 -08:00
2014-05-21 13:57:10 -07:00
2014-04-09 11:45:04 -07:00
2013-02-01 13:53:33 -08:00
2011-07-06 14:26:26 -07:00
2014-10-13 13:35:37 -07:00
2013-05-28 08:07:20 -07:00
2013-02-01 13:53:33 -08:00
2014-08-08 13:17:42 -07:00
2011-10-16 11:09:35 -07:00
2014-11-04 13:14:44 -08:00
2013-12-17 11:35:41 -08:00
2014-05-21 13:57:10 -07:00
2013-06-23 00:33:58 -07:00
2011-03-11 10:59:16 -05:00
2013-05-17 12:09:21 -07:00
2011-07-06 14:26:26 -07:00
2013-10-29 13:06:08 -07:00
2013-08-09 14:19:59 -07:00
2013-04-15 11:08:37 -07:00
2011-07-06 14:26:26 -07:00
2013-09-04 15:02:56 -07:00
2015-04-29 13:27:31 -07:00
2013-02-01 13:53:33 -08:00
2014-04-24 11:29:05 -07:00
2013-02-01 13:53:33 -08:00
2011-07-06 14:26:26 -07:00
2014-01-07 14:33:04 -08:00
2013-09-04 15:03:03 -07:00
2014-03-24 10:43:34 -07:00
2014-01-22 08:06:20 -08:00
2014-03-11 13:32:10 -07:00
2011-07-06 14:26:26 -07:00
2013-07-18 16:23:46 -07:00
2011-07-06 14:26:26 -07:00
2014-06-10 13:09:24 -07:00
2014-10-13 13:35:18 -07:00
2014-03-31 15:16:22 -07:00
2014-02-05 14:03:47 -08:00
2014-12-22 12:18:17 -08:00
2014-10-13 13:35:18 -07:00
2014-05-21 13:57:10 -07:00
2014-10-14 10:49:07 -07:00
2014-09-17 15:19:54 -07:00
2013-05-29 14:23:04 -07:00
2011-07-06 14:26:26 -07:00
2014-11-11 14:47:04 -08:00
2014-11-11 14:47:04 -08:00
2013-02-01 14:12:34 -08:00
2013-02-07 14:41:45 -08:00
2014-02-11 11:03:07 -08:00
2014-03-18 13:50:29 -07:00
2014-07-27 15:14:18 -07:00
2014-03-13 14:22:20 -07:00
2012-04-26 13:19:06 -07:00
2014-04-08 12:00:28 -07:00
2014-08-29 12:37:02 -07:00
2014-11-04 13:14:44 -08:00
2014-03-24 10:43:34 -07:00
2014-01-07 14:34:06 -08:00
2014-06-20 13:12:20 -07:00
2014-08-26 12:58:02 -07:00
2012-03-28 11:18:35 -07:00
2011-09-11 21:52:18 -07:00
2013-10-18 13:50:12 -07:00
2014-05-08 10:26:26 -07:00
2013-04-21 23:11:02 -07:00
2014-03-31 15:16:22 -07:00
2013-04-15 11:08:37 -07:00
2014-03-31 15:16:22 -07:00
2013-07-17 17:50:56 -07:00
2014-10-13 13:35:18 -07:00
2014-02-24 09:13:30 -08:00
2014-10-19 20:45:16 -07:00
2013-02-05 16:13:32 -08:00
2014-07-10 11:08:31 -07:00
2014-11-04 13:14:44 -08:00
2012-10-21 12:17:38 -07:00
2014-10-07 13:40:51 -07:00
2013-04-12 12:00:52 -07:00
2011-07-06 14:26:26 -07:00
2013-11-07 14:37:36 -08:00
2014-11-04 13:14:44 -08:00
2014-04-07 12:09:13 -07:00
2011-07-06 14:26:26 -07:00
2014-02-28 09:55:37 -08:00
2013-02-01 13:53:33 -08:00
2013-02-01 13:53:33 -08:00
2014-06-23 15:50:31 -07:00
2013-04-15 11:08:37 -07:00
2013-04-15 11:08:37 -07:00
2014-05-21 13:57:10 -07:00
2013-08-13 09:01:54 -07:00
2011-07-06 14:26:26 -07:00
2015-01-12 14:06:12 -08:00
2014-11-04 13:14:44 -08:00
2014-05-21 13:57:10 -07:00
2014-10-10 16:02:26 -07:00
2013-02-01 13:53:33 -08:00
2014-10-10 16:02:26 -07:00
2013-06-03 10:53:11 -07:00
2014-10-10 16:02:26 -07:00
2014-10-10 16:02:26 -07:00
2014-11-04 13:14:44 -08:00
2014-11-12 12:13:12 -08:00
2014-05-21 13:57:10 -07:00
2014-04-07 10:32:20 -07:00
2013-02-01 13:53:33 -08:00
2014-11-11 14:47:04 -08:00
2014-06-13 11:49:39 -07:00
2013-02-01 13:53:33 -08:00
2014-11-19 13:47:59 -08:00
2014-11-19 13:47:59 -08:00
2014-05-21 13:57:10 -07:00
2014-02-20 14:14:58 -08:00
2013-02-01 13:53:33 -08:00
2014-11-04 13:14:44 -08:00
2014-04-17 11:14:57 -07:00
2013-02-01 13:53:33 -08:00
2011-11-08 13:37:10 -08:00
2014-04-17 11:14:58 -07:00
2013-08-06 14:48:02 -07:00
2013-01-05 23:41:42 -08:00
2014-10-29 10:07:40 -07:00
2009-03-27 00:33:19 -07:00
2009-12-05 10:03:49 -08:00
2009-04-01 11:02:42 -07:00
2009-03-27 00:33:20 -07:00
2009-03-27 00:33:19 -07:00
2009-10-22 12:59:50 -07:00
2009-04-01 11:02:42 -07:00
2013-02-07 14:42:16 -08:00
2014-03-31 15:16:22 -07:00
2014-04-03 13:39:03 -07:00
2014-10-29 10:35:10 -07:00
2014-03-31 15:16:22 -07:00
2014-06-12 09:59:13 -07:00
2014-11-04 13:14:44 -08:00
2014-05-13 12:35:00 -07:00
2011-11-22 18:16:59 -08:00
2014-11-13 10:39:24 -08:00
2013-02-01 13:53:33 -08:00
2013-07-21 22:51:24 -07:00
2012-08-07 14:30:52 -07:00
2014-06-16 12:18:39 -07:00