Français ▾ Topics ▾ Latest version ▾ git-sh-setup last updated in 2.43.0

NOM

git-sh-setup - Le code d’initialisation commun aux scripts shell Git

SYNOPSIS

. "$(git --exec-path)/git-sh-setup"

DESCRIPTION

Ce n’est pas une commande que l’utilisateur final voudrait exécuter. Jamais. Cette documentation est destinée aux personnes qui étudient les scripts porcelaine et/ou en écrivent de nouveaux.

Le script git sh-setup est conçu pour être sourcé (en utilisant .) par d’autres scripts shell pour configurer quelques variables pointant sur les répertoires Git normaux et quelques fonctions auxiliaires de shell.

Before sourcing it, your script should set up a few variables; USAGE (and LONG_USAGE, if any) is used to define the message given by usage() shell function. SUBDIRECTORY_OK can be set if the script can run from a subdirectory of the working tree (some commands do not).

Le scriptlet définit les variables shell GIT_DIR et GIT_OBJECT_DIRECTORY, mais ne les exporte pas dans l’environnement.

FONCTIONS

die

sortir après l’émission du message d’erreur fourni au flux d’erreur standard.

usage

mourir avec le message d’utilisation.

set_reflog_action

Set GIT_REFLOG_ACTION environment to a given string (typically the name of the program) unless it is already set. Whenever the script runs a git command that updates refs, a reflog entry is created using the value of this string to leave the record of what command updated the ref.

git_editor

exécute un éditeur du choix de l’utilisateur (GIT_EDITOR, core.editor, VISUAL ou EDITOR) sur un fichier donné, mais sort en erreur si aucun éditeur n’est spécifié et que le terminal est simple.

is_bare_repository

affiche true ou false vers le flux de sortie standard pour indiquer si le dépôt est un dépôt nu (c.-à-d. sans arbre de travail associé).

cd_to_toplevel

se placer dans le répertoire à la racine de l’arbre de travail.

require_work_tree

vérifie si le répertoire actuel se trouve dans l’arbre de travail du dépôt et meurt sinon.

require_work_tree_exists

checks if the working tree associated with the repository exists, and otherwise dies. Often done before calling cd_to_toplevel, which is impossible to do if there is no working tree.

require_clean_work_tree <action> [<indice>]

checks that the working tree and index associated with the repository have no uncommitted changes to tracked files. Otherwise it emits an error message of the form Cannot <action>: <reason>. <hint>, and dies. Example:

require_clean_work_tree rebase "S'il vous plaît, validez-les ou remisez-les."
get_author_ident_from_commit

sort avec un code pour utilisation avec eval pour définir les variables GIT_AUTHOR_NAME, GIT_AUTHOR_EMAIL et GIT_AUTHOR_DATE pour un commit donné.

create_virtual_base

modifies the first file so only lines in common with the second file remain. If there is insufficient common material, then the first file is left empty. The result is suitable as a virtual base input for a 3-way merge.

GIT

Fait partie de la suite git[1]

TRADUCTION

Cette page de manuel a été traduite par Jean-Noël Avila <jn.avila AT free DOT fr> et les membres du projet git-manpages-l10n. Veuillez signaler toute erreur de traduction par un rapport de bogue sur le site https://github.com/jnavila/git-manpages-l10n .