Merge branch 'maint-1.5.4' into maint
authorJunio C Hamano <gitster@pobox.com>
Wed, 30 Apr 2008 05:55:07 +0000 (22:55 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 30 Apr 2008 05:55:07 +0000 (22:55 -0700)
* maint-1.5.4:
  cvsimport: always pass user data to "system" as a list
  fix reflog approxidate parsing bug

git-cvsimport.perl
sha1_name.c

index 95c5eec51ecc6ab6f142cef51eb4bd3b5842debb..bdac5d51b6dfb721bb648e455cb8f3c5078217e4 100755 (executable)
@@ -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) {
index 491d2e7ebf19d5c582adbc5ece28d931b09b8a6d..b0b2167578a7baebeba676af0b33161fb688bae0 100644 (file)
@@ -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)