"Bence Ferdinandy" <bence@xxxxxxxxxxxxxx> writes: > sorry about the other thread, I saw "extend whitespace checks" and I thought > based on what Kartik wrote that `log --check` should have caught it, which is > why I thought it might be appropriate there. > With v14, running `git log --check --pretty=format:"---% h% s" master..` gives me: --- f73b2c577b fetch set_head: handle mirrored bare repositories --- c0c84fb7f9 fetch: set remote/HEAD if it does not exist --- c366911074 refs: add create_only option to refs_update_symref_extended --- c47704d4df refs: add TRANSACTION_CREATE_EXISTS error --- 22e7a9bcae remote set-head: better output for --auto --- 25d9944eb2 remote set-head: refactor for readability --- 01fe46c842 refs: atomically record overwritten ref in update_symref --- fed56bc6cc refs: standardize output of refs_read_symbolic_ref refs/reftable-backend.c:833: indent with spaces. + if (ret) refs/reftable-backend.c:834: indent with spaces. + ret = -1; refs/reftable-backend.c:835: indent with spaces. + else if (ref.value_type == REFTABLE_REF_SYMREF) refs/reftable-backend.c:837: indent with spaces. + else refs/reftable-backend.c:838: indent with spaces. + ret = NOT_A_SYMREF; --- d5534d6c67 t/t5505-remote: test failure of set-head --- a77b3b7774 t/t5505-remote: set default branch to main > On Mon Nov 25, 2024 at 03:56, Junio C Hamano <gitster@xxxxxxxxx> wrote: >> "Bence Ferdinandy" <bence@xxxxxxxxxxxxxx> writes: >> >>>> At the least you should see `git log`'s output, but if there are issues >>>> they should be shown inline. So when you say 'no output' do you mean you >>>> see absolutely no output? >>> >>> Absolutely no output: >>> https://asciinema.org/a/lsqp4e1bNst6cFWw9M2jX1IqC >>> >>> But I figured out why: the whitespace and the tabs were not mixed on the line, >>> just across lines. As I read it, that is not an error to have tabs on one line >>> and spaces on the next. >> >> Our .gitattribute starts like so: >> >> * whitespace=!indent,trail,space >> *.[ch] whitespace=indent,trail,space diff=cpp >> >> so, unless otherwise specified, we frown upon trailing whitespace >> and space before tab and indenting with non tab is permitted, but C >> source and header files have further care about "indent" (short for >> "indent-with-non-tab". >> >> So mixed or not, if you indented with spaces and not tabs, that >> would be noticed. > > So `git log --check --pretty=format:"---% h% s"` was _not_ supposed to catch > this? > > I ran the CI with this patch again: > https://github.com/ferdinandyb/git/actions/runs/12031250376 > > and it's all green, so wherever this _should_ have been caught: it didn't work. I'm not an expert in GitHub actions, but if you look at `.github/workflows/check-whitespace.yml`, it says it is only triggered for `pull_request`. Did you raise a pull request? From your link, I don't see the whitespace job being triggered, so `it didn't work` would be inaccurate, since it didn't even trigger the job ;) [snip]
Attachment:
signature.asc
Description: PGP signature