Browse Source

Merge master to get fixes up to 1.2.1

maint
Junio C Hamano 19 years ago
parent
commit
bf0a25560b
  1. 1
      Makefile
  2. 2
      cache.h
  3. 13
      git-checkout.sh
  4. 8
      git-clone.sh
  5. 4
      pack-check.c
  6. 4
      sha1_file.c

1
Makefile

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


2
cache.h

@ -324,7 +324,7 @@ extern int num_packed_objects(const struct packed_git *p); @@ -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 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 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 */
extern int update_server_info(int);

13
git-checkout.sh

@ -22,7 +22,7 @@ while [ "$#" != "0" ]; do @@ -22,7 +22,7 @@ while [ "$#" != "0" ]; do
[ -e "$GIT_DIR/refs/heads/$newbranch" ] &&
die "git checkout: branch $newbranch already exists"
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")
force=1
@ -75,9 +75,15 @@ done @@ -75,9 +75,15 @@ done

if test "$#" -ge 1
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"
then
die "updating paths and switching branches or forcing are incompatible."
die "git checkout: updating paths is incompatible with switching branches/forcing$hint"
fi
if test '' != "$new"
then
@ -117,7 +123,8 @@ fi @@ -117,7 +123,8 @@ fi

[ -z "$branch$newbranch" ] &&
[ "$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" ]
then

8
git-clone.sh

@ -206,7 +206,13 @@ yes,yes) @@ -206,7 +206,13 @@ yes,yes)
fi
;;
http://*)
clone_dumb_http "$repo" "$D"
if test -z "@@NO_CURL@@"
then
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

4
pack-check.c

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

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


4
sha1_file.c

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

Loading…
Cancel
Save