The script `make/scripts/update_copyright.sh` relies on the path to the script 
for git detection, which is fragile or does not work at all or git worktrees. 
This PR uses git itself to detect whether the script is running in a git 
repository. This has the added benefit that the script can be executed from 
anywhere in the repository.

-------------

Commit messages:
 - Better git detection

Changes: https://git.openjdk.org/jdk/pull/24828/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24828&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8355400
  Stats: 13 lines in 1 file changed: 6 ins; 4 del; 3 mod
  Patch: https://git.openjdk.org/jdk/pull/24828.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/24828/head:pull/24828

PR: https://git.openjdk.org/jdk/pull/24828

Reply via email to