|
b924df1e
|
2018-01-21T18:05:45
|
|
merge: reverse merge bases for recursive merge
When the commits being merged have multiple merge bases, reverse the
order when creating the virtual merge base. This is for compatibility
with git's merge-recursive algorithm, and ensures that we build
identical trees.
Git does this to try to use older merge bases first. Per 8918b0c:
> It seems to be the only sane way to do it: when a two-head merge is
> done, and the merge-base and one of the two branches agree, the
> merge assumes that the other branch has something new.
>
> If we start creating virtual commits from newer merge-bases, and go
> back to older merge-bases, and then merge with newer commits again,
> chances are that a patch is lost, _because_ the merge-base and the
> head agree on it. Unlikely, yes, but it happened to me.
|
|
185b0d08
|
2018-01-20T19:41:28
|
|
merge: recursive uses larger conflict markers
Git uses longer conflict markers in the recursive merge base - two more
than the default (thus, 9 character long conflict markers). This allows
users to tell the difference between the recursive merge conflicts and
conflicts between the ours and theirs branches.
This was introduced in git d694a17986a28bbc19e2a6c32404ca24572e400f.
Update our tests to expect this as well.
|
|
2a3e0635
|
2017-12-04T16:56:07
|
|
Do not attempt to check out submodule as blob when merging a submodule modify/deltete conflict
|
|
7a74590d
|
2015-12-03T09:57:56
|
|
Fix rebase bug and include test for merge=union
|
|
6abdf52d
|
2016-03-07T09:37:51
|
|
merge::workdir::dirty: update to use `st_ctime_nsec`
Update unit test to use newfangled `st_ctime_nsec`, which provides
indirection to the platform-correct name.
|
|
35439f59
|
2016-02-11T12:24:21
|
|
win32: introduce p_timeval that isn't stupid
Windows defines `timeval` with `long`, which we cannot
sanely cope with. Instead, use a custom timeval struct.
|
|
263e674e
|
2016-02-11T11:41:23
|
|
merge tests: correct casts
|
|
78859c63
|
2015-11-20T17:33:49
|
|
merge: handle conflicts in recursive base building
When building a recursive merge base, allow conflicts to occur.
Use the file (with conflict markers) as the common ancestor.
The user has already seen and dealt with this conflict by virtue
of having a criss-cross merge. If they resolved this conflict
identically in both branches, then there will be no conflict in the
result. This is the best case scenario.
If they did not resolve the conflict identically in the two branches,
then we will generate a new conflict. If the user is simply using
standard conflict output then the results will be fairly sensible.
But if the user is using a mergetool or using diff3 output, then the
common ancestor will be a conflict file (itself with diff3 output,
haha!). This is quite terrible, but it matches git's behavior.
|
|
651bfd69
|
2015-11-09T08:24:47
|
|
recursive: test conflict output during recursive merge
|
|
dcde5720
|
2015-11-09T08:23:27
|
|
merge tests: move expected data into own file
|
|
fa78782f
|
2015-10-22T17:00:09
|
|
merge: rename `git_merge_tree_flags_t` -> `git_merge_flags_t`
|
|
e9e6df2c
|
2015-06-15T09:28:55
|
|
cmake: Only provide USE_NSEC if struct stat members are avilable.
This allows us to remove OS checks from source code, instead relying
on CMake to detect whether or not `struct stat` has the nanoseconds
members we rely on.
|
|
e7de893e
|
2015-06-01T13:43:54
|
|
cmake: add USE_NSEC, and only check nanosec m/ctime if enabled
|
|
5b05f954
|
2015-06-20T13:17:06
|
|
merge: work around write-side racy protection when hacking the index
As we attempt to replicate a situation in which an older checkout has
put a file on disk with different filtering settings from us, set the
timestamp on the entry and file to a second before we're performing the
operation so the entry in the index counts as old.
This way we can test that we're not looking at the on-disk file when the
index has the entry and we detect it as clean.
|
|
fef5344c
|
2015-06-16T16:34:25
|
|
merge::workdir::dirty: tick idx to defeat racy-git
|
|
9f545b9d
|
2015-05-19T11:23:59
|
|
introduce `git_index_entry_is_conflict`
It's not always obvious the mapping between stage level and
conflict-ness. More importantly, this can lead otherwise sane
people to write constructs like `if (!git_index_entry_stage(entry))`,
which (while technically correct) is unreadable.
Provide a nice method to help avoid such messy thinking.
|
|
f29dde68
|
2015-03-12T12:29:47
|
|
Renamed git_merge_options 'flags' to 'tree_flags'
|
|
23a17803
|
2015-01-07T14:16:50
|
|
reset: remove reflog message override
This function is meant to simulate what git does in the reset command,
so we should include the reflog message in that.
|
|
659cf202
|
2015-01-07T12:23:05
|
|
Remove the signature from ref-modifying functions
The signature for the reflog is not something which changes
dynamically. Almost all uses will be NULL, since we want for the
repository's default identity to be used, making it noise.
In order to allow for changing the identity, we instead provide
git_repository_set_ident() and git_repository_ident() which allow a user
to override the choice of signature.
|
|
8b0ddd5d
|
2015-01-17T23:28:53
|
|
merge: lock the index at the start of the merge
Always lock the index when we begin the merge, before we write
any of the metdata files. This prevents a race where another
client may run a commit after we have written the MERGE_HEAD but
before we have updated the index, which will produce a merge
commit that is treesame to one parent. The merge will finish and
update the index and the resultant commit would not be a merge at
all.
|
|
42f98a26
|
2015-01-17T23:31:24
|
|
merge test: test an actual failure, not conflict
Correct the merge failed cleanup test. Merge data should not be
cleaned up on conflicts, only on actual failure. And ORIG_HEAD
should not be removed at all.
|
|
8e0aa2eb
|
2014-12-07T23:41:30
|
|
Fix broken merge tests due to autocrlf was not false
|
|
18b00406
|
2014-10-03T19:02:29
|
|
s/git_merge_head/git_annotated_commit
Rename git_merge_head to git_annotated_commit, as it becomes used
in more operations than just merge.
|
|
b8add6c4
|
2014-08-03T15:44:13
|
|
Allow to propagate checkout callbacks to git HARD reset
Signed-off-by: Sven Strickroth <email@cs-ware.de>
|
|
967f5a76
|
2014-05-23T14:50:51
|
|
git_checkout_index: checkout other indexes
git_checkout_index can now check out other git_index's (that are not
necessarily the repository index). This allows checkout_index to use
the repository's index for stat cache information instead of the index
data being checked out. git_merge and friends now check out their
indexes directly instead of trying to blend it into the running index.
|
|
eff531e1
|
2014-05-27T20:58:20
|
|
Modify GIT_MERGE_CONFIG -> GIT_MERGE_PREFERENCE
|
|
a3622ba6
|
2014-05-16T13:54:40
|
|
Move GIT_MERGE_CONFIG_* to its own enum
|
|
d362093f
|
2014-05-08T15:41:36
|
|
Introduce GIT_MERGE_CONFIG_* for merge.ff settings
git_merge_analysis will now return GIT_MERGE_CONFIG_NO_FASTFORWARD
when merge.ff=false and GIT_MERGE_CONFIG_FASTFORWARD_ONLY when
merge.ff=true
|
|
a4e2c36a
|
2014-04-23T19:40:21
|
|
merge: checkout default shouldn't clobber given
|
|
26564d80
|
2014-04-23T19:26:58
|
|
merge: default checkout strategy for should be SAFE
|
|
6fefb7af
|
2014-04-13T19:53:35
|
|
Capture conflict information in MERGE_MSG for revert and merge
|
|
976634c4
|
2014-03-30T19:56:18
|
|
Introduce git_merge_head_id
|
|
58c2b1c4
|
2014-03-20T09:35:22
|
|
UNBORN implies FAST_FORWARD
|
|
ac584fcf
|
2014-03-18T16:04:51
|
|
Introduce GIT_MERGE_ANALYSIS_UNBORN
|
|
97f3462a
|
2014-03-18T13:14:09
|
|
git_merge_status -> git_merge_analysis
|
|
d9fdee6e
|
2014-03-12T09:43:53
|
|
Remove `git_merge_result` as it's now unnecessary
|
|
5aa2ac6d
|
2014-03-11T22:47:39
|
|
Update git_merge_tree_opts to git_merge_options
|
|
02105a27
|
2014-03-11T18:40:38
|
|
Change signature of `git_merge` to take merge and checkout opts
|
|
1c0b6a38
|
2014-03-11T17:58:10
|
|
Remove fastforward / uptodate from `git_merge`
|
|
ccb30827
|
2014-03-11T17:19:35
|
|
Add `git_merge_status` to provide info about an upcoming merge
|
|
05d47768
|
2014-03-10T22:30:41
|
|
Introduce git_merge_file for consumers
|
|
6affd71f
|
2014-01-03T17:38:34
|
|
git_checkout_opts -> git_checkout_options
|
|
a2ce19ca
|
2014-02-05T13:35:26
|
|
Prevent user's merge.conflictstyle from breaking tests
|
|
5c8be325
|
2014-02-05T13:32:45
|
|
Fix a few references to changed function signatures
|
|
0de2c4e3
|
2014-02-05T13:15:57
|
|
Merge remote-tracking branch 'libgit2/development' into bs/more-reflog-stuff
|
|
bb13d391
|
2014-02-01T12:51:44
|
|
Test that emulates a strange filter implementation
|
|
16eb8b7c
|
2014-02-01T12:02:55
|
|
Tests merging staged files identical to result
|
|
b60149ec
|
2014-01-31T18:43:50
|
|
Tests merge when changes exist in workdir/index
|
|
586be3b8
|
2014-02-03T15:05:55
|
|
Add reflog parameters to git_reset
|
|
a1bbc0ce
|
2014-01-25T04:14:37
|
|
merge: rename _oid() -> id()
Following the rest of the series, use 'id' when refering to the value.
|
|
d541170c
|
2014-01-24T11:36:41
|
|
index: rename an entry's id to 'id'
This was not converted when we converted the rest, so do it now.
|
|
0ef19fe1
|
2014-01-20T17:13:55
|
|
Merge submodules
|
|
db3462ce
|
2014-01-19T22:36:50
|
|
Support union merges
|
|
0e1ba46c
|
2014-01-19T20:03:13
|
|
Remove the "merge none" flag
The "merge none" (don't automerge) flag was only to aide in
merge trivial tests. We can easily determine whether merge
trivial resulted in a trivial merge or an automerge by examining
the REUC after automerge has completed.
|
|
6891a862
|
2014-01-19T18:12:22
|
|
Load merge.conflictstyle setting from config
|
|
e651e8e2
|
2014-01-19T15:05:08
|
|
Introduce diff3 mode for checking out conflicts
|
|
6b92c99b
|
2014-01-19T01:20:25
|
|
Don't try to merge binary files
|
|
c1d648c5
|
2014-01-08T18:29:42
|
|
merge_file should use more aggressive levels
The default merge_file level was XDL_MERGE_MINIMAL, which will
produce conflicts where there should not be in the case where
both sides were changed identically. Change the defaults to be
more aggressive (XDL_MERGE_ZEALOUS) which will more aggressively
compress non-conflicts. This matches git.git's defaults.
Increase testing around reverting a previously reverted commit to
illustrate this problem.
|
|
0b28217b
|
2014-01-15T12:51:31
|
|
refs: remove the _with_log differentiation
Any well-behaved program should write a descriptive message to the
reflog whenever it updates a reference. Let's make this more prominent
by removing the version without the reflog parameters.
|
|
17820381
|
2013-11-14T14:05:52
|
|
Rename tests-clar to tests
|