mirror of
https://github.com/git/git.git
synced 2025-03-21 02:45:53 +00:00
Merge branch 'maint'
* maint: cvsimport: always pass user data to "system" as a list fix reflog approxidate parsing bug Fix use after free() in builtin-fetch fetch-pack: do not stop traversing an already parsed commit Use "=" instead of "==" in condition as it is more portable
This commit is contained in:
commit
68951af30c
@ -117,15 +117,15 @@ static const unsigned char* get_rev(void)
|
||||
|
||||
while (commit == NULL) {
|
||||
unsigned int mark;
|
||||
struct commit_list *parents = NULL;
|
||||
struct commit_list *parents;
|
||||
|
||||
if (rev_list == NULL || non_common_revs == 0)
|
||||
return NULL;
|
||||
|
||||
commit = rev_list->item;
|
||||
if (!(commit->object.parsed))
|
||||
if (!parse_commit(commit))
|
||||
parents = commit->parents;
|
||||
if (commit->object.parsed)
|
||||
parse_commit(commit);
|
||||
parents = commit->parents;
|
||||
|
||||
commit->object.flags |= POPPED;
|
||||
if (!(commit->object.flags & COMMON))
|
||||
|
@ -577,8 +577,6 @@ static int do_fetch(struct transport *transport,
|
||||
free_refs(ref_map);
|
||||
}
|
||||
|
||||
transport_disconnect(transport);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -599,6 +597,7 @@ int cmd_fetch(int argc, const char **argv, const char *prefix)
|
||||
int i;
|
||||
static const char **refs = NULL;
|
||||
int ref_nr = 0;
|
||||
int exit_code;
|
||||
|
||||
/* Record the command line for the reflog */
|
||||
strbuf_addstr(&default_rla, "fetch");
|
||||
@ -652,6 +651,9 @@ int cmd_fetch(int argc, const char **argv, const char *prefix)
|
||||
|
||||
signal(SIGINT, unlock_pack_on_signal);
|
||||
atexit(unlock_pack);
|
||||
return do_fetch(transport,
|
||||
exit_code = do_fetch(transport,
|
||||
parse_fetch_refspec(ref_nr, refs), ref_nr);
|
||||
transport_disconnect(transport);
|
||||
transport = NULL;
|
||||
return exit_code;
|
||||
}
|
||||
|
@ -219,7 +219,7 @@ fi
|
||||
if test -n "$2"
|
||||
then
|
||||
dir="$2"
|
||||
test $# == 2 || die "excess parameter to git-clone"
|
||||
test $# = 2 || die "excess parameter to git-clone"
|
||||
else
|
||||
# Derive one from the repository name
|
||||
# Try using "humanish" part of source repo if user didn't specify one
|
||||
|
@ -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) {
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user