Skip to content

Commit

Permalink
Merge branch 'maint'
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
Junio C Hamano committed May 23, 2008
2 parents dd0ffd5 + 77599cc commit e13067a
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 11 deletions.
7 changes: 5 additions & 2 deletions Documentation/git-repack.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,11 @@ OPTIONS
linkgit:git-pack-objects[1].

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

--window=[N], --depth=[N]::
These two options affect how the objects contained in the pack are
Expand Down
2 changes: 0 additions & 2 deletions Documentation/git-show.txt
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,6 @@ Documentation
-------------
Documentation by David Greaves, Petr Baudis and the git-list <git@vger.kernel.org>.

This manual page is a stub. You can help the git documentation by expanding it.

GIT
---
Part of the linkgit:git[7] suite
2 changes: 1 addition & 1 deletion Documentation/rev-list-options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ include::pretty-options.txt[]

Synonym for `--date=relative`.

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

Only takes effect for dates shown in human-readable format, such
as when using "--pretty". `log.date` config variable sets a default
Expand Down
18 changes: 12 additions & 6 deletions builtin-rev-parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,21 @@ static void show(const char *arg)
puts(arg);
}

/* Like show(), but with a negation prefix according to type */
static void show_with_type(int type, const char *arg)
{
if (type != show_type)
putchar('^');
show(arg);
}

/* Output a revision, only if filter allows it */
static void show_rev(int type, const unsigned char *sha1, const char *name)
{
if (!(filter & DO_REVS))
return;
def = NULL;

if (type != show_type)
putchar('^');
if (symbolic && name) {
if (symbolic == SHOW_SYMBOLIC_FULL) {
unsigned char discard[20];
Expand All @@ -119,20 +125,20 @@ static void show_rev(int type, const unsigned char *sha1, const char *name)
*/
break;
case 1: /* happy */
show(full);
show_with_type(type, full);
break;
default: /* ambiguous */
error("refname '%s' is ambiguous", name);
break;
}
} else {
show(name);
show_with_type(type, name);
}
}
else if (abbrev)
show(find_unique_abbrev(sha1, abbrev));
show_with_type(type, find_unique_abbrev(sha1, abbrev));
else
show(sha1_to_hex(sha1));
show_with_type(type, sha1_to_hex(sha1));
}

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

0 comments on commit e13067a

Please sign in to comment.