Re: [PATCH 15/22] read-cache: read index-v5

2013-07-08 Thread Thomas Gummerer
Eric Sunshine sunsh...@sunshineco.com writes:

 On Sun, Jul 7, 2013 at 4:11 AM, Thomas Gummerer t.gumme...@gmail.com wrote:
 Make git read the index file version 5 without complaining.

 This version of the reader doesn't read neither the cache-tree
 nor the resolve undo data, but doesn't choke on an index that
 includes such data.
 ---
 diff --git a/read-cache-v5.c b/read-cache-v5.c
 new file mode 100644
 index 000..e319f30
 --- /dev/null
 +++ b/read-cache-v5.c
 @@ -0,0 +1,658 @@
 +static struct directory_entry *read_directories(unsigned int *dir_offset,
 +   unsigned int *dir_table_offset,
 +   void *mmap,
 +   int mmap_size)
 +{
 +   int i, ondisk_directory_size;
 +   uint32_t *filecrc, *beginning, *end;
 +   struct directory_entry *current = NULL;
 +   struct ondisk_directory_entry *disk_de;
 +   struct directory_entry *de;
 +   unsigned int data_len, len;
 +   char *name;
 +
 +   /* Length of pathname + nul byte for termination + size of
 +* members of ondisk_directory_entry. (Just using the size
 +* of the stuct doesn't work, because there may be padding

 s/stuct/struct/

 +* bytes for the struct)
 +*/

 Also:

   /*
* Format multi-line comment
* like this.
*/

 Remaining multi-line comments appear to be formatted correctly.

Thanks for catching this and the other typos.
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 15/22] read-cache: read index-v5

2013-07-07 Thread Eric Sunshine
On Sun, Jul 7, 2013 at 4:11 AM, Thomas Gummerer t.gumme...@gmail.com wrote:
 Make git read the index file version 5 without complaining.

 This version of the reader doesn't read neither the cache-tree
 nor the resolve undo data, but doesn't choke on an index that
 includes such data.
 ---
 diff --git a/read-cache-v5.c b/read-cache-v5.c
 new file mode 100644
 index 000..e319f30
 --- /dev/null
 +++ b/read-cache-v5.c
 @@ -0,0 +1,658 @@
 +static struct directory_entry *read_directories(unsigned int *dir_offset,
 +   unsigned int *dir_table_offset,
 +   void *mmap,
 +   int mmap_size)
 +{
 +   int i, ondisk_directory_size;
 +   uint32_t *filecrc, *beginning, *end;
 +   struct directory_entry *current = NULL;
 +   struct ondisk_directory_entry *disk_de;
 +   struct directory_entry *de;
 +   unsigned int data_len, len;
 +   char *name;
 +
 +   /* Length of pathname + nul byte for termination + size of
 +* members of ondisk_directory_entry. (Just using the size
 +* of the stuct doesn't work, because there may be padding

s/stuct/struct/

 +* bytes for the struct)
 +*/

Also:

  /*
   * Format multi-line comment
   * like this.
   */

Remaining multi-line comments appear to be formatted correctly.
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html