git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 0/1] pack-bitmap.c: avoid exposing absolute paths

From
Taylor Blau <me@ttaylorr.com>
Date
Oct 30, 2022, 18:42 UTC
Message-ID
<Y17FeGeWqEE7CWQS@nand.local>
In-Reply-To
<Y1rt+uOKwlP5PIrT@coredump.intra.peff.net>
On Thu, Oct 27, 2022 at 04:45:46PM -0400, Jeff King wrote:
Show 11 quoted lines
> On Wed, Oct 26, 2022 at 05:42:51PM -0400, Taylor Blau wrote:
>
> > At GitHub, we actually *do* remove this warning entirely:
> >
> > --- >8 ---
> >
> > From: Jeff King <peff@peff.net>
> > Subject: [PATCH] pack-bitmap: drop "ignoring extra bitmap" warning
>
> A blast from the past. You didn't include the Date field, but this was
> from ~2017.

I'll blame you for that one, since this output comes from your 'git print-patch's script, which only prints out the From: and Subject: headers. ;-)

Show 12 quoted lines
> > For the general case of what ships in git.git, I *do* find this warning
> > useful. It's helpful when hacking on pack-bitmap.c to know if you've
> > messed up, and it's useful to see the filename of the affected
> > bitmap(s).
>
> It feels like you might be a special case, though. Most people are not
> hacking on the bitmap code. :)
>
> I wonder if you'd be better served by having good tracing for the bitmap
> code. Then it could tell you lots of things, like which bitmap it
> actually opened, which ones it ignored, etc. Of course you'd have to
> remember to enable that tracing when you're working in the area.

Yeah, I wouldn't be sad to see this get moved to the trace2 mechanism. In fact, I almost prefer that approach, since server operators and developers can still debug the bitmap machinery, but end-users of forges like GitHub won't see the output.

Maybe that is the best approach forward. Teng Long: does that sound OK to you?

> So it may not be worth worrying about. It does seem like it would be
> easy to reorder open_pack_bitmap_1() to look for a bitmap file first and
> only open the idx if it finds something.

Yeah, I had always thought that it was odd that we had to go through all of the repository's possible bitmaps and try to open them one by one. It might be interesting to have a file that lists the path of _the_ bitmap, which we consult first and then try and open that pack or MIDX bitmap. But I dunno.

Show 12 quoted lines
> > I think we could reasonably change the warning to
> >
> >     warning(_("ignoring extra bitmap file: %s"),
> >             basename(packfile->pack_name));
> >
> > since the rest of the path is obvious based on which repository you're
> > working in. So that would be a reasonable change to shorten up the
> > output a little bit.
>
> Yeah. If we are going to keep the warning, this makes much better sense.
> Possibly we could even just skip_prefix() on the object directory,
> though I think in practice it amounts to the same thing.
I agree, they end up the same in either approach you take.

Thanks, Taylor

Previous: Jeff KingNext: Teng Long
Message 9 of 67 in “pack-bitmap.c: avoid exposing absolute paths”
  1. 0/1 pack-bitmap.c: avoid exposing absolute pathsTeng Long, Aug 26, 2022
  2. 1/1 pack-bitmap.c: avoid exposing absolute pathsTeng Long, Aug 26, 2022
  3. Junio C HamanoAug 26, 2022
  4. Teng LongAug 29, 2022
  5. Taylor BlauOct 26, 2022
  6. Ævar Arnfjörð BjarmasonOct 26, 2022
  7. Teng LongOct 31, 2022
  8. Jeff KingOct 27, 2022
  9. Taylor BlauOct 30, 2022
  10. Teng LongOct 31, 2022
  11. Teng LongNov 2, 2022
  12. Jeff KingNov 2, 2022
  13. Teng LongNov 2, 2022
  14. Teng LongOct 31, 2022
  15. Taylor BlauNov 3, 2022
  16. Ævar Arnfjörð BjarmasonNov 2, 2022
  17. Teng LongNov 2, 2022
  18. 0/1 pack-bitmap.c: avoid exposing absolute pathsTeng Long, Nov 2, 2022
  19. 1/1 pack-bitmap.c: avoid exposing absolute pathsTeng Long, Nov 2, 2022
  20. Taylor BlauNov 3, 2022
  21. Teng LongNov 3, 2022
  22. Taylor BlauNov 5, 2022
  23. Taylor BlauNov 3, 2022
  24. Teng LongNov 3, 2022
  25. 0/2 pack-bitmap.c: avoid exposing absolute pathsTeng Long, Nov 4, 2022
  26. 1/2 pack-bitmap.c: avoid exposing absolute pathsTeng Long, Nov 4, 2022
  27. Taylor BlauNov 4, 2022
  28. 2/2 pack-bitmap.c: remove unnecessary "open_pack_index()" callsTeng Long, Nov 4, 2022
  29. Taylor BlauNov 4, 2022
  30. Taylor BlauNov 4, 2022
  31. 0/2 pack-bitmap.c: avoid exposing absolute pathsTeng Long, Nov 10, 2022
  32. 1/2 pack-bitmap.c: remove unnecessary "open_pack_index()" callsTeng Long, Nov 10, 2022
  33. Jeff KingNov 14, 2022
  34. Taylor BlauNov 14, 2022
  35. Jeff KingNov 14, 2022
  36. Taylor BlauNov 14, 2022
  37. 2/2 pack-bitmap.c: avoid exposing absolute pathsTeng Long, Nov 10, 2022
  38. Taylor BlauNov 11, 2022
  39. Jeff KingNov 14, 2022
  40. Teng LongNov 17, 2022
  41. Jeff KingNov 17, 2022
  42. Taylor BlauNov 17, 2022
  43. Teng LongNov 21, 2022
  44. 0/4 pack-bitmap.c: avoid exposing absolute pathsTeng Long, Nov 21, 2022
  45. 1/4 pack-bitmap.c: remove unnecessary "open_pack_index()" callsTeng Long, Nov 21, 2022
  46. 2/4 pack-bitmap.c: avoid exposing absolute pathsTeng Long, Nov 21, 2022
  47. 3/4 pack-bitmap.c: break out of the bitmap loop early if not tracingTeng Long, Nov 21, 2022
  48. Junio C HamanoNov 21, 2022
  49. Teng LongNov 28, 2022
  50. 4/4 pack-bitmap.c: trace bitmap ignore logs when midx-bitmap is foundTeng Long, Nov 21, 2022
  51. Jeff KingNov 21, 2022
  52. Junio C HamanoNov 21, 2022
  53. Teng LongNov 28, 2022
  54. Teng LongNov 28, 2022
  55. Jeff KingNov 29, 2022
  56. Teng LongNov 29, 2022
  57. Jeff KingNov 21, 2022
  58. Teng LongNov 28, 2022
  59. 0/4 pack-bitmap.c: avoid exposing absolute pathsTeng Long, Nov 28, 2022
  60. 1/4 pack-bitmap.c: remove unnecessary "open_pack_index()" callsTeng Long, Nov 28, 2022
  61. 2/4 pack-bitmap.c: avoid exposing absolute pathsTeng Long, Nov 28, 2022
  62. 3/4 pack-bitmap.c: break out of the bitmap loop early if not tracingTeng Long, Nov 28, 2022
  63. Taylor BlauNov 28, 2022
  64. Teng LongNov 29, 2022
  65. 4/4 pack-bitmap.c: trace bitmap ignore logs when midx-bitmap is foundTeng Long, Nov 28, 2022
  66. Taylor BlauNov 28, 2022
  67. Teng LongNov 29, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.