mirror of
https://github.com/ruby/ruby.git
synced 2026-10-28 08:25:20 +08:00
Fix lastrev invoking in non-git directory
This commit is contained in:
1 parent
3e77f97d38
commit
50608f224a
2 files changed
+8
-5
Notes:
git
2026-10-15 17:58:25 +00:00
No files matched your search
@@ -20,8 +20,8 @@ mflags = $(MFLAGS)
|
||||
gnumake_recursive =
|
||||
sequential = $(gnumake:yes=-sequential)
|
||||
enable_shared = $(ENABLE_SHARED:no=)
|
||||
yes_git = $(WITH_GIT:no=)
|
||||
no_git = $(WITH_GIT:yes=)
|
||||
yes_git = $(HAVE_GIT:no=)
|
||||
no_git = $(HAVE_GIT:yes=)
|
||||
|
||||
UNICODE_VERSION = 17.0.0
|
||||
UNICODE_EMOJI_VERSION_0 = $(UNICODE_VERSION)///
|
||||
@@ -1360,7 +1360,7 @@ clean-build-tool:
|
||||
|
||||
$(srcdir)/revision.h$(no_git:no=~disabled~): $(REVISION_H)
|
||||
|
||||
REVISION_H_CMD = $(LASTREV) | $(IFCHANGE) --timestamp=.revision.time revision.h -
|
||||
REVISION_H_CMD = $(LASTREV) $(srcdir) | $(IFCHANGE) --empty --timestamp=.revision.time revision.h -
|
||||
|
||||
$(REVISION_H)$(no_git:no=~disabled~):
|
||||
$(Q) $(REVISION_H_CMD)
|
||||
|
||||
+5
-2
@@ -60,8 +60,11 @@ shift $((OPTIND-1))
|
||||
gitdir="${1-.}" head="${2-HEAD}"
|
||||
|
||||
branch=`${git} -C "${gitdir}" symbolic-ref --short "${head}" 2>/dev/null` || branch="$head"
|
||||
set `${git} -C "${gitdir}" log -1 --no-show-signature "--abbrev=${width}" \
|
||||
"--date=format-local:%FT%TZ %Y %m %d" "--format=%h %H %${date_type}" "${head}" --`
|
||||
set _ `${git} -C "${gitdir}" log -1 --no-show-signature "--abbrev=${width}" \
|
||||
"--date=format-local:%FT%TZ %Y %m %d" "--format=%h %H %${date_type}" "${head}" -- 2>/dev/null`
|
||||
shift
|
||||
|
||||
[ -z ${1+set} ] && exit
|
||||
|
||||
echo "#define RUBY_REVISION \"$1\""
|
||||
echo "#define RUBY_FULL_REVISION \"${2}\""
|
||||
|
||||
Reference in new issue
Block a user