Merge branch 'maint-1.7.0' into maint-1.7.1
authorJunio C Hamano <gitster@pobox.com>
Wed, 16 Feb 2011 22:32:47 +0000 (14:32 -0800)
committerJunio C Hamano <gitster@pobox.com>
Wed, 16 Feb 2011 22:32:47 +0000 (14:32 -0800)
* maint-1.7.0:
fast-import: introduce "feature notes" command
fast-import: clarify documentation of "feature" command

1  2 
fast-import.c
diff --combined fast-import.c
index 309f2c58a2ba431a82a56f757482a5093cc8257d,ff56ea28918dd706f57617632c82336654db3543..bce460e2edc1ae7331e2b25523794d834b970c26
@@@ -980,6 -980,29 +980,6 @@@ static void cycle_packfile(void
        start_packfile();
  }
  
 -static size_t encode_header(
 -      enum object_type type,
 -      uintmax_t size,
 -      unsigned char *hdr)
 -{
 -      int n = 1;
 -      unsigned char c;
 -
 -      if (type < OBJ_COMMIT || type > OBJ_REF_DELTA)
 -              die("bad type %d", type);
 -
 -      c = (type << 4) | (size & 15);
 -      size >>= 4;
 -      while (size) {
 -              *hdr++ = c | 0x80;
 -              c = size & 0x7f;
 -              size >>= 7;
 -              n++;
 -      }
 -      *hdr = c;
 -      return n;
 -}
 -
  static int store_object(
        enum object_type type,
        struct strbuf *dat,
                delta_count_by_type[type]++;
                e->depth = last->depth + 1;
  
 -              hdrlen = encode_header(OBJ_OFS_DELTA, deltalen, hdr);
 +              hdrlen = encode_in_pack_object_header(OBJ_OFS_DELTA, deltalen, hdr);
                sha1write(pack_file, hdr, hdrlen);
                pack_size += hdrlen;
  
                pack_size += sizeof(hdr) - pos;
        } else {
                e->depth = 0;
 -              hdrlen = encode_header(type, dat->len, hdr);
 +              hdrlen = encode_in_pack_object_header(type, dat->len, hdr);
                sha1write(pack_file, hdr, hdrlen);
                pack_size += hdrlen;
        }
@@@ -1165,7 -1188,7 +1165,7 @@@ static void stream_blob(uintmax_t len, 
        memset(&s, 0, sizeof(s));
        deflateInit(&s, pack_compression_level);
  
 -      hdrlen = encode_header(OBJ_BLOB, len, out_buf);
 +      hdrlen = encode_in_pack_object_header(OBJ_BLOB, len, out_buf);
        if (out_sz <= hdrlen)
                die("impossibly large object header");
  
@@@ -2798,6 -2821,8 +2798,8 @@@ static int parse_one_feature(const cha
                relative_marks_paths = 0;
        } else if (!prefixcmp(feature, "force")) {
                force_update = 1;
+       } else if (!strcmp(feature, "notes")) {
+               ; /* do nothing; we have the feature */
        } else {
                return 0;
        }