Browse Source

Merge in fixes up to 1.0.3 maintenance branch.

Signed-off-by: Junio C Hamano <junkio@cox.net>
maint
Junio C Hamano 19 years ago
parent
commit
c10d634518
  1. 3
      Makefile
  2. 23
      debian/changelog
  3. 12
      http-fetch.c
  4. 30
      send-pack.c
  5. 2
      sha1_file.c

3
Makefile

@ -397,6 +397,9 @@ $(patsubst %.py,%,$(SCRIPT_PYTHON)) : % : %.py
git-cherry-pick: git-revert git-cherry-pick: git-revert
cp $< $@ cp $< $@


# format-patch records GIT_VERSION
git-format-patch: Makefile

%.o: %.c %.o: %.c
$(CC) -o $*.o -c $(ALL_CFLAGS) $< $(CC) -o $*.o -c $(ALL_CFLAGS) $<
%.o: %.S %.o: %.S

23
debian/changelog vendored

@ -10,6 +10,29 @@ git-core (1.0.0.GIT-0) unstable; urgency=low


-- Junio C Hamano <junkio@cox.net> Wed, 21 Dec 2005 12:12:05 -0800 -- Junio C Hamano <junkio@cox.net> Wed, 21 Dec 2005 12:12:05 -0800


git-core (1.0.3-0) unstable; urgency=low

* GIT 1.0.3 maintenance release.

-- Junio C Hamano <junkio@cox.net> Thu, 22 Dec 2005 18:13:33 -0800

git-core (1.0.0b-0) unstable; urgency=low

* GIT 1.0.0b to include two more fixes.

-- Junio C Hamano <junkio@cox.net> Wed, 21 Dec 2005 13:50:21 -0800

git-core (1.0.0a-0) unstable; urgency=low

* GIT 1.0.0a to include the following fixes:
- Avoid misleading success message on error (Johannes)
- objects/info/packs: work around bug in http-fetch.c::fetch_indices()
- http-fetch.c: fix objects/info/pack parsing.
- An off-by-one bug found by valgrind (Pavel)

-- Junio C Hamano <junkio@cox.net> Wed, 21 Dec 2005 13:17:17 -0800

git-core (1.0.0-0) unstable; urgency=low git-core (1.0.0-0) unstable; urgency=low


* GIT 1.0.0 * GIT 1.0.0

12
http-fetch.c

@ -267,7 +267,8 @@ static void process_object_response(void *callback_data)
obj_req->state = COMPLETE; obj_req->state = COMPLETE;


/* Use alternates if necessary */ /* Use alternates if necessary */
if (obj_req->http_code == 404) { if (obj_req->http_code == 404 ||
obj_req->curl_result == CURLE_FILE_COULDNT_READ_FILE) {
fetch_alternates(alt->base); fetch_alternates(alt->base);
if (obj_req->repo->next != NULL) { if (obj_req->repo->next != NULL) {
obj_req->repo = obj_req->repo =
@ -475,7 +476,8 @@ static void process_alternates_response(void *callback_data)
} }
} }
} else if (slot->curl_result != CURLE_OK) { } else if (slot->curl_result != CURLE_OK) {
if (slot->http_code != 404) { if (slot->http_code != 404 &&
slot->curl_result != CURLE_FILE_COULDNT_READ_FILE) {
got_alternates = -1; got_alternates = -1;
return; return;
} }
@ -637,7 +639,8 @@ static int fetch_indices(struct alt_base *repo)
if (start_active_slot(slot)) { if (start_active_slot(slot)) {
run_active_slot(slot); run_active_slot(slot);
if (slot->curl_result != CURLE_OK) { if (slot->curl_result != CURLE_OK) {
if (slot->http_code == 404) { if (slot->http_code == 404 ||
slot->curl_result == CURLE_FILE_COULDNT_READ_FILE) {
repo->got_indices = 1; repo->got_indices = 1;
free(buffer.buffer); free(buffer.buffer);
return 0; return 0;
@ -802,7 +805,8 @@ static int fetch_object(struct alt_base *repo, unsigned char *sha1)
ret = error("Request for %s aborted", hex); ret = error("Request for %s aborted", hex);
} else if (obj_req->curl_result != CURLE_OK && } else if (obj_req->curl_result != CURLE_OK &&
obj_req->http_code != 416) { obj_req->http_code != 416) {
if (obj_req->http_code == 404) if (obj_req->http_code == 404 ||
obj_req->curl_result == CURLE_FILE_COULDNT_READ_FILE)
ret = -1; /* Be silent, it is probably in a pack. */ ret = -1; /* Be silent, it is probably in a pack. */
else else
ret = error("%s (curl_result = %d, http_code = %ld, sha1 = %s)", ret = error("%s (curl_result = %d, http_code = %ld, sha1 = %s)",

30
send-pack.c

@ -231,23 +231,21 @@ static int send_pack(int in, int out, int nr_refspec, char **refspec)
if (!force_update && if (!force_update &&
!is_zero_sha1(ref->old_sha1) && !is_zero_sha1(ref->old_sha1) &&
!ref->force) { !ref->force) {
if (!has_sha1_file(ref->old_sha1)) { if (!has_sha1_file(ref->old_sha1) ||
error("remote '%s' object %s does not " !ref_newer(ref->peer_ref->new_sha1,
"exist on local",
ref->name, sha1_to_hex(ref->old_sha1));
ret = -2;
continue;
}

/* We assume that local is fsck-clean. Otherwise
* you _could_ have an old tag which points at
* something you do not have, which may or may not
* be a commit.
*/
if (!ref_newer(ref->peer_ref->new_sha1,
ref->old_sha1)) { ref->old_sha1)) {
error("remote ref '%s' is not a strict " /* We do not have the remote ref, or
"subset of local ref '%s'.", ref->name, * we know that the remote ref is not
* an ancestor of what we are trying to
* push. Either way this can be losing
* commits at the remote end and likely
* we were not up to date to begin with.
*/
error("remote '%s' is not a strict "
"subset of local ref '%s'. "
"maybe you are not up-to-date and "
"need to pull first?",
ref->name,
ref->peer_ref->name); ref->peer_ref->name);
ret = -2; ret = -2;
continue; continue;

2
sha1_file.c

@ -81,6 +81,8 @@ char * sha1_to_hex(const unsigned char *sha1)
*buf++ = hex[val >> 4]; *buf++ = hex[val >> 4];
*buf++ = hex[val & 0xf]; *buf++ = hex[val & 0xf];
} }
*buf = '\0';

return buffer; return buffer;
} }



Loading…
Cancel
Save