Git is a source control management system used across the world for storing and managing software repositories. It is a distributed source control system designed to allow multiple stands of changes to be made by different individuals and brought together. In addition to a large user base, git scales well between managing small and large projects. It is the defacto industry standard for modern software development.
The PyromaniacGit module provides an interface from within RISC OS to the Git source control management tool provided by the host system. By interfacing to the host system, it avoids needing to provide a native RISC OS implementation and provides many of the facilities that are expected by such a tool.
The Git source control system is used the world over, and many documents describe its usage far better than can be done justice here. However, a short overview of how the source control system can be used may help to illustrate a common case.
One of the most common operations with Git is to make changes to an existing repository. The workflow may differ depending on whether you are continuing making changes, where the repository lives, and your preferences, but in general the workflow will be something like this:
Within the Git management system there are many terms and phrases which are used to describe operations. The core Git documentation describes many of these in greater detail, and with greater accuracy, than here. However, it is useful to include some of the terms here as an introduction.
The Git implementation provided by RISC OS Pyromaniac is as faithful as it can be to the original unix version of the Git tool. There are differences and features which are not implemented - particularly those which are more advanced and are not required for day-to-day usage of sources.
The PyromaniacGit tool does not make assumptions or allowances for the version of Git which is installed on the host system. As such, your experience may differ if an earlier or later version of the host git tool is installed. Git commands such as 'git switch' only exist on later versions of the git tool, but they are provided nonetheless by the PyromaniacGit implementation. If a command is not supported by the host git, an error will be reported.
The tool applies certain restrictions and has some changes from the original, in order to match with the way in which RISC OS functions. To the average user these will not be noticed, but it is useful to be aware of where the behaviour is different.
Files used by the PyromaniacGit tool must live on the host
filesystem and be accessible to the host git tool. When a filename
is supplied to the
This has an effect on how the files are handled when it comes to filetypes. Filetypes are part of the filename in the host storage for RISC OS Pyromaniac, and as such the filename supplied on the command line will be expanded to include a filetype.
Certain commands such as
This may change in the future, but it is a current limitation.
Within Git on other systems, identifiers are expected to be supplied in UTF-8 format. However, RISC OS does not generally use UTF-8 for its input or output, and relies on a global configuration called the alphabet. PyromaniacGit will convert identifiers from the global alphabet to UTF-8 before passing these to the host git tool. This includes identifiers such as:
Messages supplied to the Git tool (for example, on commit) on the command line with the '-m' switch, or within files with the '--file' switch, will also be converted from the current alphabet to UTF-8 before being passed to the host tool.
All output from the tool is converted from UTF-8 to the current alphabet before being passed to the RISC OS VDU system.
This means that if you type
The original git system uses environment variables to configure some settings within the system. These variables are in the usual POSIX form of capital letters, separated by underscores. This is not the RISC OS way of doing things, so the variables used by the RISC OS clients are similar to those names, but use mixed case and separated by '$' between the common sections.
There are a lot of environment variables which can be set, not all of which make sense under RISC OS. The system variables are documented within this chapter. Many of the variables follow the same pattern, in the original system, which is replicated on RISC OS.
Information about the system variables can also be obtained through
the command
Output from the PyromaniacGit tool is expected to be at the command line by users. As such the tool is able to convert the colour control sequences (often called ANSI or VT control codes) into RISC OS text selection sequences. This means that the output you see within RISC OS will most closely resemble that which you would have seen in a non-RISC OS environment.
In particular this means that the output from
The configuration file, usually '.gitconfig' in your home directory, would be used to set up some configuration. This file is not available under PyromaniacGit as it introduces some significant security problems. This can be overridden in the configuration, but should not be necessary for most uses.
Some git configuration options have been made available as separate
PyromanigGit configuration options which can be specified through the
This includes the configuration of the credentials store, which keeps
track of the authentication details used for remote operations. This can
be set in RISC OS using the system variable
Usually the identification of the user is derived from the system's user name and host name, if it is not configured in the configuration file or environment variables. PyromaniacGit offers system variables which will provide these names, as there is no default on RISC OS Pyromaniac for a user name. The variable is set by default to dummy values from the RISC OS Pyromaniac configuration.
Authentication with a remote server is usually by entering user and
password details with a prompt. This is implemented within RISC OS
Pyromaniac by a callback to RISC OS to request the user name and
password details, and will by default be passed to the standard
Under the original git system, the credentials management would be
set in the configuration file. PyromaniacGit offers a single management
system based on the 'credential store'. The credential store places
the credentials in a file, which will be used first when authentication
is needed for a server. The credentials store is managed as a RISC OS
filename given by
When committing code, and for certain operations like 'rebase', it is necessary to supply a message or edit text. Under the original git system this launches the user's configured editor to perform this operation.
Under PyromaniacGit, the request to edit text in this way is passed to the 'TextEditor' system, as used by the Twin module for its editing. By default this is configured to use the host's 'nano' editor (which is common on POSIX systems, but might not be present under Windows). However, if the TextEditor is configured to use a different editor system, the Git system will use this as well. This means that, for example, when configued to use the 'wxwidgets' text editor, a UI window will be opened to edit the content.
The PyromaniacGit implementation does not support all the operations that can be performed by the standard git tool. However, most day to day operations are supported. This should allow both new and regular users of git to use the system as they would expect.
For more details, see
© Gerph, 2022.