Skip to content

Commit 634392b

Browse files
committed
Add 'contrib/subtree/' from commit 'd3a04e06c77d57978bb5230361c64946232cc346'
git-subtree-dir: contrib/subtree git-subtree-mainline: e8dde3e git-subtree-split: d3a04e0
2 parents e8dde3e + d3a04e0 commit 634392b

15 files changed

+2196
-0
lines changed

contrib/subtree/.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
*~
2+
git-subtree.xml
3+
git-subtree.1
4+
mainline
5+
subproj

contrib/subtree/COPYING

Lines changed: 339 additions & 0 deletions
Large diffs are not rendered by default.

contrib/subtree/INSTALL

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
HOW TO INSTALL git-subtree
3+
==========================
4+
5+
You simply need to copy the file 'git-subtree.sh' to where
6+
the rest of the git scripts are stored.
7+
8+
From the Git bash window just run:
9+
10+
install.sh
11+
12+
Or if you have the full Cygwin installed, you can use make:
13+
14+
make install
15+
16+
That will make a 'git subtree' (note: space instead of dash) command
17+
available. See the file git-subtree.txt for more.
18+
19+
You can also install the man page by doing:
20+
21+
make doc
22+
cp git-subtree.1 /usr/share/man/man1/

contrib/subtree/Makefile

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
prefix ?= /usr/local
2+
mandir ?= $(prefix)/share/man
3+
gitdir ?= $(shell git --exec-path)
4+
5+
gitver ?= $(word 3,$(shell git --version))
6+
7+
# this should be set to a 'standard' bsd-type install program
8+
INSTALL ?= install
9+
INSTALL_DATA = $(INSTALL) -c -m 0644
10+
INSTALL_EXE = $(INSTALL) -c -m 0755
11+
INSTALL_DIR = $(INSTALL) -c -d -m 0755
12+
13+
default:
14+
@echo "git-subtree doesn't need to be built."
15+
@echo "Just copy it somewhere on your PATH, like /usr/local/bin."
16+
@echo
17+
@echo "Try: make doc"
18+
@echo " or: make test"
19+
@false
20+
21+
install: install-exe install-doc
22+
23+
install-exe: git-subtree.sh
24+
$(INSTALL_DIR) $(DESTDIR)/$(gitdir)
25+
$(INSTALL_EXE) $< $(DESTDIR)/$(gitdir)/git-subtree
26+
27+
install-doc: git-subtree.1
28+
$(INSTALL_DIR) $(DESTDIR)/$(mandir)/man1/
29+
$(INSTALL_DATA) $< $(DESTDIR)/$(mandir)/man1/
30+
31+
doc: git-subtree.1
32+
33+
%.1: %.xml
34+
xmlto -m manpage-normal.xsl man $^
35+
36+
%.xml: %.txt
37+
asciidoc -b docbook -d manpage -f asciidoc.conf \
38+
-agit_version=$(gitver) $^
39+
40+
test:
41+
./test.sh
42+
43+
clean:
44+
rm -f *~ *.xml *.html *.1
45+
rm -rf subproj mainline

contrib/subtree/README

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
2+
Please read git-subtree.txt for documentation.
3+
4+
Please don't contact me using github mail; it's slow, ugly, and worst of
5+
all, redundant. Email me instead at [email protected] and I'll be happy to
6+
help.
7+
8+
Avery

contrib/subtree/asciidoc.conf

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
## linkgit: macro
2+
#
3+
# Usage: linkgit:command[manpage-section]
4+
#
5+
# Note, {0} is the manpage section, while {target} is the command.
6+
#
7+
# Show GIT link as: <command>(<section>); if section is defined, else just show
8+
# the command.
9+
10+
[macros]
11+
(?su)[\\]?(?P<name>linkgit):(?P<target>\S*?)\[(?P<attrlist>.*?)\]=
12+
13+
[attributes]
14+
asterisk=&#42;
15+
plus=&#43;
16+
caret=&#94;
17+
startsb=&#91;
18+
endsb=&#93;
19+
tilde=&#126;
20+
21+
ifdef::backend-docbook[]
22+
[linkgit-inlinemacro]
23+
{0%{target}}
24+
{0#<citerefentry>}
25+
{0#<refentrytitle>{target}</refentrytitle><manvolnum>{0}</manvolnum>}
26+
{0#</citerefentry>}
27+
endif::backend-docbook[]
28+
29+
ifdef::backend-docbook[]
30+
ifndef::git-asciidoc-no-roff[]
31+
# "unbreak" docbook-xsl v1.68 for manpages. v1.69 works with or without this.
32+
# v1.72 breaks with this because it replaces dots not in roff requests.
33+
[listingblock]
34+
<example><title>{title}</title>
35+
<literallayout>
36+
ifdef::doctype-manpage[]
37+
&#10;.ft C&#10;
38+
endif::doctype-manpage[]
39+
|
40+
ifdef::doctype-manpage[]
41+
&#10;.ft&#10;
42+
endif::doctype-manpage[]
43+
</literallayout>
44+
{title#}</example>
45+
endif::git-asciidoc-no-roff[]
46+
47+
ifdef::git-asciidoc-no-roff[]
48+
ifdef::doctype-manpage[]
49+
# The following two small workarounds insert a simple paragraph after screen
50+
[listingblock]
51+
<example><title>{title}</title>
52+
<literallayout>
53+
|
54+
</literallayout><simpara></simpara>
55+
{title#}</example>
56+
57+
[verseblock]
58+
<formalpara{id? id="{id}"}><title>{title}</title><para>
59+
{title%}<literallayout{id? id="{id}"}>
60+
{title#}<literallayout>
61+
|
62+
</literallayout>
63+
{title#}</para></formalpara>
64+
{title%}<simpara></simpara>
65+
endif::doctype-manpage[]
66+
endif::git-asciidoc-no-roff[]
67+
endif::backend-docbook[]
68+
69+
ifdef::doctype-manpage[]
70+
ifdef::backend-docbook[]
71+
[header]
72+
template::[header-declarations]
73+
<refentry>
74+
<refmeta>
75+
<refentrytitle>{mantitle}</refentrytitle>
76+
<manvolnum>{manvolnum}</manvolnum>
77+
<refmiscinfo class="source">Git</refmiscinfo>
78+
<refmiscinfo class="version">{git_version}</refmiscinfo>
79+
<refmiscinfo class="manual">Git Manual</refmiscinfo>
80+
</refmeta>
81+
<refnamediv>
82+
<refname>{manname}</refname>
83+
<refpurpose>{manpurpose}</refpurpose>
84+
</refnamediv>
85+
endif::backend-docbook[]
86+
endif::doctype-manpage[]
87+
88+
ifdef::backend-xhtml11[]
89+
[linkgit-inlinemacro]
90+
<a href="{target}.html">{target}{0?({0})}</a>
91+
endif::backend-xhtml11[]

contrib/subtree/git-subtree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
git-subtree.sh

0 commit comments

Comments
 (0)