Skip to content

Commit

Permalink
Add 'contrib/subtree/' from commit 'd3a04e06c77d57978bb5230361c649462…
Browse files Browse the repository at this point in the history
…32cc346'

git-subtree-dir: contrib/subtree
git-subtree-mainline: e8dde3e
git-subtree-split: d3a04e0
  • Loading branch information
greened committed Apr 10, 2012
2 parents e8dde3e + d3a04e0 commit 634392b
Show file tree
Hide file tree
Showing 15 changed files with 2,196 additions and 0 deletions.
5 changes: 5 additions & 0 deletions contrib/subtree/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*~
git-subtree.xml
git-subtree.1
mainline
subproj
339 changes: 339 additions & 0 deletions contrib/subtree/COPYING

Large diffs are not rendered by default.

22 changes: 22 additions & 0 deletions contrib/subtree/INSTALL
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

HOW TO INSTALL git-subtree
==========================

You simply need to copy the file 'git-subtree.sh' to where
the rest of the git scripts are stored.

From the Git bash window just run:

install.sh

Or if you have the full Cygwin installed, you can use make:

make install

That will make a 'git subtree' (note: space instead of dash) command
available. See the file git-subtree.txt for more.

You can also install the man page by doing:

make doc
cp git-subtree.1 /usr/share/man/man1/
45 changes: 45 additions & 0 deletions contrib/subtree/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
prefix ?= /usr/local
mandir ?= $(prefix)/share/man
gitdir ?= $(shell git --exec-path)

gitver ?= $(word 3,$(shell git --version))

# this should be set to a 'standard' bsd-type install program
INSTALL ?= install
INSTALL_DATA = $(INSTALL) -c -m 0644
INSTALL_EXE = $(INSTALL) -c -m 0755
INSTALL_DIR = $(INSTALL) -c -d -m 0755

default:
@echo "git-subtree doesn't need to be built."
@echo "Just copy it somewhere on your PATH, like /usr/local/bin."
@echo
@echo "Try: make doc"
@echo " or: make test"
@false

install: install-exe install-doc

install-exe: git-subtree.sh
$(INSTALL_DIR) $(DESTDIR)/$(gitdir)
$(INSTALL_EXE) $< $(DESTDIR)/$(gitdir)/git-subtree

install-doc: git-subtree.1
$(INSTALL_DIR) $(DESTDIR)/$(mandir)/man1/
$(INSTALL_DATA) $< $(DESTDIR)/$(mandir)/man1/

doc: git-subtree.1

%.1: %.xml
xmlto -m manpage-normal.xsl man $^

%.xml: %.txt
asciidoc -b docbook -d manpage -f asciidoc.conf \
-agit_version=$(gitver) $^

test:
./test.sh

clean:
rm -f *~ *.xml *.html *.1
rm -rf subproj mainline
8 changes: 8 additions & 0 deletions contrib/subtree/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

Please read git-subtree.txt for documentation.

Please don't contact me using github mail; it's slow, ugly, and worst of
all, redundant. Email me instead at apenwarr@gmail.com and I'll be happy to
help.

Avery
91 changes: 91 additions & 0 deletions contrib/subtree/asciidoc.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
## linkgit: macro
#
# Usage: linkgit:command[manpage-section]
#
# Note, {0} is the manpage section, while {target} is the command.
#
# Show GIT link as: <command>(<section>); if section is defined, else just show
# the command.

[macros]
(?su)[\\]?(?P<name>linkgit):(?P<target>\S*?)\[(?P<attrlist>.*?)\]=

[attributes]
asterisk=&#42;
plus=&#43;
caret=&#94;
startsb=&#91;
endsb=&#93;
tilde=&#126;

ifdef::backend-docbook[]
[linkgit-inlinemacro]
{0%{target}}
{0#<citerefentry>}
{0#<refentrytitle>{target}</refentrytitle><manvolnum>{0}</manvolnum>}
{0#</citerefentry>}
endif::backend-docbook[]

ifdef::backend-docbook[]
ifndef::git-asciidoc-no-roff[]
# "unbreak" docbook-xsl v1.68 for manpages. v1.69 works with or without this.
# v1.72 breaks with this because it replaces dots not in roff requests.
[listingblock]
<example><title>{title}</title>
<literallayout>
ifdef::doctype-manpage[]
&#10;.ft C&#10;
endif::doctype-manpage[]
|
ifdef::doctype-manpage[]
&#10;.ft&#10;
endif::doctype-manpage[]
</literallayout>
{title#}</example>
endif::git-asciidoc-no-roff[]

ifdef::git-asciidoc-no-roff[]
ifdef::doctype-manpage[]
# The following two small workarounds insert a simple paragraph after screen
[listingblock]
<example><title>{title}</title>
<literallayout>
|
</literallayout><simpara></simpara>
{title#}</example>

[verseblock]
<formalpara{id? id="{id}"}><title>{title}</title><para>
{title%}<literallayout{id? id="{id}"}>
{title#}<literallayout>
|
</literallayout>
{title#}</para></formalpara>
{title%}<simpara></simpara>
endif::doctype-manpage[]
endif::git-asciidoc-no-roff[]
endif::backend-docbook[]

ifdef::doctype-manpage[]
ifdef::backend-docbook[]
[header]
template::[header-declarations]
<refentry>
<refmeta>
<refentrytitle>{mantitle}</refentrytitle>
<manvolnum>{manvolnum}</manvolnum>
<refmiscinfo class="source">Git</refmiscinfo>
<refmiscinfo class="version">{git_version}</refmiscinfo>
<refmiscinfo class="manual">Git Manual</refmiscinfo>
</refmeta>
<refnamediv>
<refname>{manname}</refname>
<refpurpose>{manpurpose}</refpurpose>
</refnamediv>
endif::backend-docbook[]
endif::doctype-manpage[]

ifdef::backend-xhtml11[]
[linkgit-inlinemacro]
<a href="{target}.html">{target}{0?({0})}</a>
endif::backend-xhtml11[]
1 change: 1 addition & 0 deletions contrib/subtree/git-subtree
Loading

0 comments on commit 634392b

Please sign in to comment.