Re: [PATCH 1/2] pack-objects: Teach --use-bitmap-index codepath to respect --local, --honor-pack-keep and --incremental

2 messages, 2 authors, 2016-08-08 · open the first message on its own page

Re: [PATCH 1/2] pack-objects: Teach --use-bitmap-index codepath to respect --local, --honor-pack-keep and --incremental

From: Junio C Hamano <hidden>
Date: 2016-08-08 19:06:22

Jeff King [off-list ref] writes:
quoted
+	if grep -qFf nonlocal-loose 1.objects; then
+		echo "Non-local object present in pack generated with --local"
+		return 1
+	fi
+'
grep -f isn't portable. However, I think:

  echo $objsha1 >expect &&
  git show-index <1.pack | cut -d' ' -f2 >actual
  test_cmp expect actual

would work (if you do stick with two entries, you might need to sort
your "expect").
Hmph, are you sure?  "grep -f pattern_file" is in POSIX.1.

Re: [PATCH 1/2] pack-objects: Teach --use-bitmap-index codepath to respect --local, --honor-pack-keep and --incremental

From: Jeff King <hidden>
Date: 2016-08-08 19:55:10

On Mon, Aug 08, 2016 at 12:06:13PM -0700, Junio C Hamano wrote:
Jeff King [off-list ref] writes:
quoted
quoted
+	if grep -qFf nonlocal-loose 1.objects; then
+		echo "Non-local object present in pack generated with --local"
+		return 1
+	fi
+'
grep -f isn't portable. However, I think:

  echo $objsha1 >expect &&
  git show-index <1.pack | cut -d' ' -f2 >actual
  test_cmp expect actual

would work (if you do stick with two entries, you might need to sort
your "expect").
Hmph, are you sure?  "grep -f pattern_file" is in POSIX.1.
Hmm, you're right. I specifically checked my local grep.1posix manpage,
but searching for "-f" didn't turn up anything, because it's formatted
with a Unicode minus sign (U+2212). Bleh.

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help