Skip to content
Snippets Groups Projects
Select Git revision
  • 8a15e9abc4b36a9c5af0e0f81c7aeea8096ee666
  • next default protected
  • fix-1277
  • fix-1258
  • delfile2
  • cleanupmusic
  • gametype-refactor-1
  • custom-map-names
  • extra-textures
  • clipmidtex
  • optimize-storewallrange
  • increase-maxconditionsets
  • acs
  • softcode-info
  • lua-gfx-2
  • better-player-states
  • lua-debug-library
  • any-resolution
  • gametype-refactor-player-spawns
  • custom-teams
  • action-args
  • SRB2_release_2.2.13
  • SRB2_release_2.2.12
  • SRB2_release_2.2.11
  • SRB2_release_2.2.10
  • SRB2_release_2.2.9
  • SRB2_release_2.2.8
  • SRB2_release_2.2.7
  • SRB2_release_2.2.6
  • SRB2_release_2.2.5
  • SRB2_release_2.2.4
  • SRB2_release_2.2.3
  • SRB2_release_2.2.2
  • SRB2_release_2.2.1
  • SRB2_release_2.2.0
  • SRB2_release_2.1.25
  • SRB2_release_2.1.24
  • SRB2_release_2.1.23
  • SRB2_release_2.1.22
  • SRB2_release_2.1.21
  • SRB2_release_2.1.20
41 results

lua_consolelib.c

Blame
  • Forked from STJr / SRB2
    Source project has a limited visibility.
    GitUtilities.cmake NaN GiB
    # Git utilities
    
    if(__GitUtilities)
    	return()
    endif()
    
    set(__GitUtilities ON)
    
    macro(_git_command)
    	execute_process(
    		COMMAND "${GIT_EXECUTABLE}" ${ARGN}
    		WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
    		OUTPUT_VARIABLE output
    		ERROR_QUIET
    		OUTPUT_STRIP_TRAILING_WHITESPACE
    	)
    endmacro()
    
    macro(_git_easy_command)
    	_git_command(${ARGN})
    	set(${variable} "${output}" PARENT_SCOPE)
    endmacro()
    
    function(git_current_branch variable)
    	_git_command(symbolic-ref -q --short HEAD)
    
    	# If a detached head, a ref could still be resolved.
    	if("${output}" STREQUAL "")
    		_git_command(describe --all --exact-match)
    
    		# Get the ref, in the form heads/master or
    		# remotes/origin/master so isolate the final part.
    		string(REGEX REPLACE ".*/" "" output "${output}")
    	endif()
    
    	set(${variable} "${output}" PARENT_SCOPE)
    endfunction()
    
    function(git_latest_commit variable)
    	_git_easy_command(rev-parse --short HEAD)
    endfunction()
    
    function(git_working_tree_dirty variable)
    	_git_command(status --porcelain -uno)
    
    	if(output STREQUAL "")
    		set(${variable} FALSE PARENT_SCOPE)
    	else()
    		set(${variable} TRUE PARENT_SCOPE)
    	endif()
    endfunction()
    
    function(git_subject variable)
    	_git_easy_command(log -1 --format=%s)
    endfunction()
    
    function(get_git_dir variable)
    	_git_easy_command(rev-parse --git-dir)
    endfunction()