summaryrefslogtreecommitdiff
path: root/contrib/subtree/git-subtree.sh
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'lf/echo-n-is-not-portable'Junio C Hamano2013-08-011-1/+1
|\ | | | | | | | | * lf/echo-n-is-not-portable: Avoid using `echo -n` anywhere
| * Avoid using `echo -n` anywherelf/echo-n-is-not-portableLukas Fleischer2013-07-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | `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>
* | Merge branch 'dm/unbash-subtree'Junio C Hamano2013-06-051-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
| * | contrib/git-subtree: Use /bin/sh interpreter instead of /bin/bashDmitry Marakasov2013-05-211-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>
* | contrib/subtree: don't delete remote branches if split failsJohn Keeping2013-05-011-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>
* contrib/subtree: fix synopsisDavid A. Greene2013-02-051-0/+6
| | | | | | | | | | 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>
* contrib/subtree: better error handling for 'subtree add'David A. Greene2013-02-051-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>
* contrib/subtree: use %B for split subject/bodyTechlive Zheng2013-02-051-1/+1
| | | | | | | | | 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>
* Add 'contrib/subtree/' from commit 'd3a04e06c77d57978bb5230361c64946232cc346'David A. Greene2012-04-091-0/+712
git-subtree-dir: contrib/subtree git-subtree-mainline: e8dde3e5f9ddb7cf95a6ff3cea6cf07c3a2db80d git-subtree-split: d3a04e06c77d57978bb5230361c64946232cc346