Thread (1 message) 1 message, 1 author, 2021-09-27

Re: [PATCH v4 00/13] Sparse-checkout: modify 'git add', 'git rm', and 'git mv' behavior

From: Junio C Hamano <hidden>
Date: 2021-09-27 20:51:11

Elijah Newren [off-list ref] writes:
quoted
  2:  c7dedb41291 !  2:  58389edc76c t1092: behavior for adding sparse files
     @@ t/t1092-sparse-checkout-compatibility.sh: test_sparse_match () {
      + file=$1 &&
      + for repo in sparse-checkout sparse-index
      + do
     -+         git -C $repo status --porcelain >$repo-out &&
     -+         ! grep "^A  $file\$" $repo-out &&
     -+         ! grep "^M  $file\$" $repo-out || return 1
     ++         # Skip "unmerged" paths
     ++         git -C $repo diff --staged --diff-filter=ACDMRTXB -- "$file" >diff &&
Wouldn't this be more naturally spelled as --diff-filter=u ? (Note:
lowercase 'u', not uppercase.)  Then you could drop the comment too.
Excellent.
Other than that nit, this round looks good to me.  Feel free to add a

Reviewed-by: Elijah Newren <redacted>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help