xaizek / vifm (License: GPLv2+) (since 2018-12-07)
Vifm is a file manager with curses interface, which provides Vi[m]-like environment for managing objects within file systems, extended with some useful ideas from mutt.
<root> / src / update-compile-info (f81c566c869c3a2a4ef837f03358e5bdfd97c90f) (579B) (mode 100755) [raw]
#!/bin/sh

if [ $# -gt 1 ]; then
    echo "`basename "$0"`: [git]"
    exit 1
fi

in_repo="$1"

if [ -r compile_info.c ]; then
    old="`cat compile_info.c`"
fi

if [ -n "$in_repo" ]; then
    # This is set for scripts running from git hooks, but it breaks the command
    # below.
    unset GIT_DIR

    info="`git describe --tags --long --always --abbrev=12 --dirty`"
else
    info='built out of repository'
fi
new="const char GIT_INFO[] = \"$info\";"

if [ "$old" != "$new" -o ! -f compile_info.c ]; then
    echo "Updating build revision"
    echo "$new" > compile_info.c
fi
Hints

Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/vifm

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/vifm

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master