Merge branch 'maint'
* maint: Make man page building quiet when DOCBOOK_XSL_172 is defined git-new-workdir: Share SVN meta data between work dirs and the repository rev-parse: fix meaning of rev~ vs rev~0. git-svn: don't blindly append '*' to branch/tags config
This commit is contained in:
commit
2a2ad0c000
@ -1,5 +1,9 @@
|
||||
<!-- callout.xsl: converts asciidoc callouts to man page format -->
|
||||
<!-- Based on callouts.xsl. Fixes man page callouts for DocBook 1.72 XSL -->
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
||||
|
||||
<xsl:param name="man.output.quietly" select="1"/>
|
||||
<xsl:param name="refentry.meta.get.quietly" select="1"/>
|
||||
|
||||
<xsl:template match="co">
|
||||
<xsl:value-of select="concat('▓fB(',substring-after(@id,'-'),')▓fR')"/>
|
||||
</xsl:template>
|
||||
|
@ -63,7 +63,7 @@ mkdir -p "$new_workdir/.git" || die "unable to create \"$new_workdir\"!"
|
||||
# create the links to the original repo. explictly 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
|
||||
for x in config refs logs/refs objects info hooks packed-refs remotes rr-cache svn
|
||||
do
|
||||
case $x in
|
||||
*/*)
|
||||
|
@ -958,9 +958,10 @@ sub complete_url_ls_init {
|
||||
"wanted to set to: $gs->{url}\n";
|
||||
}
|
||||
command_oneline('config', $k, $gs->{url}) unless $orig_url;
|
||||
my $remote_path = "$ra->{svn_path}/$repo_path/*";
|
||||
my $remote_path = "$ra->{svn_path}/$repo_path";
|
||||
$remote_path =~ s#/+#/#g;
|
||||
$remote_path =~ s#^/##g;
|
||||
$remote_path .= "/*" if $remote_path !~ /\*/;
|
||||
my ($n) = ($switch =~ /^--(\w+)/);
|
||||
if (length $pfx && $pfx !~ m#/$#) {
|
||||
die "--prefix='$pfx' must have a trailing slash '/'\n";
|
||||
|
24
sha1_name.c
24
sha1_name.c
@ -407,18 +407,22 @@ static int get_nth_ancestor(const char *name, int len,
|
||||
unsigned char *result, int generation)
|
||||
{
|
||||
unsigned char sha1[20];
|
||||
int ret = get_sha1_1(name, len, sha1);
|
||||
struct commit *commit;
|
||||
int ret;
|
||||
|
||||
ret = get_sha1_1(name, len, sha1);
|
||||
if (ret)
|
||||
return ret;
|
||||
commit = lookup_commit_reference(sha1);
|
||||
if (!commit)
|
||||
return -1;
|
||||
|
||||
while (generation--) {
|
||||
struct commit *commit = lookup_commit_reference(sha1);
|
||||
|
||||
if (!commit || parse_commit(commit) || !commit->parents)
|
||||
if (parse_commit(commit) || !commit->parents)
|
||||
return -1;
|
||||
hashcpy(sha1, commit->parents->item->object.sha1);
|
||||
commit = commit->parents->item;
|
||||
}
|
||||
hashcpy(result, sha1);
|
||||
hashcpy(result, commit->object.sha1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -544,9 +548,8 @@ static int get_sha1_1(const char *name, int len, unsigned char *sha1)
|
||||
int ret, has_suffix;
|
||||
const char *cp;
|
||||
|
||||
/* "name~3" is "name^^^",
|
||||
* "name~" and "name~0" are name -- not "name^0"!
|
||||
* "name^" is not "name^0"; it is "name^1".
|
||||
/*
|
||||
* "name~3" is "name^^^", "name~" is "name~1", and "name^" is "name^1".
|
||||
*/
|
||||
has_suffix = 0;
|
||||
for (cp = name + len - 1; name <= cp; cp--) {
|
||||
@ -564,11 +567,10 @@ static int get_sha1_1(const char *name, int len, unsigned char *sha1)
|
||||
cp++;
|
||||
while (cp < name + len)
|
||||
num = num * 10 + *cp++ - '0';
|
||||
if (has_suffix == '^') {
|
||||
if (!num && len1 == len - 1)
|
||||
num = 1;
|
||||
if (has_suffix == '^')
|
||||
return get_parent(name, len1, sha1, num);
|
||||
}
|
||||
/* else if (has_suffix == '~') -- goes without saying */
|
||||
return get_nth_ancestor(name, len1, sha1, num);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user