Merge branch 'ho/dashless' into maint
authorJunio C Hamano <gitster@pobox.com>
Wed, 3 Sep 2008 21:51:56 +0000 (14:51 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 3 Sep 2008 21:51:56 +0000 (14:51 -0700)
* ho/dashless:
tests: use "git xyzzy" form (t7200 - t9001)
tests: use "git xyzzy" form (t7000 - t7199)
tests: use "git xyzzy" form (t3600 - t6999)
tests: use "git xyzzy" form (t0000 - t3599)
'git foo' program identifies itself without dash in die() messages
Start conforming code to "git subcmd" style

1  2 
builtin-apply.c
t/t5300-pack-object.sh
diff --combined builtin-apply.c
index 47261e10fb3901f3b99861020762e63856ee2d60,4eb263ec5807a771b3a61c147b74a6f2f68dddee..20bef1f21d393b0ddf36b8336af85a70c9b8c39c
@@@ -274,7 -274,7 +274,7 @@@ static void say_patch_name(FILE *output
  static void read_patch_file(struct strbuf *sb, int fd)
  {
        if (strbuf_read(sb, fd, 0) < 0)
-               die("git-apply: read returned %s", strerror(errno));
+               die("git apply: read returned %s", strerror(errno));
  
        /*
         * Make sure that we have some slop in the buffer
@@@ -506,17 -506,17 +506,17 @@@ static char *gitdiff_verify_name(const 
                name = orig_name;
                len = strlen(name);
                if (isnull)
-                       die("git-apply: bad git-diff - expected /dev/null, got %s on line %d", name, linenr);
+                       die("git apply: bad git-diff - expected /dev/null, got %s on line %d", name, linenr);
                another = find_name(line, NULL, p_value, TERM_TAB);
                if (!another || memcmp(another, name, len))
-                       die("git-apply: bad git-diff - inconsistent %s filename on line %d", oldnew, linenr);
+                       die("git apply: bad git-diff - inconsistent %s filename on line %d", oldnew, linenr);
                free(another);
                return orig_name;
        }
        else {
                /* expect "/dev/null" */
                if (memcmp("/dev/null", line, 9) || line[9] != '\n')
-                       die("git-apply: bad git-diff - expected /dev/null on line %d", linenr);
+                       die("git apply: bad git-diff - expected /dev/null on line %d", linenr);
                return NULL;
        }
  }
@@@ -1996,8 -1996,6 +1996,8 @@@ static int apply_one_fragment(struct im
        /*
         * A hunk to change lines at the beginning would begin with
         * @@ -1,L +N,M @@
 +       * but we need to be careful.  -U0 that inserts before the second
 +       * line also has this pattern.
         *
         * And a hunk to add to an empty file would begin with
         * @@ -0,0 +N,M @@
         * In other words, a hunk that is (frag->oldpos <= 1) with or
         * without leading context must match at the beginning.
         */
 -      match_beginning = frag->oldpos <= 1;
 +      match_beginning = (!frag->oldpos ||
 +                         (frag->oldpos == 1 && !unidiff_zero));
  
        /*
         * A hunk without trailing lines must match at the end.
diff --combined t/t5300-pack-object.sh
index 83abe5f25eb4eb0627d47c233be27f1dd77d4455,482bc7ae6842ccf082f05f65c691d001cad2b148..3a0ef8759c9d7a55b95c56ca38cd3c37ac2432fa
@@@ -3,7 -3,7 +3,7 @@@
  # Copyright (c) 2005 Junio C Hamano
  #
  
- test_description='git-pack-object
+ test_description='git pack-object
  
  '
  . ./test-lib.sh
@@@ -186,12 -186,6 +186,12 @@@ test_expect_success 
                        test-2-${packname_2}.idx \
                        test-3-${packname_3}.idx'
  
 +test_expect_success \
 +    'verify pack -v' \
 +    'git verify-pack -v       test-1-${packname_1}.idx \
 +                      test-2-${packname_2}.idx \
 +                      test-3-${packname_3}.idx'
 +
  test_expect_success \
      'verify-pack catches mismatched .idx and .pack files' \
      'cat test-1-${packname_1}.idx >test-3.idx &&
@@@ -242,24 -236,24 +242,24 @@@ test_expect_success 
  test_expect_success \
      'build pack index for an existing pack' \
      'cat test-1-${packname_1}.pack >test-3.pack &&
-      git-index-pack -o tmp.idx test-3.pack &&
+      git index-pack -o tmp.idx test-3.pack &&
       cmp tmp.idx test-1-${packname_1}.idx &&
  
-      git-index-pack test-3.pack &&
+      git index-pack test-3.pack &&
       cmp test-3.idx test-1-${packname_1}.idx &&
  
       cat test-2-${packname_2}.pack >test-3.pack &&
-      git-index-pack -o tmp.idx test-2-${packname_2}.pack &&
+      git index-pack -o tmp.idx test-2-${packname_2}.pack &&
       cmp tmp.idx test-2-${packname_2}.idx &&
  
-      git-index-pack test-3.pack &&
+      git index-pack test-3.pack &&
       cmp test-3.idx test-2-${packname_2}.idx &&
  
       cat test-3-${packname_3}.pack >test-3.pack &&
-      git-index-pack -o tmp.idx test-3-${packname_3}.pack &&
+      git index-pack -o tmp.idx test-3-${packname_3}.pack &&
       cmp tmp.idx test-3-${packname_3}.idx &&
  
-      git-index-pack test-3.pack &&
+      git index-pack test-3.pack &&
       cmp test-3.idx test-3-${packname_3}.idx &&
  
       :'
@@@ -272,7 -266,7 +272,7 @@@ test_expect_success 
  
  test_expect_success \
      'make sure index-pack detects the SHA1 collision' \
-     'test_must_fail git-index-pack -o bad.idx test-3.pack'
+     'test_must_fail git index-pack -o bad.idx test-3.pack'
  
  test_expect_success \
      'honor pack.packSizeLimit' \