aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-03-15 00:05:40 -0700
committerJunio C Hamano <gitster@pobox.com>2008-03-15 00:05:40 -0700
commit2a2ad0c0007b9f79768b4564644ac9eaaa7310b6 (patch)
tree1c0d7de9a2be2891718df0a5a443af4ff51208e4
parentfac4b328874ccf515a42e30173d0e008382ac276 (diff)
parenta0b54e7b73415f92225ddf29fe655399bafd4938 (diff)
downloadgit-2a2ad0c0007b9f79768b4564644ac9eaaa7310b6.tar.gz
git-2a2ad0c0007b9f79768b4564644ac9eaaa7310b6.tar.xz
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
-rw-r--r--Documentation/manpage-1.72.xsl6
-rwxr-xr-xcontrib/workdir/git-new-workdir2
-rwxr-xr-xgit-svn.perl3
-rw-r--r--sha1_name.c28
4 files changed, 23 insertions, 16 deletions
diff --git a/Documentation/manpage-1.72.xsl b/Documentation/manpage-1.72.xsl
index fe3cd72d6..4065a3a27 100644
--- a/Documentation/manpage-1.72.xsl
+++ b/Documentation/manpage-1.72.xsl
@@ -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('&#x2593;fB(',substring-after(@id,'-'),')&#x2593;fR')"/>
</xsl:template>
diff --git a/contrib/workdir/git-new-workdir b/contrib/workdir/git-new-workdir
index 2838546d1..7959eab90 100755
--- a/contrib/workdir/git-new-workdir
+++ b/contrib/workdir/git-new-workdir
@@ -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
*/*)
diff --git a/git-svn.perl b/git-svn.perl
index d8b38c9a4..bba22c132 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -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";
diff --git a/sha1_name.c b/sha1_name.c
index 8b6c76f68..491d2e7eb 100644
--- a/sha1_name.c
+++ b/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 (!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);
}