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
index 8d9f11e75e8fb1095761fd7fd25e66b1d73e6fa2,40fa41b5f3a914cfb82366158e8e27bac3bb8938..a5b6eebf1a0b65b481f6dd8f1e38006b46e87c83
+++ 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
index 56c1ffbc199c534a53da9615aa16b4357656e320,470fa02e0886462f44fd0e188da6e8c65ab6fac0..3e448d8974eb6d738fec2c35cc5a9ffbc8764411
@@@ -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);
                }
        }