mirror of
https://github.com/torvalds/linux.git
synced 2026-10-22 23:01:49 +02:00
setlocalversion: make tag local to try_tag()
The tag variable is only used by try_tag(), but is currently declared local to scm_version() and modified by try_tag(). Make tag local to try_tag() instead and remove the unused declaration from scm_version(). No functional changes. Signed-off-by: Yuntao Wang <yuntao.wang@linux.dev> Link: https://patch.msgid.link/20260823094913.421144-1-yuntao.wang@linux.dev Signed-off-by: Nathan Chancellor <nathan@kernel.org>
This commit is contained in:
parent
72c442e5ba
commit
ba0e6a6f0f
|
|
@ -33,7 +33,7 @@ if test $# -gt 0 -o ! -d "$srctree"; then
|
|||
fi
|
||||
|
||||
try_tag() {
|
||||
tag="$1"
|
||||
local tag="$1"
|
||||
|
||||
# Is $tag an annotated tag?
|
||||
if [ "$(git cat-file -t "$tag" 2> /dev/null)" != tag ]; then
|
||||
|
|
@ -59,7 +59,6 @@ scm_version()
|
|||
{
|
||||
local short=false
|
||||
local no_dirty=false
|
||||
local tag
|
||||
|
||||
while [ $# -gt 0 ];
|
||||
do
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user