From ae5d5b09cf606ac36291b0ee5b6092f7fed2f262 Mon Sep 17 00:00:00 2001 From: Chris Darroch Date: Mon, 2 Mar 2020 16:46:18 -0800 Subject: [PATCH] docs: add post-commit hook man page Add a man page for git-lfs-post-commit(1) which largely parallels the git-lfs-post-merge(1) one, as they have similar purposes for Git LFS, namely, to ensure all tracked lockable files are marked read-only in the working copy. --- Makefile | 2 ++ docs/man/git-lfs-post-commit.1.ronn | 23 +++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 docs/man/git-lfs-post-commit.1.ronn diff --git a/Makefile b/Makefile index 27f9a03b14..9fe4b82dde 100644 --- a/Makefile +++ b/Makefile @@ -469,6 +469,7 @@ MAN_ROFF_TARGETS = man/git-lfs-checkout.1 \ man/git-lfs-migrate.1 \ man/git-lfs-pointer.1 \ man/git-lfs-post-checkout.1 \ + man/git-lfs-post-commit.1 \ man/git-lfs-post-merge.1 \ man/git-lfs-pre-push.1 \ man/git-lfs-prune.1 \ @@ -501,6 +502,7 @@ MAN_HTML_TARGETS = man/git-lfs-checkout.1.html \ man/git-lfs-migrate.1.html \ man/git-lfs-pointer.1.html \ man/git-lfs-post-checkout.1.html \ + man/git-lfs-post-commit.1.html \ man/git-lfs-post-merge.1.html \ man/git-lfs-pre-push.1.html \ man/git-lfs-prune.1.html \ diff --git a/docs/man/git-lfs-post-commit.1.ronn b/docs/man/git-lfs-post-commit.1.ronn new file mode 100644 index 0000000000..5e75d76aaa --- /dev/null +++ b/docs/man/git-lfs-post-commit.1.ronn @@ -0,0 +1,23 @@ +git-lfs-post-commit(1) -- Git post-commit hook implementation +================================================================= + +## SYNOPSIS + +`git lfs post-commit` + +## DESCRIPTION + +Responds to Git post-commit events. It makes sure that any files which are +marked as lockable by `git lfs track` are read-only in the working copy, if +not currently locked by the local user. + +Where the `git lfs post-merge` command, which has a similar purpose, must +examine all files in the working copy, `git lfs post-commit` can limit +itself checking only those files which have changed in `HEAD`. It primarily +handles newly added lockable files which have not yet been made read-only. + +## SEE ALSO + +git-lfs-post-merge(1), git-lfs-track(1) + +Part of the git-lfs(1) suite.