Staging
v0.5.1
https://github.com/git/git
Revision 1164f1e48d7c8ed613e8a371ecfce27220606e09 authored by Linus Torvalds on 26 June 2007, 21:34:02 UTC, committed by Junio C Hamano on 27 June 2007, 01:02:15 UTC
A pack-file can get created without any objects in it (to transfer "no
data" - which can happen if you use a reference git repo, for example,
or just otherwise just end up transferring only branch head information
and already have all the objects themselves).

And while we probably should never create an index for such a pack, if we
do (and we do), the index file size sanity checking was incorrect.

This fixes it.

Reported-and-tested-by: Jocke Tjernlund <tjernlund@tjernlund.se>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 582c739
Raw File
Tip revision: 1164f1e48d7c8ed613e8a371ecfce27220606e09 authored by Linus Torvalds on 26 June 2007, 21:34:02 UTC
Fix zero-object version-2 packs
Tip revision: 1164f1e
generate-cmdlist.sh
#!/bin/sh

echo "/* Automatically generated by $0 */
struct cmdname_help
{
    char name[16];
    char help[80];
};

struct cmdname_help common_cmds[] = {"

sort <<\EOF |
add
apply
archive
bisect
branch
checkout
cherry-pick
clone
commit
diff
fetch
grep
init
log
merge
mv
prune
pull
push
rebase
reset
revert
rm
show
show-branch
status
tag
EOF
while read cmd
do
     sed -n '
     /NAME/,/git-'"$cmd"'/H
     ${
            x
            s/.*git-'"$cmd"' - \(.*\)/  {"'"$cmd"'", "\1"},/
	    p
     }' "Documentation/git-$cmd.txt"
done
echo "};"
back to top