Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 0 additions & 42 deletions .devcontainer/post-create.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,48 +43,6 @@ p.write_text(
PY
fi

# Expose repo scripts that follow the git-<subcommand> naming convention as
# proper git subcommands by symlinking them into /usr/local/bin. This makes
# `git ai-commit` work in any directory without requiring scripts/ on PATH.
ln -sf /workspaces/phlex/scripts/git-ai-commit /usr/local/bin/git-ai-commit

# Adjust MANPATH to enable `git help ai-commit` to find the man page.
# The scripts/man/man1 directory contains git-subcommand man pages.
# Prepend the repo man directory and ensure the resulting MANPATH always has
# an empty field (which tells man to search the system default paths). When
# there is no pre-existing MANPATH, or the existing one lacks an empty field,
# a trailing colon is appended to provide one; if an empty field already
# exists it is preserved as-is.
cat >> /root/.bashrc <<'EOF'

prepend_to_manpath() {
# Prepends one or more paths to MANPATH, preserving the position of any
# existing empty field (which tells man(1) where to insert the system
# default paths). Handles unset, empty, or degenerate MANPATH safely.
# If MANPATH has no empty field, a trailing : is added (system paths last).
local prefix
prefix=$(IFS=:; echo "$*")
# Unset or degenerate (only colons): start fresh, system defaults last.
if [[ -z ${MANPATH+set} || -z "${MANPATH//:}" ]]; then
export MANPATH="${prefix}:"
return
fi
case "$MANPATH" in
*::*|*:|:*)
# Already has an empty field somewhere; prepend and keep it in place.
# :foo -> newpath::foo (leading : becomes embedded :: after prepend)
# foo: -> newpath:foo: (trailing : stays trailing)
# f::b -> newpath:f::b (embedded :: stays embedded)
export MANPATH="${prefix}:${MANPATH}" ;;
*)
# No empty field: add trailing : so system paths are still searched.
export MANPATH="${prefix}:${MANPATH}:" ;;
esac
}

prepend_to_manpath "/workspaces/phlex/scripts/man"
EOF

# Install pre-commit hooks if available.
if command -v prek >/dev/null 2>&1; then
prek install || true
Expand Down
149 changes: 0 additions & 149 deletions docs/dev/git-ai-commit-context/git-ai-commit-context-optimization.json

This file was deleted.

Loading
Loading