diff options
author | Junio C Hamano <gitster@pobox.com> | 2008-04-29 22:55:07 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-04-29 22:55:07 -0700 |
commit | 30c0312fd182942c10421e77d2b3ec6284cc0468 (patch) | |
tree | e72fda2a27115091cdb6352ebfaf1302dd814a7c | |
parent | Fix use after free() in builtin-fetch (diff) | |
parent | cvsimport: always pass user data to "system" as a list (diff) | |
download | tgif-30c0312fd182942c10421e77d2b3ec6284cc0468.tar.xz |
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
-rwxr-xr-x | git-cvsimport.perl | 2 | ||||
-rw-r--r-- | sha1_name.c | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/git-cvsimport.perl b/git-cvsimport.perl index 95c5eec51e..bdac5d51b6 100755 --- a/git-cvsimport.perl +++ b/git-cvsimport.perl @@ -772,7 +772,7 @@ sub commit { waitpid($pid,0); die "Error running git-commit-tree: $?\n" if $?; - system("git-update-ref $remote/$branch $cid") == 0 + system('git-update-ref', "$remote/$branch", $cid) == 0 or die "Cannot write branch $branch for update: $!\n"; if ($tag) { diff --git a/sha1_name.c b/sha1_name.c index 491d2e7ebf..b0b2167578 100644 --- a/sha1_name.c +++ b/sha1_name.c @@ -351,8 +351,11 @@ static int get_sha1_basic(const char *str, int len, unsigned char *sha1) } if (0 <= nth) at_time = 0; - else - at_time = approxidate(str + at + 2); + else { + char *tmp = xstrndup(str + at + 2, reflog_len); + at_time = approxidate(tmp); + free(tmp); + } if (read_ref_at(real_ref, at_time, nth, sha1, NULL, &co_time, &co_tz, &co_cnt)) { if (at_time) |