Permalink
Browse files

Merge branch 'maint'

* maint:
  Start 1.6.0.2 maintenance cycle
  tests: use "git xyzzy" form (t7200 - t9001)
  tests: use "git xyzzy" form (t7000 - t7199)
  Fix passwd(5) ref and reflect that commit doens't use commit-tree
  improve handling of sideband message display
  tests: use "git xyzzy" form (t3600 - t6999)
  tests: use "git xyzzy" form (t0000 - t3599)
  checkout: fix message when leaving detached HEAD
  clone: fix creation of explicitly named target directory
  'git foo' program identifies itself without dash in die() messages
  setup_git_directory(): fix move to worktree toplevel directory
  update-index: fix worktree setup
  Start conforming code to "git subcmd" style
  read-tree: setup worktree if merge is required
  grep: fix worktree setup
  diff*: fix worktree setup

Conflicts:
	RelNotes
	t/t3900-i18n-commit.sh
	t/t7003-filter-branch.sh
  • Loading branch information...
2 parents 0191457 + de5d560 commit 9b8ae93ad92efef59649a3a7c4bed162d2051059 @gitster gitster committed Sep 3, 2008
Showing with 794 additions and 620 deletions.
  1. +50 −0 Documentation/RelNotes-1.6.0.2.txt
  2. +2 −2 Documentation/git-commit-tree.txt
  3. +3 −3 Documentation/git-var.txt
  4. +1 −1 Documentation/i18n.txt
  5. +4 −4 builtin-apply.c
  6. +4 −4 builtin-archive.c
  7. +1 −1 builtin-blame.c
  8. +2 −2 builtin-bundle.c
  9. +2 −2 builtin-cat-file.c
  10. +1 −1 builtin-check-ref-format.c
  11. +3 −3 builtin-checkout-index.c
  12. +4 −6 builtin-checkout.c
  13. +14 −3 builtin-clone.c
  14. +1 −1 builtin-commit-tree.c
  15. +2 −0 builtin-diff-index.c
  16. +3 −0 builtin-diff.c
  17. +1 −1 builtin-fetch-pack.c
  18. +5 −2 builtin-grep.c
  19. +3 −3 builtin-ls-files.c
  20. +2 −0 builtin-read-tree.c
  21. +2 −2 builtin-rm.c
  22. +3 −3 builtin-show-ref.c
  23. +2 −2 builtin-tar-tree.c
  24. +13 −8 builtin-update-index.c
  25. +2 −2 connect.c
  26. +10 −10 entry.c
  27. +1 −1 git.c
  28. +3 −3 merge-index.c
  29. +2 −0 setup.c
  30. +43 −23 sideband.c
  31. +1 −1 t/t0050-filesystem.sh
  32. +1 −1 t/t1007-hash-object.sh
  33. +1 −1 t/t1200-tutorial.sh
  34. +1 −1 t/t1303-wacky-config.sh
  35. +5 −5 t/t1400-update-ref.sh
  36. +62 −2 t/t1501-worktree.sh
  37. +1 −1 t/t1503-rev-parse-verify.sh
  38. +2 −2 t/t2005-checkout-index-symlinks.sh
  39. +2 −2 t/t2050-git-dir-relative.sh
  40. +1 −1 t/t2101-update-index-reupdate.sh
  41. +1 −1 t/t2102-update-index-symlinks.sh
  42. +6 −6 t/t2200-add-update.sh
  43. +1 −1 t/t3001-ls-files-others-exclude.sh
  44. +1 −1 t/t3020-ls-files-error-unmatch.sh
  45. +7 −7 t/t3030-merge-recursive.sh
  46. +29 −29 t/t3200-branch.sh
  47. +2 −2 t/t3210-pack-refs.sh
  48. +3 −3 t/t3400-rebase.sh
  49. +11 −11 t/t3401-rebase-partial.sh
  50. +1 −1 t/t3403-rebase-skip.sh
  51. +1 −1 t/t3404-rebase-interactive.sh
  52. +1 −1 t/t3407-rebase-abort.sh
  53. +6 −6 t/t3500-cherry.sh
  54. +2 −2 t/t3600-rm.sh
  55. +6 −6 t/t3800-mktag.sh
  56. +3 −3 t/t3900-i18n-commit.sh
  57. +8 −8 t/t3901-i18n-patch.sh
  58. +1 −1 t/t3903-stash.sh
  59. +2 −2 t/t4012-diff-binary.sh
  60. +13 −13 t/t4103-apply-binary.sh
  61. +1 −1 t/t4124-apply-ws-rule.sh
  62. +2 −2 t/t4127-apply-same-fn.sh
  63. +1 −1 t/t4150-am.sh
  64. +2 −2 t/t4151-am-abort.sh
  65. +8 −8 t/t5300-pack-object.sh
  66. +2 −2 t/t5301-sliding-window.sh
  67. +6 −6 t/t5302-pack-index.sh
  68. +1 −1 t/t5305-include-tag.sh
  69. +15 −15 t/t5400-send-pack.sh
  70. +2 −2 t/t5401-update-hooks.sh
  71. +2 −2 t/t5402-post-merge-hook.sh
  72. +2 −2 t/t5403-post-checkout-hook.sh
  73. +2 −2 t/t5500-fetch-pack.sh
  74. +1 −1 t/t5510-fetch.sh
  75. +2 −2 t/t5530-upload-pack-error.sh
  76. +6 −6 t/t5600-clone-fail-cleanup.sh
  77. +18 −0 t/t5601-clone.sh
  78. +2 −2 t/t5602-clone-remote-exec.sh
  79. +3 −3 t/t6006-rev-list-format.sh
  80. +16 −16 t/t6025-merge-symlinks.sh
  81. +6 −6 t/t6026-merge-attr.sh
  82. +2 −2 t/t6030-bisect-porcelain.sh
  83. +15 −15 t/t6120-describe.sh
  84. +14 −14 t/t6300-for-each-ref.sh
  85. +6 −6 t/t7001-mv.sh
  86. +11 −11 t/t7003-filter-branch.sh
  87. +159 −159 t/t7004-tag.sh
  88. +4 −4 t/t7101-reset.sh
  89. +2 −2 t/t7102-reset.sh
  90. +1 −1 t/t7103-reset-bare.sh
  91. +1 −1 t/t7201-co.sh
  92. +36 −36 t/t7300-clean.sh
  93. +24 −24 t/t7400-submodule-basic.sh
  94. +1 −1 t/t7401-submodule-summary.sh
  95. +1 −1 t/t7500-commit.sh
  96. +24 −24 t/t7501-commit.sh
  97. +1 −1 t/t7502-status.sh
  98. +1 −1 t/t7505-prepare-commit-msg-hook.sh
  99. +1 −1 t/t7506-status-submodule.sh
  100. +1 −1 t/t7600-merge.sh
  101. +1 −1 t/t7601-merge-pull-config.sh
  102. +1 −1 t/t7602-merge-octopus-many.sh
  103. +1 −1 t/t7603-merge-reduce-heads.sh
  104. +1 −1 t/t7604-merge-custom-message.sh
  105. +1 −1 t/t7605-merge-resolve.sh
  106. +1 −1 t/t7610-mergetool.sh
  107. +1 −1 t/t7701-repack-unpack-unreachable.sh
  108. +1 −1 t/t9001-send-email.sh
  109. +1 −1 tree-diff.c
  110. +9 −9 upload-pack.c
@@ -0,0 +1,50 @@
+GIT v1.6.0.2 Release Notes
+==========================
+
+Fixes since v1.6.0.1
+--------------------
+
+* Installation on platforms that needs .exe suffix to git-* programs were
+ broken in 1.6.0.1.
+
+* Installation on filesystems without symbolic links support did nto
+ work well.
+
+* In-tree documentations and test scripts now use "git foo" form to set a
+ better example, instead of the "git-foo" form (which is an acceptable
+ form if you have "PATH=$(git --exec-path):$PATH" in your script)
+
+* Many commands did not use the correct working tree location when used
+ with GIT_WORK_TREE environment settings.
+
+
+
+* "git apply --unidiff-zero" incorrectly applied a -U0 patch that inserts
+ a new line before the second line.
+
+* "git clone $there $here/" with extra trailing slashes after explicit
+ local directory name $here did not work as expected.
+
+* "git diff --dirstat -M" did not add changes in subdirectories up
+ correctly for renamed paths.
+
+* "git for-each-ref refs/heads/" did not work as expected.
+
+* "git log --grep=pattern -i" did not ignore case.
+
+* "git log --pretty="%ad" --date=short" did not use short format when
+ showing the timestamp.
+
+* Build procedure for "git shell" that used stub versions of some
+ functions and globals was not understood by linkers on some platforms.
+
+* "git verify-pack -v" did not work correctly when given more than one
+ packfile.
+
+Also contains many documentation updates.
+
+--
+exec >/var/tmp/1
+O=v1.6.0.1-49-g6a42cfe
+echo O=$(git describe maint)
+git shortlog --no-merges $O..maint
@@ -79,9 +79,9 @@ Diagnostics
You don't exist. Go away!::
The passwd(5) gecos field couldn't be read
Your parents must have hated you!::
- The password(5) gecos field is longer than a giant static buffer.
+ The passwd(5) gecos field is longer than a giant static buffer.
Your sysadmin must hate you!::
- The password(5) name field is longer than a giant static buffer.
+ The passwd(5) name field is longer than a giant static buffer.
Discussion
----------
@@ -20,7 +20,7 @@ OPTIONS
Cause the logical variables to be listed. In addition, all the
variables of the git configuration file .git/config are listed
as well. (However, the configuration variables listing functionality
- is deprecated in favor of 'git-config -l'.)
+ is deprecated in favor of 'git config -l'.)
EXAMPLE
--------
@@ -41,9 +41,9 @@ Diagnostics
You don't exist. Go away!::
The passwd(5) gecos field couldn't be read
Your parents must have hated you!::
- The password(5) gecos field is longer than a giant static buffer.
+ The passwd(5) gecos field is longer than a giant static buffer.
Your sysadmin must hate you!::
- The password(5) name field is longer than a giant static buffer.
+ The passwd(5) name field is longer than a giant static buffer.
SEE ALSO
--------
@@ -21,7 +21,7 @@ project find it more convenient to use legacy encodings, git
does not forbid it. However, there are a few things to keep in
mind.
-. 'git-commit-tree' (hence, 'git-commit' which uses it) issues
+. 'git-commit' and 'git-commit-tree' issues
a warning if the commit log message given to it does not look
like a valid UTF-8 string, unless you explicitly say your
project uses a legacy encoding. The way to say this is to
View
@@ -274,7 +274,7 @@ static void say_patch_name(FILE *output, const char *pre,
static void read_patch_file(struct strbuf *sb, int fd)
{
if (strbuf_read(sb, fd, 0) < 0)
- die("git-apply: read returned %s", strerror(errno));
+ die("git apply: read returned %s", strerror(errno));
/*
* Make sure that we have some slop in the buffer
@@ -506,17 +506,17 @@ static char *gitdiff_verify_name(const char *line, int isnull, char *orig_name,
name = orig_name;
len = strlen(name);
if (isnull)
- die("git-apply: bad git-diff - expected /dev/null, got %s on line %d", name, linenr);
+ die("git apply: bad git-diff - expected /dev/null, got %s on line %d", name, linenr);
another = find_name(line, NULL, p_value, TERM_TAB);
if (!another || memcmp(another, name, len))
- die("git-apply: bad git-diff - inconsistent %s filename on line %d", oldnew, linenr);
+ die("git apply: bad git-diff - inconsistent %s filename on line %d", oldnew, linenr);
free(another);
return orig_name;
}
else {
/* expect "/dev/null" */
if (memcmp("/dev/null", line, 9) || line[9] != '\n')
- die("git-apply: bad git-diff - expected /dev/null on line %d", linenr);
+ die("git apply: bad git-diff - expected /dev/null on line %d", linenr);
return NULL;
}
}
View
@@ -47,18 +47,18 @@ static int run_remote_archiver(const char *remote, int argc,
len = packet_read_line(fd[0], buf, sizeof(buf));
if (!len)
- die("git-archive: expected ACK/NAK, got EOF");
+ die("git archive: expected ACK/NAK, got EOF");
if (buf[len-1] == '\n')
buf[--len] = 0;
if (strcmp(buf, "ACK")) {
if (len > 5 && !prefixcmp(buf, "NACK "))
- die("git-archive: NACK %s", buf + 5);
- die("git-archive: protocol error");
+ die("git archive: NACK %s", buf + 5);
+ die("git archive: protocol error");
}
len = packet_read_line(fd[0], buf, sizeof(buf));
if (len)
- die("git-archive: expected a flush");
+ die("git archive: expected a flush");
/* Now, start reading from fd[0] and spit it out to stdout */
rv = recv_sideband("archive", fd[0], 1, 2);
View
@@ -1787,7 +1787,7 @@ static int prepare_lines(struct scoreboard *sb)
/*
* Add phony grafts for use with -S; this is primarily to
- * support git-cvsserver that wants to give a linear history
+ * support git's cvsserver that wants to give a linear history
* to its clients.
*/
static int read_ancestry(const char *graft_file)
View
@@ -6,10 +6,10 @@
* Basic handler for bundle files to connect repositories via sneakernet.
* Invocation must include action.
* This function can create a bundle or provide information on an existing
- * bundle supporting git-fetch, git-pull, and git-ls-remote
+ * bundle supporting "fetch", "pull", and "ls-remote".
*/
-static const char *bundle_usage="git-bundle (create <bundle> <git-rev-list args> | verify <bundle> | list-heads <bundle> [refname]... | unbundle <bundle> [refname]... )";
+static const char *bundle_usage="git bundle (create <bundle> <git rev-list args> | verify <bundle> | list-heads <bundle> [refname]... | unbundle <bundle> [refname]... )";
int cmd_bundle(int argc, const char **argv, const char *prefix)
{
View
@@ -137,11 +137,11 @@ static int cat_one_file(int opt, const char *exp_type, const char *obj_name)
break;
default:
- die("git-cat-file: unknown option: %s\n", exp_type);
+ die("git cat-file: unknown option: %s\n", exp_type);
}
if (!buf)
- die("git-cat-file %s: bad file", obj_name);
+ die("git cat-file %s: bad file", obj_name);
write_or_die(1, buf, size);
return 0;
@@ -9,6 +9,6 @@
int cmd_check_ref_format(int argc, const char **argv, const char *prefix)
{
if (argc != 2)
- usage("git-check-ref-format refname");
+ usage("git check-ref-format refname");
return !!check_ref_format(argv[1]);
}
@@ -258,9 +258,9 @@ int cmd_checkout_index(int argc, const char **argv, const char *prefix)
const char *p;
if (all)
- die("git-checkout-index: don't mix '--all' and explicit filenames");
+ die("git checkout-index: don't mix '--all' and explicit filenames");
if (read_from_stdin)
- die("git-checkout-index: don't mix '--stdin' and explicit filenames");
+ die("git checkout-index: don't mix '--stdin' and explicit filenames");
p = prefix_path(prefix, prefix_length, arg);
checkout_file(p, prefix_length);
if (p < arg || p > arg + strlen(arg))
@@ -271,7 +271,7 @@ int cmd_checkout_index(int argc, const char **argv, const char *prefix)
struct strbuf buf, nbuf;
if (all)
- die("git-checkout-index: don't mix '--all' and '--stdin'");
+ die("git checkout-index: don't mix '--all' and '--stdin'");
strbuf_init(&buf, 0);
strbuf_init(&nbuf, 0);
View
@@ -386,13 +386,11 @@ static int switch_branches(struct checkout_opts *opts, struct branch_info *new)
}
/*
- * If the new thing isn't a branch and isn't HEAD and we're
- * not starting a new branch, and we want messages, and we
- * weren't on a branch, and we're moving to a new commit,
- * describe the old commit.
+ * If we were on a detached HEAD, but we are now moving to
+ * a new commit, we want to mention the old commit once more
+ * to remind the user that it might be lost.
*/
- if (!new->path && strcmp(new->name, "HEAD") && !opts->new_branch &&
- !opts->quiet && !old.path && new->commit != old.commit)
+ if (!opts->quiet && !old.path && new->commit != old.commit)
describe_detached_head("Previous HEAD position was", old.commit);
if (!old.commit) {
View
@@ -147,6 +147,15 @@ static int is_directory(const char *path)
return !stat(path, &buf) && S_ISDIR(buf.st_mode);
}
+static void strip_trailing_slashes(char *dir)
+{
+ char *end = dir + strlen(dir);
+
+ while (dir < end - 1 && is_dir_sep(end[-1]))
+ end--;
+ *end = '\0';
+}
+
static void setup_reference(const char *repo)
{
const char *ref_git;
@@ -397,6 +406,7 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
dir = xstrdup(argv[1]);
else
dir = guess_dir_name(repo_name, is_bundle, option_bare);
+ strip_trailing_slashes(dir);
if (!stat(dir, &buf))
die("destination directory '%s' already exists.", dir);
@@ -422,10 +432,11 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
if (!option_bare) {
junk_work_tree = work_tree;
if (safe_create_leading_directories_const(work_tree) < 0)
- die("could not create leading directories of '%s'",
- work_tree);
+ die("could not create leading directories of '%s': %s",
+ work_tree, strerror(errno));
if (mkdir(work_tree, 0755))
- die("could not create work tree dir '%s'.", work_tree);
+ die("could not create work tree dir '%s': %s.",
+ work_tree, strerror(errno));
set_git_work_tree(work_tree);
}
junk_git_dir = git_dir;
@@ -121,7 +121,7 @@ int cmd_commit_tree(int argc, const char **argv, const char *prefix)
}
if (strbuf_read(&buffer, 0, 0) < 0)
- die("git-commit-tree: read returned %s", strerror(errno));
+ die("git commit-tree: read returned %s", strerror(errno));
if (!commit_tree(buffer.buf, tree_sha1, parents, commit_sha1)) {
printf("%s\n", sha1_to_hex(commit_sha1));
@@ -39,6 +39,8 @@ int cmd_diff_index(int argc, const char **argv, const char *prefix)
if (rev.pending.nr != 1 ||
rev.max_count != -1 || rev.min_age != -1 || rev.max_age != -1)
usage(diff_cache_usage);
+ if (!cached)
+ setup_work_tree();
if (read_cache() < 0) {
perror("read_cache");
return -1;
View
@@ -122,6 +122,8 @@ static int builtin_diff_index(struct rev_info *revs,
usage(builtin_diff_usage);
argv++; argc--;
}
+ if (!cached)
+ setup_work_tree();
/*
* Make sure there is one revision (i.e. pending object),
* and there is no revision filtering parameters.
@@ -225,6 +227,7 @@ static int builtin_diff_files(struct rev_info *revs, int argc, const char **argv
(revs->diffopt.output_format & DIFF_FORMAT_PATCH))
revs->combine_merges = revs->dense_combined_merges = 1;
+ setup_work_tree();
if (read_cache() < 0) {
perror("read_cache");
return -1;
@@ -609,7 +609,7 @@ static struct ref *do_fetch_pack(int fd[2],
fprintf(stderr, "warning: no common commits\n");
if (get_pack(fd, pack_lockfile))
- die("git-fetch-pack: fetch failed.");
+ die("git fetch-pack: fetch failed.");
all_done:
return ref;
View
@@ -774,7 +774,7 @@ int cmd_grep(int argc, const char **argv, const char *prefix)
/* Make sure we do not get outside of paths */
for (i = 0; paths[i]; i++)
if (strncmp(prefix, paths[i], opt.prefix_length))
- die("git-grep: cannot generate relative filenames containing '..'");
+ die("git grep: cannot generate relative filenames containing '..'");
}
}
else if (prefix) {
@@ -783,8 +783,11 @@ int cmd_grep(int argc, const char **argv, const char *prefix)
paths[1] = NULL;
}
- if (!list.nr)
+ if (!list.nr) {
+ if (!cached)
+ setup_work_tree();
return !grep_cache(&opt, paths, cached);
+ }
if (cached)
die("both --cached and trees are given.");
View
@@ -78,7 +78,7 @@ static void show_dir_entry(const char *tag, struct dir_entry *ent)
int offset = prefix_offset;
if (len >= ent->len)
- die("git-ls-files: internal error - directory entry not superset of prefix");
+ die("git ls-files: internal error - directory entry not superset of prefix");
if (pathspec && !pathspec_match(pathspec, ps_matched, ent->name, len))
return;
@@ -183,7 +183,7 @@ static void show_ce_entry(const char *tag, struct cache_entry *ce)
int offset = prefix_offset;
if (len >= ce_namelen(ce))
- die("git-ls-files: internal error - cache entry not superset of prefix");
+ die("git ls-files: internal error - cache entry not superset of prefix");
if (pathspec && !pathspec_match(pathspec, ps_matched, ce->name, len))
return;
@@ -319,7 +319,7 @@ static const char *verify_pathspec(const char *prefix)
}
if (prefix_offset > max || memcmp(prev, prefix, prefix_offset))
- die("git-ls-files: cannot generate relative filenames containing '..'");
+ die("git ls-files: cannot generate relative filenames containing '..'");
prefix_len = max;
return max ? xmemdupz(prev, max) : NULL;
View
@@ -194,6 +194,8 @@ int cmd_read_tree(int argc, const char **argv, const char *unused_prefix)
usage(read_tree_usage);
if ((opts.dir && !opts.update))
die("--exclude-per-directory is meaningless unless -u");
+ if (opts.merge && !opts.index_only)
+ setup_work_tree();
if (opts.merge) {
if (stage < 2)
View
@@ -221,7 +221,7 @@ int cmd_rm(int argc, const char **argv, const char *prefix)
printf("rm '%s'\n", path);
if (remove_file_from_cache(path))
- die("git-rm: unable to remove %s", path);
+ die("git rm: unable to remove %s", path);
}
if (show_only)
@@ -244,7 +244,7 @@ int cmd_rm(int argc, const char **argv, const char *prefix)
continue;
}
if (!removed)
- die("git-rm: %s: %s", path, strerror(errno));
+ die("git rm: %s: %s", path, strerror(errno));
}
}
Oops, something went wrong.

0 comments on commit 9b8ae93

Please sign in to comment.