summaryrefslogtreecommitdiff
path: root/diff-lib.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-08-28 19:38:19 -0700
committerJunio C Hamano <gitster@pobox.com>2009-08-28 19:38:19 -0700
commit433233e0b60e55e1afcded413e78c85fde4db722 (patch)
treed0bcce5903758c00958bc925461ed5bd5dda148f /diff-lib.c
parent42fa6df99fe1f0439244893e81efad0cc4524c3d (diff)
parent3fa509dfbdb8526453f4213f79b371bdfa493f0e (diff)
downloadgit-433233e0b60e55e1afcded413e78c85fde4db722.tar.gz
Merge branch 'jc/shortstatus'
* jc/shortstatus: git commit --dry-run -v: show diff in color when asked Documentation/git-commit.txt: describe --dry-run wt-status: collect untracked files in a separate "collect" phase Make git_status_config() file scope static to builtin-commit.c wt-status: move wt_status_colors[] into wt_status structure wt-status: move many global settings to wt_status structure commit: --dry-run status: show worktree status of conflicted paths separately wt-status.c: rework the way changes to the index and work tree are summarized diff-index: keep the original index intact diff-index: report unmerged new entries
Diffstat (limited to 'diff-lib.c')
-rw-r--r--diff-lib.c22
1 files changed, 2 insertions, 20 deletions
diff --git a/diff-lib.c b/diff-lib.c
index 22da66ef14..0c74ef5cbe 100644
--- a/diff-lib.c
+++ b/diff-lib.c
@@ -310,22 +310,6 @@ static int show_modified(struct rev_info *revs,
}
/*
- * This turns all merge entries into "stage 3". That guarantees that
- * when we read in the new tree (into "stage 1"), we won't lose sight
- * of the fact that we had unmerged entries.
- */
-static void mark_merge_entries(void)
-{
- int i;
- for (i = 0; i < active_nr; i++) {
- struct cache_entry *ce = active_cache[i];
- if (!ce_stage(ce))
- continue;
- ce->ce_flags |= CE_STAGEMASK;
- }
-}
-
-/*
* This gets a mix of an existing index and a tree, one pathname entry
* at a time. The index entry may be a single stage-0 one, but it could
* also be multiple unmerged entries (in which case idx_pos/idx_nr will
@@ -350,8 +334,8 @@ static void do_oneway_diff(struct unpack_trees_options *o,
match_missing = !revs->ignore_merges;
if (cached && idx && ce_stage(idx)) {
- if (tree)
- diff_unmerge(&revs->diffopt, idx->name, idx->ce_mode, idx->sha1);
+ diff_unmerge(&revs->diffopt, idx->name, idx->ce_mode,
+ idx->sha1);
return;
}
@@ -437,8 +421,6 @@ int run_diff_index(struct rev_info *revs, int cached)
struct unpack_trees_options opts;
struct tree_desc t;
- mark_merge_entries();
-
ent = revs->pending.objects[0].item;
tree_name = revs->pending.objects[0].name;
tree = parse_tree_indirect(ent->sha1);