Merge branch 'db/checkout'
authorJunio C Hamano <gitster@pobox.com>
Wed, 27 Feb 2008 20:53:26 +0000 (12:53 -0800)
committerJunio C Hamano <gitster@pobox.com>
Wed, 27 Feb 2008 20:53:26 +0000 (12:53 -0800)
* db/checkout: (21 commits)
  checkout: error out when index is unmerged even with -m
  checkout: show progress when checkout takes long time while switching branches
  Add merge-subtree back
  checkout: updates to tracking report
  builtin-checkout.c: Remove unused prefix arguments in switch_branches path
  checkout: work from a subdirectory
  checkout: tone down the "forked status" diagnostic messages
  Clean up reporting differences on branch switch
  builtin-checkout.c: fix possible usage segfault
  checkout: notice when the switched branch is behind or forked
  Build in checkout
  Move code to clean up after a branch change to branch.c
  Library function to check for unmerged index entries
  Use diff -u instead of diff in t7201
  Move create_branch into a library file
  Build-in merge-recursive
  Add "skip_unmerged" option to unpack_trees.
  Discard "deleted" cache entries after using them to update the working tree
  Send unpack-trees debugging output to stderr
  Add flag to make unpack_trees() not print errors.
  ...

Conflicts:

Makefile

12 files changed:
1  2 
Makefile
builtin-branch.c
builtin-commit.c
builtin-merge-recursive.c
builtin-read-tree.c
builtin.h
cache.h
contrib/examples/git-checkout.sh
git.c
read-cache.c
t/t7201-co.sh
unpack-trees.c

diff --cc Makefile
+++ b/Makefile
@@@ -327,8 -318,7 +327,8 @@@ LIB_OBJS = 
        alloc.o merge-file.o path-list.o help.o unpack-trees.o $(DIFF_OBJS) \
        color.o wt-status.o archive-zip.o archive-tar.o shallow.o utf8.o \
        convert.o attr.o decorate.o progress.o mailmap.o symlinks.o remote.o \
-       transport.o bundle.o walker.o parse-options.o ws.o archive.o \
 -      transport.o bundle.o walker.o parse-options.o ws.o archive.o branch.o
++      transport.o bundle.o walker.o parse-options.o ws.o archive.o branch.o \
 +      alias.o
  
  BUILTIN_OBJS = \
        builtin-add.o \
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc builtin.h
Simple merge
diff --cc cache.h
Simple merge
Simple merge
diff --cc git.c
Simple merge
diff --cc read-cache.c
Simple merge
diff --cc t/t7201-co.sh
Simple merge
diff --cc unpack-trees.c
@@@ -590,9 -624,10 +625,10 @@@ static int merged_entry(struct cache_en
                 * a match.
                 */
                if (same(old, merge)) {
 -                      memcpy(merge, old, offsetof(struct cache_entry, name));
 +                      copy_cache_entry(merge, old);
                } else {
-                       verify_uptodate(old, o);
+                       if (verify_uptodate(old, o))
+                               return -1;
                        invalidate_ce_path(old);
                }
        }