Merge master to get fixes up to 1.2.1

maint
Junio C Hamano 2006-02-15 19:45:03 -08:00
commit bf0a25560b
6 changed files with 23 additions and 9 deletions

View File

@ -419,6 +419,7 @@ $(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh
rm -f $@ rm -f $@
sed -e '1s|#!.*/sh|#!$(call shq,$(SHELL_PATH))|' \ sed -e '1s|#!.*/sh|#!$(call shq,$(SHELL_PATH))|' \
-e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \ -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \
-e 's/@@NO_CURL@@/$(NO_CURL)/g' \
$@.sh >$@ $@.sh >$@
chmod +x $@ chmod +x $@



View File

@ -324,7 +324,7 @@ extern int num_packed_objects(const struct packed_git *p);
extern int nth_packed_object_sha1(const struct packed_git *, int, unsigned char*); extern int nth_packed_object_sha1(const struct packed_git *, int, unsigned char*);
extern int find_pack_entry_one(const unsigned char *, struct pack_entry *, struct packed_git *); extern int find_pack_entry_one(const unsigned char *, struct pack_entry *, struct packed_git *);
extern void *unpack_entry_gently(struct pack_entry *, char *, unsigned long *); extern void *unpack_entry_gently(struct pack_entry *, char *, unsigned long *);
extern void packed_object_info_detail(struct pack_entry *, char *, unsigned long *, unsigned long *, int *, unsigned char *); extern void packed_object_info_detail(struct pack_entry *, char *, unsigned long *, unsigned long *, unsigned int *, unsigned char *);


/* Dumb servers support */ /* Dumb servers support */
extern int update_server_info(int); extern int update_server_info(int);

View File

@ -22,7 +22,7 @@ while [ "$#" != "0" ]; do
[ -e "$GIT_DIR/refs/heads/$newbranch" ] && [ -e "$GIT_DIR/refs/heads/$newbranch" ] &&
die "git checkout: branch $newbranch already exists" die "git checkout: branch $newbranch already exists"
git-check-ref-format "heads/$newbranch" || git-check-ref-format "heads/$newbranch" ||
die "we do not like '$newbranch' as a branch name." die "git checkout: we do not like '$newbranch' as a branch name."
;; ;;
"-f") "-f")
force=1 force=1
@ -75,9 +75,15 @@ done


if test "$#" -ge 1 if test "$#" -ge 1
then then
hint=
if test "$#" -eq 1
then
hint="
Did you intend to checkout '$@' which can not be resolved as commit?"
fi
if test '' != "$newbranch$force$merge" if test '' != "$newbranch$force$merge"
then then
die "updating paths and switching branches or forcing are incompatible." die "git checkout: updating paths is incompatible with switching branches/forcing$hint"
fi fi
if test '' != "$new" if test '' != "$new"
then then
@ -117,7 +123,8 @@ fi


[ -z "$branch$newbranch" ] && [ -z "$branch$newbranch" ] &&
[ "$new" != "$old" ] && [ "$new" != "$old" ] &&
die "git checkout: you need to specify a new branch name" die "git checkout: to checkout the requested commit you need to specify
a name for a new branch which is created and switched to"


if [ "$force" ] if [ "$force" ]
then then

View File

@ -206,7 +206,13 @@ yes,yes)
fi fi
;; ;;
http://*) http://*)
if test -z "@@NO_CURL@@"
then
clone_dumb_http "$repo" "$D" clone_dumb_http "$repo" "$D"
else
echo >&2 "http transport not supported, rebuild Git with curl support"
exit 1
fi
;; ;;
*) *)
cd "$D" && case "$upload_pack" in cd "$D" && case "$upload_pack" in

View File

@ -84,7 +84,7 @@ static void show_pack_info(struct packed_git *p)
char type[20]; char type[20];
unsigned long size; unsigned long size;
unsigned long store_size; unsigned long store_size;
int delta_chain_length; unsigned int delta_chain_length;


if (nth_packed_object_sha1(p, i, sha1)) if (nth_packed_object_sha1(p, i, sha1))
die("internal error pack-check nth-packed-object"); die("internal error pack-check nth-packed-object");
@ -98,7 +98,7 @@ static void show_pack_info(struct packed_git *p)
if (!delta_chain_length) if (!delta_chain_length)
printf("%-6s %lu %u\n", type, size, e.offset); printf("%-6s %lu %u\n", type, size, e.offset);
else else
printf("%-6s %lu %u %d %s\n", type, size, e.offset, printf("%-6s %lu %u %u %s\n", type, size, e.offset,
delta_chain_length, sha1_to_hex(base_sha1)); delta_chain_length, sha1_to_hex(base_sha1));
} }



View File

@ -830,7 +830,7 @@ void packed_object_info_detail(struct pack_entry *e,
char *type, char *type,
unsigned long *size, unsigned long *size,
unsigned long *store_size, unsigned long *store_size,
int *delta_chain_length, unsigned int *delta_chain_length,
unsigned char *base_sha1) unsigned char *base_sha1)
{ {
struct packed_git *p = e->p; struct packed_git *p = e->p;
@ -844,7 +844,7 @@ void packed_object_info_detail(struct pack_entry *e,
if (kind != OBJ_DELTA) if (kind != OBJ_DELTA)
*delta_chain_length = 0; *delta_chain_length = 0;
else { else {
int chain_length = 0; unsigned int chain_length = 0;
memcpy(base_sha1, pack, 20); memcpy(base_sha1, pack, 20);
do { do {
struct pack_entry base_ent; struct pack_entry base_ent;