[PATCH v4 0/4] pack-bitmap.c: avoid exposing absolute paths

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Teng Long <dyroneteng@xxxxxxxxx>

Sorry for relying late, Taylor..

Diff since v3:

I picked Peff's two new constructive patches[1] which I think are meaningful.
Peff also mentioned whether to design a "GIT_TRACE2_BITMAP" ENV to help
debugging bitmap, and I think it's very interesting but maybe it's a bigger
scale on current patchset, so I prefer to do it in another series.

1. https://public-inbox.org/git/Y3K%2F%2FkO3fxD7Pl3%2F@xxxxxxxxxxxxxxxxxxxxxxx/

Thanks.

Jeff King (2):
  pack-bitmap.c: break out of the bitmap loop early if not tracing
  pack-bitmap.c: trace bitmap ignore logs when midx-bitmap is found

Teng Long (2):
  pack-bitmap.c: remove unnecessary "open_pack_index()" calls
  pack-bitmap.c: avoid exposing absolute paths

 pack-bitmap.c           | 39 ++++++++++++++++++++++++++-------------
 t/t5310-pack-bitmaps.sh |  5 +++--
 2 files changed, 29 insertions(+), 15 deletions(-)

Range-diff against v3:
-:  ---------- > 1:  aaeb021538 pack-bitmap.c: remove unnecessary "open_pack_index()" calls
1:  de941f58f9 ! 2:  9d5a491887 pack-bitmap.c: avoid exposing absolute paths
    @@ pack-bitmap.c: static int open_midx_bitmap_1(struct bitmap_index *bitmap_git,
      		get_midx_filename(&buf, midx->object_dir);
     -		/* ignore extra bitmap file; we can only handle one */
     -		warning(_("ignoring extra bitmap file: '%s'"), buf.buf);
    -+		/* ignore extra midx bitmap files; we can only handle one */
     +		trace2_data_string("bitmap", the_repository,
     +				   "ignoring extra midx bitmap file", buf.buf);
      		close(fd);
    @@ pack-bitmap.c: static int open_pack_bitmap_1(struct bitmap_index *bitmap_git, st
      	if (bitmap_git->pack || bitmap_git->midx) {
     -		/* ignore extra bitmap file; we can only handle one */
     -		warning(_("ignoring extra bitmap file: '%s'"), packfile->pack_name);
    -+		/* ignore extra bitmap files; we can only handle one */
     +		trace2_data_string("bitmap", the_repository,
     +				   "ignoring extra bitmap file", packfile->pack_name);
      		close(fd);
    @@ t/t5310-pack-bitmaps.sh: test_bitmap_cases () {
      
     -			git rev-list --use-bitmap-index HEAD 2>err &&
     -			grep "ignoring extra bitmap file" err
    -+			GIT_TRACE2_PERF=$(pwd)/trace2.txt git rev-list --use-bitmap-index HEAD &&
    ++			GIT_TRACE2_EVENT=$(pwd)/trace2.txt git rev-list --use-bitmap-index HEAD &&
     +			grep "opened bitmap" trace2.txt &&
     +			grep "ignoring extra bitmap" trace2.txt
      		)
-:  ---------- > 3:  f6c5b45bdc pack-bitmap.c: break out of the bitmap loop early if not tracing
-:  ---------- > 4:  2acaa3f097 pack-bitmap.c: trace bitmap ignore logs when midx-bitmap is found
-- 
2.38.1.383.g9d5a491887b




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux