From 769093aa22ab6102dc8f86fa6cb923618e3a5950 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Fri, 4 Jan 2008 18:32:25 +0100 Subject: replace git-foo with git foo from the release notes of the upcoming 1.5.4 release: "The next feature release of git (this change is scheduled for v1.6.0) will by default install dashed form of commands (e.g. "git-commit") outside of users' normal $PATH" --- README | 12 ++++++------ init.d/40git-init | 2 +- init.d/70git-add | 4 ++-- post-install.d/30git-add | 4 ++-- pre-install.d/50uncommitted-changes | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/README b/README index c4887c5..6dbffeb 100644 --- a/README +++ b/README @@ -66,7 +66,7 @@ A quick walkthrough of using etckeeper. The `etckeeper init` command initialises an /etc/.git/ repository. This command is careful to never overwrite existing files or directories in /etc. It will create a `.gitignore` if one doesn't already exist, sets up git hooks if they don't already exist, -and so on. It does *not* commit any files into to git, but does `git-add` all +and so on. It does *not* commit any files into to git, but does `git add` all interesting files for an initial commit. etckeeper init @@ -106,7 +106,7 @@ make sure you run "etckeeper init" again, to get any metadata changes: etckeeper init Often it's better to clone /etc to elsewhere and do potentially dangerous -stuff in a staging directory. You can clone the repository using git-clone, +stuff in a staging directory. You can clone the repository using git clone, but be careful that the directory it's cloned into starts out mode 700, to prevent anyone else from seeing files like shadow, before `etckeeper init` fixes their permissions: @@ -120,7 +120,7 @@ fixes their permissions: chmod 755 .. Another common reason to clone the repository is to make a backup to a -server. When using git-push to create a new remote clone, make sure the new +server. When using git push to create a new remote clone, make sure the new remote clone is mode 700! (And, obviously, only push over a secure transport like ssh, and only to a server you trust.) @@ -144,13 +144,13 @@ For example, here's how to configure it to run `git gc` after each apt run, which will save a lot of disk space: cd /etc/etckeeper/post-install.d - (echo '#!/bin/sh' ; echo 'exec git-gc') > 99git-gc + (echo '#!/bin/sh' ; echo 'exec git gc') > 99git-gc chmod +x 99git-gc git add . - git-commit -m "run git-gc after each apt run" + git commit -m "run git gc after each apt run" Here's how to disable the automatic commits after each apt run, while still -letting it git-add new files and git-rm removed ones: +letting it git add new files and git rm removed ones: chmod -x /etc/etckeeper/post-install.d/75git-commit diff --git a/init.d/40git-init b/init.d/40git-init index 69867c4..1554166 100755 --- a/init.d/40git-init +++ b/init.d/40git-init @@ -1,6 +1,6 @@ #!/bin/sh set -e if [ ! -e .git ]; then - git-init + git init echo "$(hostname) /etc repository" > .git/description fi diff --git a/init.d/70git-add b/init.d/70git-add index 06504b4..1e2680c 100755 --- a/init.d/70git-add +++ b/init.d/70git-add @@ -1,5 +1,5 @@ #!/bin/sh set -e -if ! git-add .; then - echo "etckeeper warning: git-add failed" >&2 +if ! git add .; then + echo "etckeeper warning: git add failed" >&2 fi diff --git a/post-install.d/30git-add b/post-install.d/30git-add index 79aa406..33858a7 100755 --- a/post-install.d/30git-add +++ b/post-install.d/30git-add @@ -1,7 +1,7 @@ #!/bin/sh set -e if [ -d .git ]; then - if ! git-add .; then - echo "etckeeper warning: git-add failed" >&2 + if ! git add .; then + echo "etckeeper warning: git add failed" >&2 fi fi diff --git a/pre-install.d/50uncommitted-changes b/pre-install.d/50uncommitted-changes index dd798e7..1af33d4 100755 --- a/pre-install.d/50uncommitted-changes +++ b/pre-install.d/50uncommitted-changes @@ -9,7 +9,7 @@ if [ -d .git ] && ! LANG=C git-status 2>&1 | grep -q "working directory clean"; db_title etckeeper db_reset etckeeper/unclean || true - db_subst etckeeper/unclean STATUS $(git-status | debconf-escape -e) || true + db_subst etckeeper/unclean STATUS $(git status | debconf-escape -e) || true db_input critical etckeeper/unclean || true db_go || true db_get etckeeper/unclean -- cgit v1.2.3