On Sun, Nov 24, 2013 at 10:55 PM, Nguyễn Thái Ngọc Duy <pclouds@xxxxxxxxx> wrote: > diff --git a/t/t5536-fetch-shallow.sh b/t/t5536-fetch-shallow.sh > new file mode 100755 > index 0000000..41de74d > --- /dev/null > +++ b/t/t5536-fetch-shallow.sh > @@ -0,0 +1,128 @@ > +#!/bin/sh > + > +test_description='fetch/clone from a shallow clone' > + > +. ./test-lib.sh > + > +commit() { > + echo "$1" >tracked && > + git add tracked && > + git commit -m "$1" > +} > + > +test_expect_success 'fetch something upstream has but hidden by clients shallow boundaries' ' > + # the blob "1" is available in .git but hidden by the > + # shallow2/.git/shallow and it should be resent > + ! git --git-dir=shallow2/.git cat-file blob `echo 1|git hash-object --stdin` >/dev/null && > + echo 1 > 1.t && s/> />/ > + git add 1.t && > + git commit -m add-1-back && > + ( > + cd shallow2 && > + git fetch ../.git +refs/heads/master:refs/remotes/top/master && > + git fsck && > + git log --format=%s top/master >actual && > + cat <<EOF >expect && > +add-1-back > +4 > +3 > +EOF > + test_cmp expect actual > + ) && > + git --git-dir=shallow2/.git cat-file blob `echo 1|git hash-object --stdin` >/dev/null > + > +' -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html