-
Notifications
You must be signed in to change notification settings - Fork 281
Merging with a custom merge driver #656
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
AFAIK there's no automatic support in libgit2, so you'll have to grab the interesting parts of git2/sys/merge.h to make it work. |
@tiennou thanks for the reply! I'm afraid I'm not well versed with libgit2, could you give me any pointers as to where to start? |
You might be able to get more help from StackOverflow (as in, most of the developers follow the libgit2 tag). Note that I've never used that part of the code too, so YMMV. You'll need to declare your own Your apply function should now get called when merging files with the attribute you want (I think this is automatic, but I sincerely don't know), so for now return Then, it should be just a matter of using the apply function parameters, most notably the HTH! |
Thanks, that definitely helped! What do you mean by my "attribute" name? |
Not sure, actually 😆. I was under the impression you would have to declare a .gitattributes pattern for which files should be merged with a custom driver, but the docs explicitely say it's unrelated to attributes. Well, I'm confused now. It seems you have to add a |
Closing because AFAIK it's not really an issue. Feel free to reopen though ! |
Uh oh!
There was an error while loading. Please reload this page.
There is a merge driver present in my repository, which is set up in config and attributes, and it works correctly via the command line, however when merging using
repo.mergeBranch()
(
- (BOOL)mergeBranchIntoCurrentBranch:(GTBranch *)fromBranch withError:(NSError **)error;
),the merge driver doesn't seem to be used.
Am I missing something, or is this something that's not implemented?
Thanks!
The text was updated successfully, but these errors were encountered: