From b60df87a6b39b3e9fc2fe81585a8bc55a502dcd3 Mon Sep 17 00:00:00 2001 From: Stephen Boyd Date: Sat, 21 Mar 2009 21:32:43 -0700 Subject: format-patch: --numbered-files and --stdout aren't mutually exclusive For example: git format-patch --numbered-files --stdout --attach HEAD~~ will create two messages with files 1 and 2 attached respectively. Without --attach/--inline but with --stdout, --numbered-files option can be simply ignored, because we are not creating any file ourselves. Signed-off-by: Stephen Boyd Signed-off-by: Junio C Hamano --- Documentation/git-format-patch.txt | 1 - builtin-log.c | 2 -- 2 files changed, 3 deletions(-) diff --git a/Documentation/git-format-patch.txt b/Documentation/git-format-patch.txt index 11a7d77261..dc40f47169 100644 --- a/Documentation/git-format-patch.txt +++ b/Documentation/git-format-patch.txt @@ -96,7 +96,6 @@ include::diff-options.txt[] --numbered-files:: Output file names will be a simple number sequence without the default first line of the commit appended. - Mutually exclusive with the --stdout option. -k:: --keep-subject:: diff --git a/builtin-log.c b/builtin-log.c index 2ae39afccd..0f0adf2bab 100644 --- a/builtin-log.c +++ b/builtin-log.c @@ -917,8 +917,6 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix) die ("-n and -k are mutually exclusive."); if (keep_subject && subject_prefix) die ("--subject-prefix and -k are mutually exclusive."); - if (numbered_files && use_stdout) - die ("--numbered-files and --stdout are mutually exclusive."); argc = setup_revisions(argc, argv, &rev, "HEAD"); if (argc > 1) -- cgit v1.2.1 From 7ad3c52e2dc8e81aafa615fb8b65ad99b6a62172 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Scharfe?= Date: Mon, 16 Mar 2009 19:38:42 +0100 Subject: pickaxe: count regex matches only once When --pickaxe-regex is used, forward past the end of matches instead of advancing to the byte after their start. This way matches count only once, even if the regular expression matches their tail -- like in the fixed-string fork of the code. E.g.: /.*/ used to count the number of bytes instead of the number of lines. /aa/ resulted in a count of two in "aaa" instead of one. Also document the fact that regexec() needs a NUL-terminated string as its second argument by adding an assert(). Signed-off-by: Rene Scharfe Signed-off-by: Junio C Hamano --- diffcore-pickaxe.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/diffcore-pickaxe.c b/diffcore-pickaxe.c index 574b3e8337..d0ef839700 100644 --- a/diffcore-pickaxe.c +++ b/diffcore-pickaxe.c @@ -25,10 +25,12 @@ static unsigned int contains(struct diff_filespec *one, regmatch_t regmatch; int flags = 0; + assert(data[sz] == '\0'); while (*data && !regexec(regexp, data, 1, ®match, flags)) { flags |= REG_NOTBOL; - data += regmatch.rm_so; - if (*data) data++; + data += regmatch.rm_eo; + if (*data && regmatch.rm_so == regmatch.rm_eo) + data++; cnt++; } -- cgit v1.2.1 From 67c176f549daf5530cabbb801de2b5feb0db82f4 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Tue, 17 Mar 2009 05:03:19 -0400 Subject: ls-files: require worktree when --deleted is given The code will end up calling lstat() to check whether the file still exists; obviously this doesn't work if we're not in the worktree. Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- builtin-ls-files.c | 1 + 1 file changed, 1 insertion(+) diff --git a/builtin-ls-files.c b/builtin-ls-files.c index 9dec282fba..ca6f33d046 100644 --- a/builtin-ls-files.c +++ b/builtin-ls-files.c @@ -419,6 +419,7 @@ int cmd_ls_files(int argc, const char **argv, const char *prefix) } if (!strcmp(arg, "-d") || !strcmp(arg, "--deleted")) { show_deleted = 1; + require_work_tree = 1; continue; } if (!strcmp(arg, "-m") || !strcmp(arg, "--modified")) { -- cgit v1.2.1 From 93467ee660ed1c145fe91ee8928220be6ef9a51c Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sat, 21 Mar 2009 23:21:15 -0700 Subject: Update draft release notes to 1.6.2.2 Signed-off-by: Junio C Hamano --- Documentation/RelNotes-1.6.2.2.txt | 35 +++++++++++++++++++++++++++++++++++ RelNotes | 2 +- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 Documentation/RelNotes-1.6.2.2.txt diff --git a/Documentation/RelNotes-1.6.2.2.txt b/Documentation/RelNotes-1.6.2.2.txt new file mode 100644 index 0000000000..28bfa5399b --- /dev/null +++ b/Documentation/RelNotes-1.6.2.2.txt @@ -0,0 +1,35 @@ +GIT v1.6.2.2 Release Notes +========================== + +Fixes since v1.6.2.1 +-------------------- + +* A longstanding confusing description of what --pickaxe option of + git-diff does has been clarified in the documentation. + +* "git diff --pickaxe-regexp" did not count overlapping matches + correctly. + +* "git-fetch" in a repository that was not cloned from anywhere said + it cannot find 'origin', which was hard to understand for new people. + +* "git-format-patch --numbered-files --stdout" did not have to die of + incompatible options; it now simply ignores --numbered-files as no files + are produced anyway. + +* "git-ls-files --deleted" did not work well with GIT_DIR&GIT_WORK_TREE. + +* "git-read-tree A B C..." without -m option has been broken for a long + time. + +* git-send-email ignored --in-reply-to when --no-thread was given. + +* 'git-submodule add' did not tolerate extra slashes and ./ in the path it + accepted from the command line; it now is more lenient. + + +--- +exec >/var/tmp/1 +O=v1.6.2.1-23-g67c176f +echo O=$(git describe maint) +git shortlog --no-merges $O..maint diff --git a/RelNotes b/RelNotes index cc85675c62..96e77da7c0 120000 --- a/RelNotes +++ b/RelNotes @@ -1 +1 @@ -Documentation/RelNotes-1.6.2.1.txt \ No newline at end of file +Documentation/RelNotes-1.6.2.2.txt \ No newline at end of file -- cgit v1.2.1