Re: [PATCH v2] t6040 (branch tracking): check “status” instead of “commit”
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Aug 12, 2010, 00:45 UTC
- Message-ID
- <AANLkTi=zQW=QjmBtDwwn51VCDPfJae6CQwSbx+9ATxNs@mail.gmail.com>
- In-Reply-To
- <20100811074909.GC5450@burratino>
On Wed, Aug 11, 2010 at 07:49, Jonathan Nieder <jrnieder@gmail.com> wrote:
Show 35 quoted lines
> Among the tests for correct branch tracking output is one that > examines “git commit” output: > > $ git commit > # Your branch and 'origin/maint' have diverged, > # and have 9 and 69 different commit(s) each, respectively. > [...] > no changes added to commit (use "git add" and/or "git commit -a") > $ > > But we are experimenting with changing that output. So drop > that test for now and replace it with a test for “git status” > (which was not being checked yet and shares the same output > format and wt-status backend). > > Reported-by: Thomas Rast <trast@student.ethz.ch> > Reported-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> > Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> > --- > Oops, wrong patch. Here’s the one I meant. Sane? > > diff --git a/t/t6040-tracking-info.sh b/t/t6040-tracking-info.sh > index 1785e17..a5b4489 100755 > --- a/t/t6040-tracking-info.sh > +++ b/t/t6040-tracking-info.sh > @@ -68,8 +68,7 @@ test_expect_success 'status' ' > ( > cd test && > git checkout b1 >/dev/null && > - # reports nothing to commit > - test_must_fail git commit --dry-run > + git status > ) >actual && > grep "have 1 and 1 different" actual > '
This looks good. My patch should be dropped in favor of this. It looks like the extra testing I did is covered by the "git commit --dry-run" test in t7508-status.sh in your original patch.