Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-05-31 21:57:32 +0400
committerJunio C Hamano <gitster@pobox.com>2011-05-31 21:57:32 +0400
commit2d11f21c365821ccba1e093f22b99ad71b955f21 (patch)
tree1ecbe232f12904520838ab4adff6aa70d5ba6e80 /unpack-trees.h
parent28b9264dd6cbadcef8b3e48c24ffcb2893b668b3 (diff)
parent5b42477b59886a85d4b49a60313f9b9d4a0d576f (diff)
Merge remote-tracking branch 'ko/maint' into jc/diff-index-quick-exit-early
* ko/maint: (4352 commits) git-submodule.sh: separate parens by a space to avoid confusing some shells Documentation/technical/api-diff.txt: correct name of diff_unmerge() read_gitfile_gently: use ssize_t to hold read result remove tests of always-false condition rerere.c: diagnose a corrupt MERGE_RR when hitting EOF between TAB and '\0' Git 1.7.5.3 init/clone: remove short option -L and document --separate-git-dir do not read beyond end of malloc'd buffer git-svn: Fix git svn log --show-commit Git 1.7.5.2 provide a copy of the LGPLv2.1 test core.gitproxy configuration copy_gecos: fix not adding nlen to len when processing "&" Update draft release notes to 1.7.5.2 Documentation/git-fsck.txt: fix typo: unreadable -> unreachable send-pack: avoid deadlock on git:// push with failed pack-objects connect: let callers know if connection is a socket connect: treat generic proxy processes like ssh processes sideband_demux(): fix decl-after-stmt t3503: test cherry picking and reverting root commits ... Conflicts: diff.c
Diffstat (limited to 'unpack-trees.h')
-rw-r--r--unpack-trees.h65
1 files changed, 45 insertions, 20 deletions
diff --git a/unpack-trees.h b/unpack-trees.h
index 1e0e2325f1..cd11a08365 100644
--- a/unpack-trees.h
+++ b/unpack-trees.h
@@ -1,39 +1,62 @@
#ifndef UNPACK_TREES_H
#define UNPACK_TREES_H
+#include "string-list.h"
+
#define MAX_UNPACK_TREES 8
struct unpack_trees_options;
+struct exclude_list;
typedef int (*merge_fn_t)(struct cache_entry **src,
struct unpack_trees_options *options);
-struct unpack_trees_error_msgs {
- const char *would_overwrite;
- const char *not_uptodate_file;
- const char *not_uptodate_dir;
- const char *would_lose_untracked;
- const char *bind_overlap;
+enum unpack_trees_error_types {
+ ERROR_WOULD_OVERWRITE = 0,
+ ERROR_NOT_UPTODATE_FILE,
+ ERROR_NOT_UPTODATE_DIR,
+ ERROR_WOULD_LOSE_UNTRACKED_OVERWRITTEN,
+ ERROR_WOULD_LOSE_UNTRACKED_REMOVED,
+ ERROR_BIND_OVERLAP,
+ ERROR_SPARSE_NOT_UPTODATE_FILE,
+ ERROR_WOULD_LOSE_ORPHANED_OVERWRITTEN,
+ ERROR_WOULD_LOSE_ORPHANED_REMOVED,
+ NB_UNPACK_TREES_ERROR_TYPES
};
+/*
+ * Sets the list of user-friendly error messages to be used by the
+ * command "cmd" (either merge or checkout), and show_all_errors to 1.
+ */
+void setup_unpack_trees_porcelain(struct unpack_trees_options *opts,
+ const char *cmd);
+
struct unpack_trees_options {
- unsigned int reset:1,
- merge:1,
- update:1,
- index_only:1,
- nontrivial_merge:1,
- trivial_merges_only:1,
- verbose_update:1,
- aggressive:1,
- skip_unmerged:1,
- initial_checkout:1,
- diff_index_cached:1,
- gently:1;
+ unsigned int reset,
+ merge,
+ update,
+ index_only,
+ nontrivial_merge,
+ trivial_merges_only,
+ verbose_update,
+ aggressive,
+ skip_unmerged,
+ initial_checkout,
+ diff_index_cached,
+ debug_unpack,
+ skip_sparse_checkout,
+ gently,
+ show_all_errors;
const char *prefix;
- int pos;
+ int cache_bottom;
struct dir_struct *dir;
merge_fn_t fn;
- struct unpack_trees_error_msgs msgs;
+ const char *msgs[NB_UNPACK_TREES_ERROR_TYPES];
+ /*
+ * Store error messages in an array, each case
+ * corresponding to a error message type
+ */
+ struct string_list unpack_rejects[NB_UNPACK_TREES_ERROR_TYPES];
int head_idx;
int merge_size;
@@ -44,6 +67,8 @@ struct unpack_trees_options {
struct index_state *dst_index;
struct index_state *src_index;
struct index_state result;
+
+ struct exclude_list *el; /* for internal use */
};
extern int unpack_trees(unsigned n, struct tree_desc *t,