Re: [PATCH 2/3] log: add default decoration filter
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Jul 26, 2022, 14:39 UTC
- Message-ID
- <220726.86y1wglyuq.gmgdl@evledraar.gmail.com>
- In-Reply-To
- <6b40b84773c70244bb13204ec566b713f1bdf865.1658844250.git.gitgitgadget@gmail.com>
On Tue, Jul 26 2022, Derrick Stolee via GitGitGadget wrote:
Show 15 quoted lines
> From: Derrick Stolee <derrickstolee@github.com> > [...] > test_expect_success 'log.decorate config parsing' ' > git log --oneline --decorate=full >expect.full && > git log --oneline --decorate=short >expect.short && > @@ -2198,6 +2204,23 @@ test_expect_success 'log --decorate includes all levels of tag annotated tags' ' > test_cmp expect actual > ' > > +test_expect_success 'log --decorate does not include things outside filter' ' > + reflist="refs/prefetch/ refs/rebase-merge/ refs/bundle/" && > + > + for ref in $reflist > + do > + mkdir -p .git/$ref &&
Let's not use -p, and fail if .git doesn't exist?
> + echo $(git rev-parse HEAD) >.git/$ref/fake || return 1
Hiding the exit code of the "git rev-parse here, but aside fram that why is the echo needed at all, can't we just:
git rev-parse HEAD >.git/ref/fake
But even more generally can't we:
git update-ref $ref/fake HEAD
?
If we need to manually munge the ref store let's add REFFILES prereq.