Re: [PATCH v3 15/28] fetch: add --update-shallow to get refs that require updating .git/shallow
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Nov 27, 2013, 01:53 UTC
- Message-ID
- <CAPig+cRMj_RY53--OLDmonZLzhzf0Cu+JrDc8LAicSn5QGKNyQ@mail.gmail.com>
- In-Reply-To
- <1385351754-9954-16-git-send-email-pclouds@gmail.com>
On Sun, Nov 24, 2013 at 10:55 PM, Nguyễn Thái Ngọc Duy <pclouds@gmail.com> wrote:
Show 14 quoted lines
> diff --git a/t/t5536-fetch-shallow.sh b/t/t5536-fetch-shallow.sh > index e011ead..95b6313 100755 > --- a/t/t5536-fetch-shallow.sh > +++ b/t/t5536-fetch-shallow.sh > @@ -141,4 +141,26 @@ EOF > ) > ' > > +test_expect_success 'fetch --update-shallow' ' > + ( > + cd notshallow && > + git fetch --update-shallow ../shallow/.git refs/heads/*:refs/remotes/shallow/* && > + git fsck && > + git for-each-ref --format="%(refname)" |sort >actual.refs &&
Exit status of git-for-each-ref could be lost down the pipe.
Show 17 quoted lines
> + cat <<EOF >expect.refs && > +refs/remotes/shallow/master > +refs/remotes/shallow/no-shallow > +EOF > + test_cmp expect.refs actual.refs && > + git log --format=%s shallow/master >actual && > + cat <<EOF >expect && > +6 > +5 > +4 > +3 > +EOF > + test_cmp expect actual > + ) > +' > + > test_done