git: ba120b8d38f3 - main - mfc-candidates: Annotate variables as local
Ed Maste <[email protected]>
| Newsgroups | gmane.os.freebsd.devel.cvs.src,gmane.os.freebsd.current.scm |
|---|---|
| Message-ID | <[email protected]> |
The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=ba120b8d38f3f0bc78efa5200807eb9904fbb1f9 commit ba120b8d38f3f0bc78efa5200807eb9904fbb1f9 Author: Mark Johnston <[email protected]> AuthorDate: 2026-08-12 18:39:11 +0000 Commit: Ed Maste <[email protected]> CommitDate: 2026-08-17 13:43:25 +0000 mfc-candidates: Annotate variables as local And clean up luacheck warnings. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D48950 --- tools/tools/git/mfc-candidates.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/tools/git/mfc-candidates.lua b/tools/tools/git/mfc-candidates.lua index 0bf1a2f636bd..a120ff641b9a 100755 --- a/tools/tools/git/mfc-candidates.lua +++ b/tools/tools/git/mfc-candidates.lua @@ -7,6 +7,9 @@ -- "MFC from" branch and do not have a corresponding "cherry picked from" -- commit in the "MFC to" branch. +-- Global state +local verbose = 0 + -- Execute a command and return its output. A final newline is stripped, -- similar to sh. local function exec_command(command) @@ -102,9 +105,6 @@ local function set_difference(set1, set2) return result end --- Global state -verbose = 0 - local function params(from_branch, to_branch, author) print("from: " .. from_branch) print("to: " .. to_branch) @@ -125,9 +125,9 @@ end -- Main function local function main() local from_branch = "freebsd/main" - local to_branch = "" + local to_branch local author = os.getenv("USER") or "" - local dirspec = nil + local dirspec local url = exec_command("git remote get-url freebsd 2>/dev/null") local freebsd_repo @@ -215,7 +215,7 @@ local function main() local result_hashes = set_difference(from_hashes, to_hashes) if exclude_file then - exclude_hashes = read_exclude(exclude_file) + local exclude_hashes = read_exclude(exclude_file) result_hashes = set_difference(result_hashes, exclude_hashes) end