Skip to content

Commit 30c0312

Browse files
committed
Merge branch 'maint-1.5.4' into maint
* maint-1.5.4: cvsimport: always pass user data to "system" as a list fix reflog approxidate parsing bug
2 parents 7b7f39e + b3bb5f7 commit 30c0312

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

git-cvsimport.perl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -772,7 +772,7 @@ sub commit {
772772
waitpid($pid,0);
773773
die "Error running git-commit-tree: $?\n" if $?;
774774

775-
system("git-update-ref $remote/$branch $cid") == 0
775+
system('git-update-ref', "$remote/$branch", $cid) == 0
776776
or die "Cannot write branch $branch for update: $!\n";
777777

778778
if ($tag) {

sha1_name.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,8 +351,11 @@ static int get_sha1_basic(const char *str, int len, unsigned char *sha1)
351351
}
352352
if (0 <= nth)
353353
at_time = 0;
354-
else
355-
at_time = approxidate(str + at + 2);
354+
else {
355+
char *tmp = xstrndup(str + at + 2, reflog_len);
356+
at_time = approxidate(tmp);
357+
free(tmp);
358+
}
356359
if (read_ref_at(real_ref, at_time, nth, sha1, NULL,
357360
&co_time, &co_tz, &co_cnt)) {
358361
if (at_time)

0 commit comments

Comments
 (0)