mbox series

[0/3] tag: prevent recursive tags

Message ID cover.1553586707.git.liu.denton@gmail.com (mailing list archive)
Headers show
Series tag: prevent recursive tags | expand

Message

Denton Liu March 26, 2019, 7:53 a.m. UTC
Peff said:
> Yeah, that's probably a good idea. Now we just need somebody to write
> the patch...
> 
> -Peff

Hey would you look at that, somebody wrote the patch!

---

Earlier in the mailing list[1], Robert Dailey reported confusion over
some recursive tags.

Peff noted that he hasn't seen a tag-to-a-tag in the wild so in most
cases, it'd probably be a mistake on the part of a user. He also
suggested we error out on a recursive tag unless "--allow-recursive-tag"
is provided.

This patchset implements those suggestions.

[1]: https://public-inbox.org/git/CAHd499BM91tf7f8=phR4Az8vMsHAHUGYsSb1x9as=WukUVZHJw@mail.gmail.com/
[2]: https://public-inbox.org/git/20190325144930.GA19929@sigill.intra.peff.net/


Denton Liu (3):
  tag: prevent recursive tags
  t7004: ensure recursive tag behavior is working
  git-tag.txt: document --allow-recursive-tag option

 Documentation/git-tag.txt      |  7 ++++++-
 advice.c                       |  2 ++
 advice.h                       |  1 +
 builtin/tag.c                  | 30 ++++++++++++++++++++++++++----
 t/annotate-tests.sh            |  2 +-
 t/t0410-partial-clone.sh       |  2 +-
 t/t4205-log-pretty-formats.sh  |  2 +-
 t/t5305-include-tag.sh         |  2 +-
 t/t5500-fetch-pack.sh          |  2 +-
 t/t6302-for-each-ref-filter.sh |  4 ++--
 t/t7004-tag.sh                 | 12 ++++++++++--
 t/t9350-fast-export.sh         |  4 ++--
 12 files changed, 54 insertions(+), 16 deletions(-)

Comments

Jeff King March 26, 2019, 4:18 p.m. UTC | #1
On Tue, Mar 26, 2019 at 12:53:14AM -0700, Denton Liu wrote:

> Peff said:
> > Yeah, that's probably a good idea. Now we just need somebody to write
> > the patch...
> 
> Hey would you look at that, somebody wrote the patch!

The system works. :)

> Earlier in the mailing list[1], Robert Dailey reported confusion over
> some recursive tags.
> 
> Peff noted that he hasn't seen a tag-to-a-tag in the wild so in most
> cases, it'd probably be a mistake on the part of a user. He also
> suggested we error out on a recursive tag unless "--allow-recursive-tag"
> is provided.
> 
> This patchset implements those suggestions.

Thanks. I agree with all of the comments Ævar left, but other than that
this looks pretty good to me.

The only hesitation I'd have is that turning this case into a hard error
(rather than just an informative warning) may be too sudden for some
people's tastes. I'm on the fence myself; I'll be curious what Junio
thinks when he gets back.

-Peff