seafile-server/common/merge-new.h
feiniks d51591d8f7
get nickname from seahub database (#663)
* Add parse seahub database config

* Get nickname from seahub database

* Go get nickname from seahub database

* Save output of script to memory and fix some errors

* Add exec permission and free child_output

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-07-10 16:34:33 +08:00

36 lines
1 KiB
C

#ifndef MERGE_NEW_H
#define MERGE_NEW_H
#include "common.h"
#include "fs-mgr.h"
struct MergeOptions;
typedef int (*MergeCallback) (const char *basedir,
SeafDirent *dirents[],
struct MergeOptions *opt);
typedef struct MergeOptions {
int n_ways; /* only 2 and 3 way merges are supported. */
MergeCallback callback;
void * data;
/* options only used in 3-way merge. */
char remote_repo_id[37];
char remote_head[41];
gboolean do_merge; /* really merge the contents
* and handle conflicts */
char merged_tree_root[41]; /* merge result */
int visit_dirs;
gboolean conflict;
GHashTable *email_to_nickname;
} MergeOptions;
int
seaf_merge_trees (const char *store_id, int version,
int n, const char *roots[], MergeOptions *opt);
#endif