You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@trafficserver.apache.org by GitBox <gi...@apache.org> on 2022/07/07 18:14:16 UTC
[GitHub] [trafficserver] randall commented on a diff in pull request #8944: Make the autopep8 clang-format targets quieter
randall commented on code in PR #8944:
URL: https://github.com/apache/trafficserver/pull/8944#discussion_r916156384
##########
tools/clang-format.sh:
##########
@@ -87,17 +87,29 @@ EOF
exit 1
else
[ ${just_install} -eq 1 ] && return
- for file in $(find $DIR -iname \*.[ch] -o -iname \*.cc -o -iname \*.h.in); do
+
+ # Efficiently retrieving modification timestamps in a platform
+ # independent way is challenging. We use find's -newer argument, which
+ # seems to be broadly supported. The following file is created and has a
+ # timestamp just before running clang-format. Any file with a timestamp
+ # after this we assume was modified by clang-format.
+ start_time_file=/tmp/format_start.$$
Review Comment:
This could be insecure. Probably better to use mktemp (like the autopep does)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org