summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/repo-hooks.md11
1 files changed, 8 insertions, 3 deletions
diff --git a/docs/repo-hooks.md b/docs/repo-hooks.md
index c8eb945f..76113cc9 100644
--- a/docs/repo-hooks.md
+++ b/docs/repo-hooks.md
@@ -61,9 +61,14 @@ not be too verbose. A short summary is nice, and some status information when
61long running operations occur, but long/verbose output should be used only if 61long running operations occur, but long/verbose output should be used only if
62the hook ultimately fails. 62the hook ultimately fails.
63 63
64The hook runs from the top level of the git repo where the operation is started. 64The hook runs from the top level of the repo client where the operation is
65e.g. If you're in the git repo `src/foo/`, that is where the hook runs, even if 65started.
66the `repo` command was started from a subdir like `src/foo/bar/`. 66For example, if the repo client is under `~/tree/`, then that is where the hook
67runs, even if you ran repo in a git repository at `~/tree/src/foo/`, or in a
68subdirectory of that git repository in `~/tree/src/foo/bar/`.
69Hooks frequently start off by doing a `os.chdir` to the specific project they're
70called on (see below) and then changing back to the original dir when they're
71finished.
67 72
68Python's `sys.path` is modified so that the top of repohooks directory comes 73Python's `sys.path` is modified so that the top of repohooks directory comes
69first. This should help simplify the hook logic to easily allow importing of 74first. This should help simplify the hook logic to easily allow importing of