Re: [PATCH 2/2] Add transport message for up-to-date references
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 15, 2024, 16:54 UTC
- Message-ID
- <xmqq7ci3saep.fsf@gitster.g>
- In-Reply-To
- <SA1PR14MB469168B6AAB246344190D9038D282@SA1PR14MB4691.namprd14.prod.outlook.com>
Christopher Lindee <christopher.lindee@webpros.com> writes:
Show 6 quoted lines
> This raises a good point: if we default to the old behavior and only > send up-to-date refs when the new option is present (as is currently > the case with this patchset), then existing scripts will continue to > work. Moreover, scripts using the new option will consistently have > "up to date", so they can change the grep to use that (since it will > never show "Everything up-to-date!").
Scripts should never be parsing the output meant for humans. You should worry about "git push --porcelain" output first.
I think we report "= srcref:dstref [up to date]" there and that is what the scripts are expecting for an up-to-date case. If you want to allow the scripts to react to a forced no-op update differently from the normal "we didn't even tell them about this ref" case, then we'd need a different type letter or "[up to date]" string (or both).