nd/untracked-cache updates
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest24 patches 0 repliesNew
Patches in v1 No applies recorded yet
Reviews trailers per patch
None of the 24 patches has a Reviewed-by or Acked-by.
| Patch | Stefan Beller | Junio C Hamano | Torsten Bögershausen | Eric Sunshine | brian m. carlson | David Turner | Ramsay Jones |
|---|---|---|---|---|---|---|---|
| 1/24 | Helped-by | Helped-by | |||||
| 2/24 | Helped-by | Helped-by | |||||
| 3/24 | |||||||
| 4/24 | |||||||
| 5/24 | Helped-by | ||||||
| 6/24 | Helped-by | ||||||
| 7/24 | |||||||
| 8/24 | |||||||
| 9/24 | |||||||
| 10/24 | Helped-by | ||||||
| 11/24 | |||||||
| 12/24 | |||||||
| 13/24 | |||||||
| 14/24 | |||||||
| 15/24 | |||||||
| 16/24 | |||||||
| 17/24 | |||||||
| 18/24 | |||||||
| 19/24 | |||||||
| 20/24 | Helped-by | Helped-by | |||||
| 21/24 | |||||||
| 22/24 | Helped-by | ||||||
| 23/24 | Helped-by | Helped-by | Helped-by | ||||
| 24/24 | Helped-by |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 7 reviewers.
Cover letter [PATCH 00/24] nd/untracked-cache updates
Compared to 'pu', this fixes two bugs (in 01/24 and 10/24) and one style vololation (in 11/24), found by Junio and Stefan. Diff
-- 8< --
dir.c +11 -8
@@ -687,7 +687,8 @@ static int add_excludes(const char *fname, const char *base, int baselen,else if (check_index && (pos =cache_name_pos (fname,strlen (fname))) >=0 && !ce_stage (active_cache[pos]) && -ce_uptodate (active_cache[pos])) +ce_uptodate (active_cache[pos]) && + !would_convert_to_git (fname,NULL ,0 ,0 ))hashcpy (sha1_stat->sha1, active_cache[pos]->sha1);else hash_sha1_file (buf, size,"blob" , sha1_stat->sha1);
@@ -2308,6 +2309,9 @@ void write_untracked_extension(struct strbuf *out, struct untracked_cache *untrastrbuf_add (out, untracked->ident.buf, untracked->ident.len);strbuf_add (out, ouc,ouc_size (len)); +free (ouc); + ouc =NULL ; +if (!untracked->root) { varint_len =encode_varint (0 , varbuf);strbuf_add (out, varbuf, varint_len);
@@ -2388,11 +2392,6 @@ static void stat_data_from_disk(struct stat_data *to, const struct stat_data *frstatic int read_one_dir (struct untracked_cache_dir **untracked_,struct read_data *rd) { -#define NEXT (x) \ - next = data + (x); \ - if (next > rd->end) \ - return -1; -struct untracked_cache_dir ud, *untracked;const unsigned char *next, *data = rd->data, *end = rd->end;unsigned int value;
@@ -2419,7 +2418,9 @@ static int read_one_dir(struct untracked_cache_dir **untracked_, data = next; len =strlen ((const char *)data); -NEXT (len +1 ); + next = data + len +1 ; +if (next > rd->end) +return -1 ; *untracked_ = untracked =xmalloc (sizeof (*untracked) + len);memcpy (untracked, &ud,sizeof (ud));memcpy (untracked->name, data, len +1 );
@@ -2427,7 +2428,9 @@ static int read_one_dir(struct untracked_cache_dir **untracked_,for (i =0 ; i < untracked->untracked_nr; i++) { len =strlen ((const char *)data); -NEXT (len +1 ); + next = data + len +1 ; +if (next > rd->end) +return -1 ; untracked->untracked[i] =xstrdup ((const char *)data); data = next; }
-- 8< --
Signature · 1 line
2.3.0.rc1.137.g477eb31