summaryrefslogtreecommitdiff
path: root/contrib/subtree
AgeCommit message (Collapse)AuthorFilesLines
2015-01-06subtree: fix AsciiDoc list item continuationLibravatar Steffen Prohaska1-105/+89
List items must be continued with '+' (see [asciidoc]). [asciidoc] AsciiDoc user guide 17.7. List Item Continuation <http://www.methods.co.nz/asciidoc/userguide.html#X15> Signed-off-by: Steffen Prohaska <prohaska@zib.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-11-04Documentation: typofixesLibravatar Thomas Ackermann1-1/+1
In addition to fixing trivial and obvious typos, be careful about the following points: - Spell ASCII, URL and CRC in ALL CAPS; - Spell Linux as Capitalized; - Do not omit periods in "i.e." and "e.g.". Signed-off-by: Thomas Ackermann <th.acker@arcor.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-10-15subtree: add an install-html targetLibravatar Sebastian Schuberth2-3/+9
Also adjust ignore rules accordingly. Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-08-18subtree: make "all" default target of MakefileLibravatar Jeff King1-1/+4
You should be able to run "make" in contrib/subtree with no arguments and get the "all" target. This was broken by 8e2a5cc (contrib/subtree/Makefile: use GIT-VERSION-FILE, 2014-05-06), which put the rule for GIT-VERSION-FILE higher in the file. We can fix this by putting an empty "all::" target at the top of the file, just like our main Makefile does, and document that fact. That fixes this instance and future-proofs against it happening again. Reported-by: Jack Nagel <jacknagel@gmail.com> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-07-21Fix contrib/subtree Makefile to patch #! lineLibravatar Charles Bailey1-1/+7
Signed-off-by: Charles Bailey <cbailey32@bloomberg.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-06-06Merge branch 'ep/shell-assign-and-export-vars'Libravatar Junio C Hamano1-1/+2
* ep/shell-assign-and-export-vars: scripts: more "export VAR=VALUE" fixes scripts: "export VAR=VALUE" construct is not portable
2014-06-06Merge branch 'jd/subtree'Libravatar Junio C Hamano2-16/+25
* jd/subtree: contrib/subtree: allow adding an annotated tag contrib/subtree/Makefile: clean up rule for "clean" contrib/subtree/Makefile: clean up rules to generate documentation contrib/subtree/Makefile: s/libexecdir/gitexecdir/ contrib/subtree/Makefile: use GIT-VERSION-FILE contrib/subtree/Makefile: scrap unused $(gitdir)
2014-06-03Merge branch 'ep/shell-command-substitution'Libravatar Junio C Hamano1-1/+1
Adjust shell scripts to use $(cmd) instead of `cmd`. * ep/shell-command-substitution: (41 commits) t5000-tar-tree.sh: use the $( ... ) construct for command substitution t4204-patch-id.sh: use the $( ... ) construct for command substitution t4119-apply-config.sh: use the $( ... ) construct for command substitution t4116-apply-reverse.sh: use the $( ... ) construct for command substitution t4057-diff-combined-paths.sh: use the $( ... ) construct for command substitution t4038-diff-combined.sh: use the $( ... ) construct for command substitution t4036-format-patch-signer-mime.sh: use the $( ... ) construct for command substitution t4014-format-patch.sh: use the $( ... ) construct for command substitution t4013-diff-various.sh: use the $( ... ) construct for command substitution t4012-diff-binary.sh: use the $( ... ) construct for command substitution t4010-diff-pathspec.sh: use the $( ... ) construct for command substitution t4006-diff-mode.sh: use the $( ... ) construct for command substitution t3910-mac-os-precompose.sh: use the $( ... ) construct for command substitution t3905-stash-include-untracked.sh: use the $( ... ) construct for command substitution t1050-large.sh: use the $( ... ) construct for command substitution t1020-subdirectory.sh: use the $( ... ) construct for command substitution t1004-read-tree-m-u-wf.sh: use the $( ... ) construct for command substitution t1003-read-tree-prefix.sh: use the $( ... ) construct for command substitution t1002-read-tree-m-u-2way.sh: use the $( ... ) construct for command substitution t1001-read-tree-m-2way.sh: use the $( ... ) construct for command substitution ...
2014-05-23scripts: "export VAR=VALUE" construct is not portableLibravatar Elia Pinto1-1/+2
Found by check-non-portable-shell.pl Signed-off-by: Elia Pinto <gitter.spiros@gmail.com> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-05-13contrib/subtree: allow adding an annotated tagLibravatar James Denholm1-1/+2
cmd_add_commit() is passed FETCH_HEAD by cmd_add_repository, which is then rev-parsed into an object name. However, if the user is fetching a tag rather than a branch HEAD, such as by executing: $ git subtree add -P oldGit https://github.com/git/git.git tags/v1.8.0 the object name refers to a tag and is never peeled, and the git commit-tree call (line 561) slaps us in the face because it doesn't peel tags to commits. Because peeling a committish doesn't do anything if it's already a commit, fix by peeling the object name before assigning it to $rev using peel_committish() from git:git-sh-setup.sh, a pre-existing dependency of git-subtree. Reported-by: Kevin Cagle <kcagle@micron.com> Helped-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: James Denholm <nod.helm@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-05-06contrib/subtree/Makefile: clean up rule for "clean"Libravatar James Denholm1-3/+4
git:Documentation/Makefile and others establish "RM ?= rm -f" as a convention for rm calls in clean rules, hence follow this convention instead of simply forcing clean to use rm. subproj and mainline no longer need to be removed in clean, as they are no longer created in git:contrib/subtree by "make test". Hence, remove the rm call for those folders. Other makefiles don't remove "*~" files, remove the rm call to prevent unexpected behaviour in the future. Similarly, clean doesn't remove the installable file, so rectify this. Reviewed-by: Jeff King <peff@peff.net> Signed-off-by: James Denholm <nod.helm@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-05-06contrib/subtree/Makefile: clean up rules to generate documentationLibravatar James Denholm1-5/+8
git:Documentation/Makefile establishes asciidoc/xmlto calls as being handled through their appropriate variables, Hence, change to bring into congruency with. Similarly, MANPAGE_XSL exists in git:Documentation/Makefile, while MANPAGE_NORMAL_XSL does not outside contrib/subtree. Hence, replace MANPAGE_NORMAL_XSL with MANPAGE_XSL. Reviewed-by: Jeff King <peff@peff.net> Signed-off-by: James Denholm <nod.helm@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-05-06contrib/subtree/Makefile: s/libexecdir/gitexecdir/Libravatar James Denholm1-3/+3
$(libexecdir) isn't used anywhere else in the project, while $(gitexecdir) is the standard in the other appropriate makefiles. Hence, replace the former with the latter. Reviewed-by: Jeff King <peff@peff.net> Signed-off-by: James Denholm <nod.helm@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-05-06contrib/subtree/Makefile: use GIT-VERSION-FILELibravatar James Denholm1-3/+8
GVF is already being used in most/all other makefiles in the project, and has been for _quite_ a while. Hence, drop file-unique gitver and replace with GIT_VERSION. Reviewed-by: Jeff King <peff@peff.net> Signed-off-by: James Denholm <nod.helm@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-05-06contrib/subtree/Makefile: scrap unused $(gitdir)Libravatar James Denholm1-1/+0
In 7ff8463dba0d74fc07a766bed457ae7afcc902b5, the references to gitdir were removed but the assignment itself wasn't. Hence, drop the gitdir assignment. Reviewed-by: Jeff King <peff@peff.net> Signed-off-by: James Denholm <nod.helm@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-04-23t7900-subtree.sh: use the $( ... ) construct for command substitutionLibravatar Elia Pinto1-1/+1
The Git CodingGuidelines prefer the $(...) construct for command substitution instead of using the backquotes `...`. The backquoted form is the traditional method for command substitution, and is supported by POSIX. However, all but the simplest uses become complicated quickly. In particular, embedded command substitutions and/or the use of double quotes require careful escaping with the backslash character. The patch was generated by: for _f in $(find . -name "*.sh") do sed -i 's@`\(.*\)`@$(\1)@g' ${_f} done and then carefully proof-read. Signed-off-by: Elia Pinto <gitter.spiros@gmail.com> Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-03-17subtree: initialize "prefix" variableLibravatar Jeff King1-0/+1
We parse the "--prefix" command-line option into the "$prefix" shell variable. However, if we do not see such an option, the variable is left with whatever value it had in the environment. We should initialize it to a known value, like we do for other variables. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-01-13subtree: fix argument validation in add/pull/pushLibravatar Anthony Baire2-13/+23
When working with a remote repository add/pull/push do not accept a <refspec> as parameter but just a <ref>. They should accept any well-formatted ref name. This patch: - relaxes the check the <ref> argument in "git subtree add <repo>" (previous code would not accept a ref name that does not exist locally too, new code only ensures that the ref is well formatted) - add the same check in "git subtree pull/push" + check the number of parameters - update the doc to use <ref> instead of <refspec> Signed-off-by: Anthony Baire <Anthony.Baire@irisa.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-11-04Merge branch 'jk/subtree-install-fix'Libravatar Junio C Hamano1-1/+6
* jk/subtree-install-fix: subtree: add makefile target for html docs
2013-10-30subtree: add makefile target for html docsLibravatar Jeff King1-1/+6
The Makefile currently builds the roff manpage, but not the html form. As some people may prefer the latter, let's make it an option to build that, too. We also wire it into "make doc" so that it is built by default. This patch does not build or install it as part of "install-doc"; that would require extra infrastructure to handle installing the html as we do in git's regular Documentation/ tree. That can come later if somebody is interested. Tested-by: Sebastian Schuberth <sschuberth@gmail.com> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-08-01Merge branch 'ob/typofixes'Libravatar Junio C Hamano1-1/+1
* ob/typofixes: many small typofixes
2013-08-01Merge branch 'ms/subtree-install-fix'Libravatar Junio C Hamano1-0/+1
* ms/subtree-install-fix: contrib/subtree: Fix make install target
2013-08-01Merge branch 'lf/echo-n-is-not-portable'Libravatar Junio C Hamano2-5/+5
* lf/echo-n-is-not-portable: Avoid using `echo -n` anywhere
2013-07-30contrib/subtree: Fix make install targetLibravatar Michal Sojka1-0/+1
If the libexec directory doesn't exist, git-subtree gets installed as $prefix/share/libexec/git-core file. This patch creates the directory before installing git-subtree file into it. Signed-off-by: Michal Sojka <sojkam1@fel.cvut.cz> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-29many small typofixesLibravatar Ondřej Bílka1-1/+1
Signed-off-by: Ondřej Bílka <neleai@seznam.cz> Reviewed-by: Marc Branchaud <marcnarc@xiplink.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-29Avoid using `echo -n` anywhereLibravatar Lukas Fleischer2-5/+5
`echo -n` is non-portable. The POSIX specification says: Conforming applications that wish to do prompting without <newline> characters or that could possibly be expecting to echo a -n, should use the printf utility derived from the Ninth Edition system. Since all of the affected shell scripts use a POSIX shell shebang, replace `echo -n` invocations with printf. Signed-off-by: Lukas Fleischer <git@cryptocrack.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-06-05Merge branch 'dm/unbash-subtree'Libravatar Junio C Hamano1-1/+1
It turns out that git-subtree script does not have to be run with bash. * dm/unbash-subtree: contrib/git-subtree: Use /bin/sh interpreter instead of /bin/bash
2013-05-21contrib/git-subtree: Use /bin/sh interpreter instead of /bin/bashLibravatar Dmitry Marakasov1-1/+1
Use /bin/sh interpreter instead of /bin/bash for contrib/git-subtree: it's required for systems which don't use bash by default (for example, FreeBSD), while there seem to be no bashisms in the script (confirmed by looking through the source and tesing subtree functionality with FreeBSD's /bin/sh) to require specifically bash and not the generic posix shell. Signed-off-by: Dmitry Marakasov <amdmi3@amdmi3.ru> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-01contrib/subtree: don't delete remote branches if split failsLibravatar John Keeping1-1/+2
When using "git subtree push" to split out a subtree and push it to a remote repository, we do not detect if the split command fails which causes the LHS of the refspec to be empty, deleting the remote branch. Fix this by pulling the result of the split command into a variable so that we can die if the command fails. Reported-by: Steffen Jaeckel <steffen.jaeckel@stzedn.de> Signed-off-by: John Keeping <john@keeping.me.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-12contrib/subtree: fix spelling of accidentallyLibravatar Stefano Lattarini1-1/+1
Noticed with Lucas De Marchi's codespell tool. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Acked-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-14Merge branch 'dg/subtree-fixes'Libravatar Junio C Hamano4-66/+40
contrib/subtree updates, but here are only the ones that looked ready. The remainder of the patches will have another day. * dg/subtree-fixes: contrib/subtree: make the manual directory if needed contrib/subtree: honor DESTDIR contrib/subtree: fix synopsis contrib/subtree: better error handling for 'subtree add' contrib/subtree: use %B for split subject/body contrib/subtree: remove test number comments
2013-02-05contrib/subtree: make the manual directory if neededLibravatar Jesper L. Nielsen1-0/+1
Before install git-subtree documentation, make sure the manpage directory exists. Signed-off-by: Jesper L. Nielsen <lyager@gmail.com> Signed-off-by: David A. Greene <greened@obbligato.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-05contrib/subtree: honor DESTDIRLibravatar Adam Tkac1-2/+2
Teach git-subtree's Makefile to honor DESTDIR. Signed-off-by: Adam Tkac <atkac@redhat.com> Signed-off-by: David A. Greene <greened@obbligato.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-05contrib/subtree: fix synopsisLibravatar David A. Greene2-1/+8
Fix the documentation of add to show that a repository can be specified along with a commit. Suggested by Yann Dirson <dirson@bertin.fr>. Signed-off-by: David A. Greene <greened@obbligato.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-05contrib/subtree: better error handling for 'subtree add'Libravatar David A. Greene1-3/+9
Check refspecs for validity before passing them on to other commands. This lets us generate more helpful error messages. Signed-off-by: David A. Greene <greened@obbligato.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-05contrib/subtree: use %B for split subject/bodyLibravatar Techlive Zheng2-5/+20
Use %B to format the commit message and body to avoid an extra newline if a commit only has a subject line. Signed-off-by: Techlive Zheng <techlivezheng@gmail.com> Signed-off-by: David A. Greene <greened@obbligato.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-05contrib/subtree: remove test number commentsLibravatar David A. Greene1-55/+0
Delete the comments indicating test numbers as it causes maintenance headaches. t*.sh -i will help us find any broken tests and these numbers are not helping us anyway. Signed-off-by: David A. Greene <greened@obbligato.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-22git-subtree: fix typo in manpageLibravatar Michael Schubert1-1/+1
Signed-off-by: Michael Schubert <mschub@elegosoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-22git-subtree: ignore git-subtree executableLibravatar Michael Schubert1-0/+1
Signed-off-by: Michael Schubert <mschub@elegosoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-04-09Fix git-subtree install instructionsLibravatar David A. Greene1-12/+18
Update the install instructions to reflect the changes for an integrated git-subtree. Signed-off-by: David A. Greene <greened@obbligato.org>
2012-04-09Use git-subtree test MakefileLibravatar David A. Greene1-1/+1
Use the Makefile in contrib/subtree/t to run git-subtree tests. Signed-off-by: David A. Greene <greened@obbligato.org>
2012-04-09Add subtree test MakefileLibravatar David A. Greene1-0/+69
Add a Makefile to run subtree tests. This is largely copied from the standard test suite with irrelevant targets removed and some paths altered to account for where subtree tests live. Signed-off-by: David A. Greene <greened@obbligato.org>
2012-04-09Install git-subtree from contribLibravatar David A. Greene1-20/+21
Build git-subtree in its contrib directory and install from there. The main Makefile no longer discovers subcommands build in the main build area so we cannot count on it to install git-subtree. The user should make && make install in contrib/subtree to install git-subtree. Change the rule to install the git-subtree manpage. The main Documentation area doesn't directly support installing documentation from other directories so the user will have to do that from within contrib/subtree for now. Signed-off-by: David A. Greene <greened@obbligato.org>
2012-04-09Use configure settings for git-subtreeLibravatar David A. Greene1-0/+3
Include config.make.autogen in the git-subtree contrib area to pick up settings for prefix and other such things. Signed-off-by: David A. Greene <greened@obbligato.org>
2012-04-09Use project config filesLibravatar David A. Greene1-3/+6
Use project-wide files to process documentation for git-subtree. Signed-off-by: David A. Greene <greened@obbligato.org>
2012-04-09Remove unnecessary git-subtree filesLibravatar David A. Greene6-143/+0
Remove various files that simply duplicate functionality already provided by the main project files. Signed-off-by: David A. Greene <greened@obbligato.org>
2012-04-09Set TEST_DIRECTORYLibravatar David A. Greene1-2/+4
Set TEST_DIRECTORY to the main git test area. This allows the git-subtree out-of-tree tests to run correctly. Signed-off-by: David A. Greene <greened@obbligato.org>
2012-04-09Add 'contrib/subtree/' from commit 'd3a04e06c77d57978bb5230361c64946232cc346'Libravatar David A. Greene15-0/+2196
git-subtree-dir: contrib/subtree git-subtree-mainline: e8dde3e5f9ddb7cf95a6ff3cea6cf07c3a2db80d git-subtree-split: d3a04e06c77d57978bb5230361c64946232cc346