Skip to content

Commit e13067a

Browse files
committed
Merge branch 'maint'
* maint: rev-parse --symbolic-full-name: don't print '^' if SHA1 is not a ref Add missing "short" alternative to --date in rev-list-options.txt git-show.txt: Not very stubby these days. Clarify repack -n documentation
2 parents dd0ffd5 + 77599cc commit e13067a

File tree

4 files changed

+18
-11
lines changed

4 files changed

+18
-11
lines changed

Documentation/git-repack.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,11 @@ OPTIONS
5555
linkgit:git-pack-objects[1].
5656

5757
-n::
58-
Do not update the server information with
59-
`git update-server-info`.
58+
Do not update the server information with
59+
`git update-server-info`. This option skips
60+
updating local catalog files needed to publish
61+
this repository (or a direct copy of it)
62+
over HTTP or FTP. See gitlink:git-update-server-info[1].
6063

6164
--window=[N], --depth=[N]::
6265
These two options affect how the objects contained in the pack are

Documentation/git-show.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,6 @@ Documentation
7979
-------------
8080
Documentation by David Greaves, Petr Baudis and the git-list <git@vger.kernel.org>.
8181

82-
This manual page is a stub. You can help the git documentation by expanding it.
83-
8482
GIT
8583
---
8684
Part of the linkgit:git[7] suite

Documentation/rev-list-options.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ include::pretty-options.txt[]
1313

1414
Synonym for `--date=relative`.
1515

16-
--date={relative,local,default,iso,rfc}::
16+
--date={relative,local,default,iso,rfc,short}::
1717

1818
Only takes effect for dates shown in human-readable format, such
1919
as when using "--pretty". `log.date` config variable sets a default

builtin-rev-parse.c

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,15 +94,21 @@ static void show(const char *arg)
9494
puts(arg);
9595
}
9696

97+
/* Like show(), but with a negation prefix according to type */
98+
static void show_with_type(int type, const char *arg)
99+
{
100+
if (type != show_type)
101+
putchar('^');
102+
show(arg);
103+
}
104+
97105
/* Output a revision, only if filter allows it */
98106
static void show_rev(int type, const unsigned char *sha1, const char *name)
99107
{
100108
if (!(filter & DO_REVS))
101109
return;
102110
def = NULL;
103111

104-
if (type != show_type)
105-
putchar('^');
106112
if (symbolic && name) {
107113
if (symbolic == SHOW_SYMBOLIC_FULL) {
108114
unsigned char discard[20];
@@ -119,20 +125,20 @@ static void show_rev(int type, const unsigned char *sha1, const char *name)
119125
*/
120126
break;
121127
case 1: /* happy */
122-
show(full);
128+
show_with_type(type, full);
123129
break;
124130
default: /* ambiguous */
125131
error("refname '%s' is ambiguous", name);
126132
break;
127133
}
128134
} else {
129-
show(name);
135+
show_with_type(type, name);
130136
}
131137
}
132138
else if (abbrev)
133-
show(find_unique_abbrev(sha1, abbrev));
139+
show_with_type(type, find_unique_abbrev(sha1, abbrev));
134140
else
135-
show(sha1_to_hex(sha1));
141+
show_with_type(type, sha1_to_hex(sha1));
136142
}
137143

138144
/* Output a flag, only if filter allows it. */

0 commit comments

Comments
 (0)