File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -210,26 +210,29 @@ static int is_tag_in_date_range(struct object *tag, struct rev_info *revs)
210
210
{
211
211
unsigned long size;
212
212
enum object_type type;
213
- char *buf, *line, *lineend;
213
+ char *buf = NULL , *line, *lineend;
214
214
unsigned long date;
215
+ int result = 1;
215
216
216
217
if (revs->max_age == -1 && revs->min_age == -1)
217
- return 1 ;
218
+ goto out ;
218
219
219
220
buf = read_sha1_file(tag->sha1, &type, &size);
220
221
if (!buf)
221
- return 1 ;
222
+ goto out ;
222
223
line = memmem(buf, size, "\ntagger ", 8);
223
224
if (!line++)
224
- return 1 ;
225
+ goto out ;
225
226
lineend = memchr(line, '\n', buf + size - line);
226
227
line = memchr(line, '>', lineend ? lineend - line : buf + size - line);
227
228
if (!line++)
228
- return 1 ;
229
+ goto out ;
229
230
date = strtoul(line, NULL, 10);
230
- free(buf);
231
- return (revs->max_age == -1 || revs->max_age < date) &&
231
+ result = (revs->max_age == -1 || revs->max_age < date) &&
232
232
(revs->min_age == -1 || revs->min_age > date);
233
+ out:
234
+ free(buf);
235
+ return result;
233
236
}
234
237
235
238
int create_bundle(struct bundle_header *header, const char *path,
You can’t perform that action at this time.
0 commit comments