mirror of
git://f0xx.org/android_cast
synced 2026-07-29 02:59:00 +03:00
header update
This commit is contained in:
26
HEADER.txt
26
HEADER.txt
@@ -7,6 +7,10 @@ Install git hooks: `./scripts/install-git-hooks.sh`
|
||||
|
||||
Excluded paths: `third-party/` and build/vendor dirs are never modified.
|
||||
|
||||
Hooks (only **staged** / **committed** sources are touched; third-party/ is skipped):
|
||||
pre-commit — Created/Updated/Contributors/Digest for staged files; preserves Commit line
|
||||
post-commit — sets `Commit: <sha>` on files in HEAD, then `git commit --amend --no-edit`
|
||||
|
||||
Pre-commit contributor (email auto-filled from git when missing):
|
||||
export HEADER_CONTRIBUTOR="Your Name" # adds git user.email
|
||||
export HEADER_CONTRIBUTOR="Name <you@mail>" # used as-is
|
||||
@@ -24,6 +28,8 @@ __DATE_PLACEHOLDER__ First commit time (human-readable + timezone)
|
||||
|
||||
__UPDATE_DATE_PLACEHOLDER__ Last change time; pre-commit refreshes on staged edits
|
||||
|
||||
__COMMIT_PLACEHOLDER__ Git commit SHA for this revision (post-commit hook; not in Digest)
|
||||
|
||||
__CONTRIBUTOR__ `Name <email>` when known (git log/config); else `Name`
|
||||
|
||||
__CLASS_NAME_PLACEHOLDER__ ` * class Foo` / interface / enum — omitted if none
|
||||
@@ -34,6 +40,25 @@ __CONTRIBUTORS_LIST_PLACEHOLDER__
|
||||
|
||||
__DIGEST__ `Digest: SHA256\t<hex>` of file without this line; omitted if N/A
|
||||
|
||||
Example (PHP)
|
||||
-------------
|
||||
<?php
|
||||
/*
|
||||
* package examples/foo/bar.php
|
||||
* bar.php
|
||||
* Created at: Wed 20 May 2026 12:00:00 +0300
|
||||
* Updated at: Wed 20 May 2026 15:00:00 +0300 by Name <user@email.com>
|
||||
* Commit: abcdef1234567890...
|
||||
* Contributors:
|
||||
* - Name <user@email.com> (1 commits, 10 lines)
|
||||
* - Cursor Agent (project assistant)
|
||||
* Digest: SHA256 abc123...
|
||||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
Pure PHP keeps a single <?php block (declare must follow the comment directly).
|
||||
View templates add ?> after the comment, then HTML/markup.
|
||||
|
||||
Example (Java)
|
||||
--------------
|
||||
package com.foxx.androidcast;
|
||||
@@ -42,6 +67,7 @@ package com.foxx.androidcast;
|
||||
* MainActivity.java
|
||||
* Created at: Wed 20 May 2026 12:00:00 +0300
|
||||
* Updated at: Wed 20 May 2026 15:00:00 +0300 by Anton Afanasyeu <a.afanasieff@gmail.com>
|
||||
* Commit: abcdef1234567890...
|
||||
* class MainActivity
|
||||
* Contributors:
|
||||
* - Anton Afanasyeu <a.afanasieff@gmail.com> (29 commits, 120 lines)
|
||||
|
||||
Reference in New Issue
Block a user