Code

Merge branch 'maint'
authorJunio C Hamano <gitster@pobox.com>
Mon, 3 Mar 2008 07:59:50 +0000 (23:59 -0800)
committerJunio C Hamano <gitster@pobox.com>
Mon, 3 Mar 2008 07:59:50 +0000 (23:59 -0800)
* maint:
  Update draft release notes for 1.5.4.4
  revert: actually check for a dirty index
  tests: introduce test_must_fail
  git-submodule: Fix typo 'url' which should be '$url'
  receive-pack: Initialize PATH to include exec-dir.

Conflicts:

builtin-revert.c

1  2 
builtin-revert.c
receive-pack.c

index b6dee6a56c21be816725a4366f448dac98e62ae6,64f0d0ee028fd143ea065cad93ce7be03d94839d..607a2f0337c3d3f1fb8bdac7443e3a7f56e92305
@@@ -8,7 -8,8 +8,9 @@@
  #include "exec_cmd.h"
  #include "utf8.h"
  #include "parse-options.h"
 +#include "cache-tree.h"
+ #include "diff.h"
+ #include "revision.h"
  
  /*
   * This implements the builtins revert and cherry-pick.
@@@ -271,15 -283,14 +284,14 @@@ static int revert_or_cherry_pick(int ar
                 * that represents the "current" state for merge-recursive
                 * to work on.
                 */
 -              if (write_tree(head, 0, NULL))
 +              if (write_cache_as_tree(head, 0, NULL))
                        die ("Your index file is unmerged.");
        } else {
-               struct wt_status s;
                if (get_sha1("HEAD", head))
                        die ("You do not have a valid HEAD");
-               wt_status_prepare(&s);
-               if (s.commitable)
+               if (read_cache() < 0)
+                       die("could not read the index");
+               if (index_is_dirty())
                        die ("Dirty index: cannot %s", me);
                discard_cache();
        }
diff --cc receive-pack.c
Simple merge