From: Junio C Hamano Date: Sat, 24 Oct 2009 05:40:18 +0000 (-0700) Subject: Merge branch 'maint' X-Git-Tag: v1.6.6-rc0~106 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/02d56fab8b8c2e5137d12cbad0a7bd12c3d683ac?ds=inline;hp=-c Merge branch 'maint' * maint: Fix list of released versions in the toc document Do not fail "describe --always" in a tag-less repository --- 02d56fab8b8c2e5137d12cbad0a7bd12c3d683ac diff --combined Documentation/git.txt index df46a34371,8519928d45..10f2f82ca1 --- a/Documentation/git.txt +++ b/Documentation/git.txt @@@ -10,7 -10,7 +10,7 @@@ SYNOPSI -------- [verse] 'git' [--version] [--exec-path[=GIT_EXEC_PATH]] [--html-path] - [-p|--paginate|--no-pager] + [-p|--paginate|--no-pager] [--no-replace-objects] [--bare] [--git-dir=GIT_DIR] [--work-tree=GIT_WORK_TREE] [--help] COMMAND [ARGS] @@@ -43,7 -43,7 +43,7 @@@ unreleased) version of git, that is ava branch of the `git.git` repository. Documentation for older releases are available here: - * link:v1.6.5/git.html[documentation for release 1.6.5] + * link:v1.6.5.1/git.html[documentation for release 1.6.5.1] * release notes for link:RelNotes-1.6.5.1.txt[1.6.5.1], @@@ -238,10 -238,6 +238,10 @@@ help ...` environment is not set, it is set to the current working directory. +--no-replace-objects:: + Do not use replacement refs to replace git objects. See + linkgit:git-replace[1] for more information. + FURTHER DOCUMENTATION --------------------- diff --combined builtin-describe.c index 2dcfd3dfeb,7542b5705c..eaa8a9d229 --- a/builtin-describe.c +++ b/builtin-describe.c @@@ -180,6 -180,7 +180,6 @@@ static void describe(const char *arg, i unsigned char sha1[20]; struct commit *cmit, *gave_up_on = NULL; struct commit_list *list; - static int initialized = 0; struct commit_name *n; struct possible_tag all_matches[MAX_TAGS]; unsigned int match_cnt = 0, annotated_cnt = 0, cur_match; @@@ -191,6 -192,14 +191,6 @@@ if (!cmit) die("%s is not a valid '%s' object", arg, commit_type); - if (!initialized) { - initialized = 1; - for_each_ref(get_name, NULL); - } - - if (!found_names && !always) - die("cannot describe '%s'", sha1_to_hex(sha1)); - n = cmit->util; if (n) { /* @@@ -350,10 -359,6 +350,10 @@@ int cmd_describe(int argc, const char * return cmd_name_rev(i + argc, args, prefix); } + for_each_ref(get_name, NULL); - if (!found_names) ++ if (!found_names && !always) + die("No names found, cannot describe anything."); + if (argc == 0) { describe("HEAD", 1); } else {