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

[PATCH v2 11/17] contrib: remove 'workdir'

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
May 9, 2014, 19:11 UTC
Message-ID
<1399662703-355-12-git-send-email-felipe.contreras@gmail.com>
In-Reply-To
<1399662703-355-1-git-send-email-felipe.contreras@gmail.com>
No activity since 2010, no documentation, no tests.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 contrib/workdir/git-new-workdir | 82 -----------------------------------------
 1 file changed, 82 deletions(-)
 delete mode 100755 contrib/workdir/git-new-workdir
diff --git a/contrib/workdir/git-new-workdir b/contrib/workdir/git-new-workdir
deleted file mode 100755
index 75e8b25..0000000
--- a/contrib/workdir/git-new-workdir
+++ /dev/null
@@ -1,82 +0,0 @@
-#!/bin/sh
-
-usage () {
-	echo "usage:" $@
-	exit 127
-}
-
-die () {
-	echo $@
-	exit 128
-}
-
-if test $# -lt 2 || test $# -gt 3
-then
-	usage "$0 <repository> <new_workdir> [<branch>]"
-fi
-
-orig_git=$1
-new_workdir=$2
-branch=$3
-
-# want to make sure that what is pointed to has a .git directory ...
-git_dir=$(cd "$orig_git" 2>/dev/null &&
-  git rev-parse --git-dir 2>/dev/null) ||
-  die "Not a git repository: \"$orig_git\""
-
-case "$git_dir" in
-.git)
-	git_dir="$orig_git/.git"
-	;;
-.)
-	git_dir=$orig_git
-	;;
-esac
-
-# don't link to a configured bare repository
-isbare=$(git --git-dir="$git_dir" config --bool --get core.bare)
-if test ztrue = z$isbare
-then
-	die "\"$git_dir\" has core.bare set to true," \
-		" remove from \"$git_dir/config\" to use $0"
-fi
-
-# don't link to a workdir
-if test -h "$git_dir/config"
-then
-	die "\"$orig_git\" is a working directory only, please specify" \
-		"a complete repository."
-fi
-
-# don't recreate a workdir over an existing repository
-if test -e "$new_workdir"
-then
-	die "destination directory '$new_workdir' already exists."
-fi
-
-# make sure the links use full paths
-git_dir=$(cd "$git_dir"; pwd)
-
-# create the workdir
-mkdir -p "$new_workdir/.git" || die "unable to create \"$new_workdir\"!"
-
-# create the links to the original repo.  explicitly exclude index, HEAD and
-# logs/HEAD from the list since they are purely related to the current working
-# directory, and should not be shared.
-for x in config refs logs/refs objects info hooks packed-refs remotes rr-cache svn
-do
-	case $x in
-	*/*)
-		mkdir -p "$(dirname "$new_workdir/.git/$x")"
-		;;
-	esac
-	ln -s "$git_dir/$x" "$new_workdir/.git/$x"
-done
-
-# now setup the workdir
-cd "$new_workdir"
-# copy the HEAD from the original repository as a default branch
-cp "$git_dir/HEAD" .git/HEAD
-# checkout the branch (either the same as HEAD from the original repository, or
-# the one that was asked for)
-git checkout -f $branch
-- 
1.9.2+fc1.28.g12374c0
Previous: Felipe ContrerasNext: Felipe Contreras
Message 36 of 42 in “contrib: cleanup”
  1. 00/17 contrib: cleanupFelipe Contreras, May 9, 2014
  2. 01/17 contrib: remove outdated READMEFelipe Contreras, May 9, 2014
  3. Junio C HamanoMay 9, 2014
  4. Felipe ContrerasMay 9, 2014
  5. Martin LanghoffMay 13, 2014
  6. Junio C HamanoMay 13, 2014
  7. Felipe ContrerasMay 13, 2014
  8. Junio C HamanoMay 13, 2014
  9. Martin LanghoffMay 13, 2014
  10. Felipe ContrerasMay 13, 2014
  11. Philippe VaucherMay 14, 2014
  12. Felipe ContrerasMay 14, 2014
  13. Martin LanghoffMay 14, 2014
  14. Jeff KingMay 14, 2014
  15. Felipe ContrerasMay 14, 2014
  16. Junio C HamanoMay 14, 2014
  17. Felipe ContrerasMay 14, 2014
  18. Martin LanghoffMay 14, 2014
  19. Felipe ContrerasMay 14, 2014
  20. Junio C HamanoMay 15, 2014
  21. Felipe ContrerasMay 16, 2014
  22. William GiokasMay 16, 2014
  23. Felipe ContrerasMay 16, 2014
  24. William GiokasMay 16, 2014
  25. Felipe ContrerasMay 16, 2014
  26. Felipe ContrerasMay 13, 2014
  27. 02/17 contrib: remove 'vim'Felipe Contreras, May 9, 2014
  28. 03/17 contrib: remove 'emacs'Felipe Contreras, May 9, 2014
  29. 04/17 contrib: remove 'diffall'Felipe Contreras, May 9, 2014
  30. Tim HeniganMay 9, 2014
  31. 05/17 contrib: remove 'hg-to-git'Felipe Contreras, May 9, 2014
  32. 07/17 contrib: remove 'stats'Felipe Contreras, May 9, 2014
  33. 08/17 contrib: remove 'convert-objects'Felipe Contreras, May 9, 2014
  34. 09/17 contrib: remove 'git-shell-commands'Felipe Contreras, May 9, 2014
  35. 10/17 contrib: reomve 'thunderbird-patch-inline'Felipe Contreras, May 9, 2014
  36. 11/17 contrib: remove 'workdir'Felipe Contreras, May 9, 2014
  37. 12/17 contrib: remove 'svn-fe'Felipe Contreras, May 9, 2014
  38. 13/17 contrib: remove 'rerere-train'Felipe Contreras, May 9, 2014
  39. 14/17 contrib: remove 'remotes2config'Felipe Contreras, May 9, 2014
  40. 15/17 contrib: remove 'persistent-https'Felipe Contreras, May 9, 2014
  41. 16/17 contrib: remove 'git-resurrect'Felipe Contreras, May 9, 2014
  42. 17/17 contrib: remove 'contacts'Felipe Contreras, May 9, 2014

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.