Re: [PATCH v2/GSoC/RFC] fetch: git fetch --deepen
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Mar 22, 2015, 19:15 UTC
- Message-ID
- <CAPig+cSSQaMyW4fbb0guBqJ---VAG8m4trt2a52qLYAANT01og@mail.gmail.com>
- In-Reply-To
- <39ef84113d77ee6fa371ac2f23bbb0ef321323ba.1427031746.git.dongcan.jiang@gmail.com>
On Sun, Mar 22, 2015 at 11:24 AM, Dongcan Jiang <dongcan.jiang@gmail.com> wrote:
Show 16 quoted lines
> This patch is just for discusstion. An option --deepen is added to > 'git fetch'. When it comes to '--deepen', git should fetch N more > commits ahead the local shallow commit, where N is indicated by > '--depth=N'. [1] > Signed-off-by: Dongcan Jiang <dongcan.jiang@gmail.com> > --- > diff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh > index d78f320..3b960c8 100755 > --- a/t/t5510-fetch.sh > +++ b/t/t5510-fetch.sh > @@ -708,4 +708,16 @@ test_expect_success 'fetching a one-level ref works' ' > ) > ' > > +test_expect_success 'fetching deepen' ' > + git clone . deepen --depth=1 && (
Quoting Junio[1]: "...make sure tests serve as good examples, tests should stick to 'options first and then arguments'..."
> + cd deepen && > + git fetch .. foo --depth=1
See [1].
> + git show foo > + test_must_fail git show foo~ > + git fetch .. foo --depth=1 --deepen
See [1].
> + git show foo~ > + test_must_fail git show foo~2
Mentioned previously[2]: Broken &&-chain throughout this test.
> + ) > +' > + > test_done
[1]: http://article.gmane.org/gmane.comp.version-control.git/265248 [2]: http://article.gmane.org/gmane.comp.version-control.git/265419