git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v4 2/5] git-remote-mediawiki: new git bin-wrapper for developement

From
Bbenoit.person@ensimag.fr <benoit.person@ensimag.fr>
Date
Jun 20, 2013, 07:16 UTC
Message-ID
<1371712593-6210-3-git-send-email-benoit.person@ensimag.fr>
In-Reply-To
<1371712593-6210-1-git-send-email-benoit.person@ensimag.fr>
From: Benoit Person <benoit.person@ensimag.fr>

The introduction of the Git::Mediawiki package makes it impossible to test, without installation, git-remote-mediawiki and git-mw.

Using a git bin-wrapper enables us to define proper $GITPERLLIB to force the use of the developement version of the Git::Mediawiki package, bypassing its installed version if any.

An alternate solution was to 'install' all the files required at each build but it pollutes the toplevel with untracked files.

Signed-off-by: Benoit Person <benoit.person@ensimag.fr>
Signed-off-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr>
---
 contrib/mw-to-git/git | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100755 contrib/mw-to-git/git
diff --git a/contrib/mw-to-git/git b/contrib/mw-to-git/git
new file mode 100755
index 0000000..25b60ad
--- /dev/null
+++ b/contrib/mw-to-git/git
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+# git executable wrapper script for Git-Mediawiki to run tests without
+# installing all the scripts and perl packages.
+
+# based on $GIT_ROOT_DIR/wrap-for-bin.sh
+
+
+GIT_ROOT_DIR=../..
+GIT_EXEC_PATH=$(cd "$(dirname "$0")" && cd ${GIT_ROOT_DIR} && pwd)
+
+if test -n "$NO_SET_GIT_TEMPLATE_DIR"
+then
+	unset GIT_TEMPLATE_DIR
+else
+	GIT_TEMPLATE_DIR="$GIT_EXEC_PATH"'/templates/blt'
+	export GIT_TEMPLATE_DIR
+fi
+# Hack to make the `use lib` call works with multiple paths
+GITPERLLIB="$GIT_EXEC_PATH"'/contrib/mw-to-git:'"$GIT_EXEC_PATH"'/perl/blib/lib'
+GIT_TEXTDOMAINDIR="$GIT_EXEC_PATH"'/po/build/locale'
+PATH="$GIT_EXEC_PATH"'/contrib/mw-to-git:'"$GIT_EXEC_PATH"'/bin-wrappers:'"$PATH"
+export GIT_EXEC_PATH GITPERLLIB PATH GIT_TEXTDOMAINDIR
+
+exec "${GIT_EXEC_PATH}/git" "$@"
\ No newline at end of file
-- 
1.8.3.GIT
Previous: Matthieu MoyNext: Matthieu Moy
Message 4 of 12 in “git-remote-mediawiki: new tool to preview local changes without pushing”
  1. 0/5 git-remote-mediawiki: new tool to preview local changes without pushingbenoit.person@ensimag.fr, Jun 20, 2013
  2. 1/5 git-remote-mediawiki: Introduction of Git::Mediawiki.pmbenoit.person@ensimag.fr, Jun 20, 2013
  3. Matthieu MoyJun 20, 2013
  4. 2/5 git-remote-mediawiki: new git bin-wrapper for developementbenoit.person@ensimag.fr, Jun 20, 2013
  5. Matthieu MoyJun 20, 2013
  6. 3/5 git-remote-mediawiki: factoring code between git-remote-mediawiki and Git::Mediawikibenoit.person@ensimag.fr, Jun 20, 2013
  7. 4/5 git-remote-mediawiki: Adding git-mw commandbenoit.person@ensimag.fr, Jun 20, 2013
  8. 5/5 git-remote-mediawiki: Add preview subcommand into git mw.benoit.person@ensimag.fr, Jun 20, 2013
  9. Matthieu MoyJun 20, 2013
  10. Matthieu MoyJun 20, 2013
  11. Matthieu MoyJun 20, 2013
  12. Benoît PersonJun 20, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.