* Re: [PATCH 3/7] contrib/subtree: Add --unannotate
From: Junio C Hamano @ 2013-01-16 4:31 UTC (permalink / raw)
To: greened; +Cc: git, James Nylen
In-Reply-To: <87y5ftojoj.fsf@waller.obbligato.org>
greened@obbligato.org writes:
> greened@obbligato.org writes:
>
>>> I think this paragraph inherits existing breakage from the beginning
>>> of time, but I do not think the above will format the second and
>>> subsequent paragraphs correctly.
>>
>> Ok, I'll take a look.
>
> I don't know what "correctly" is but it is at least formatted in a
> similar manner to the other options.
That is what "inherits existing breakage" means ;-)
The first paragraph is typeset as body text, while the rest are
typeset in monospaced font, no?
It should be more like this, I think:
--option::
First paragraph
+
Second paragraph
+
And third paragraph
^ permalink raw reply
* Re: [PATCH] attr: fix off-by-one directory component length calculation
From: Junio C Hamano @ 2013-01-16 5:35 UTC (permalink / raw)
To: Duy Nguyen; +Cc: Jean-Noël AVILA, git
In-Reply-To: <CACsJy8C2uEgwozpWBfowYJea3XRB72rhzjsSFuG9Ud0afuQy6w@mail.gmail.com>
Duy Nguyen <pclouds@gmail.com> writes:
> On Wed, Jan 16, 2013 at 9:33 AM, Junio C Hamano <gitster@pobox.com> wrote:
>> Duy Nguyen <pclouds@gmail.com> writes:
>>
>>> On Wed, Jan 16, 2013 at 08:08:03AM +0700, Duy Nguyen wrote:
>>>> Actually I'd like to remove that function.
>>>
>>> This is what I had in mind:
>>
>> I think the replacement logic to find the basename is moderately
>> inferiour to the original. For one thing (this may be somewhat
>> subjective), it is less readable now.
>
> Yeah, maybe it's micro optimization.
Your change is micro unoptimization (and making the result less
readable). I wouldn't worry too much about micro-optimizing an
existing piece of code, but making an efficient code into a worse
one without a good reason is a different story.
>> Also the original only
>> scanned the string from the beginning once (instead of letting
>> strlen() to scan once and go back).
>
> But we do need to strlen() anyway in collect_all_attrs().
That is exactly my point, isn't it?
The loop to find the basename has to run to the end of the string at
least once, as it cannot not stop at the last slash---it goes from
front to back and it won't know which one is the last slash until it
sees the end of the string. After the loop exits, you know the
length of the string without running a separate strlen() to assign
to "pathlen".
> So we scan
> the string 3 times (strlen + 2 * find_basename) in the original. Now
> we do it twice.
I already said that overall restructure of the code may be a good
idea to reduce the calls to the function. I was only comparing the
implementations of the loop that finds the basename, so I do not
understand what you mean by that "2 *" in that comparison. It does
not make sense to me.
^ permalink raw reply
* git fetch without --recurse-submodules option
From: 乙酸鋰 @ 2013-01-16 5:45 UTC (permalink / raw)
To: git
Hi,
With git pull or git fetch without specifying --recurse-submodules,
what is the default action?
It seems git fetches submodules wtihout specifying --recurse-submodules.
If this is not clear, please update documentation.
In git pull document --recurse-submodules option, it tells users to
see git-config(1) and gitmodules(5), but does not tell users to refer
to git fetch --recurse-submodules for the meaning of the switches.
In git fetch document --recurse-submodules option, it does not tell
users to see git-config(1) or gitmodules(5).
^ permalink raw reply
* Re: [PATCH] attr: fix off-by-one directory component length calculation
From: Duy Nguyen @ 2013-01-16 6:02 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Jean-Noël AVILA, git
In-Reply-To: <7vtxqhzo4m.fsf@alter.siamese.dyndns.org>
On Tue, Jan 15, 2013 at 09:35:21PM -0800, Junio C Hamano wrote:
> >> Also the original only
> >> scanned the string from the beginning once (instead of letting
> >> strlen() to scan once and go back).
> >
> > But we do need to strlen() anyway in collect_all_attrs().
>
> That is exactly my point, isn't it?
OK I get your point now. Something like this?
-- 8< --
Subject: [PATCH] attr: avoid calling find_basename() twice per path
find_basename() is only used inside collect_all_attrs(), called once
in prepare_attr_stack, then again after prepare_attr_stack()
returns. Both calls return exact same value. Reorder the code to do
the same task once. Also avoid strlen() because we knows the length
after finding basename.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
attr.c | 45 ++++++++++++++++++---------------------------
1 file changed, 18 insertions(+), 27 deletions(-)
diff --git a/attr.c b/attr.c
index cfc6748..880f862 100644
--- a/attr.c
+++ b/attr.c
@@ -564,32 +564,12 @@ static void bootstrap_attr_stack(void)
attr_stack = elem;
}
-static const char *find_basename(const char *path)
-{
- const char *cp, *last_slash = NULL;
-
- for (cp = path; *cp; cp++) {
- if (*cp == '/' && cp[1])
- last_slash = cp;
- }
- return last_slash ? last_slash + 1 : path;
-}
-
-static void prepare_attr_stack(const char *path)
+static void prepare_attr_stack(const char *path, int dirlen)
{
struct attr_stack *elem, *info;
- int dirlen, len;
+ int len;
const char *cp;
- dirlen = find_basename(path) - path;
-
- /*
- * find_basename() includes the trailing slash, but we do
- * _not_ want it.
- */
- if (dirlen)
- dirlen--;
-
/*
* At the bottom of the attribute stack is the built-in
* set of attribute definitions, followed by the contents
@@ -769,15 +749,26 @@ static int macroexpand_one(int attr_nr, int rem)
static void collect_all_attrs(const char *path)
{
struct attr_stack *stk;
- int i, pathlen, rem;
- const char *basename;
+ int i, pathlen, rem, dirlen;
+ const char *basename, *cp, *last_slash = NULL;
+
+ for (cp = path; *cp; cp++) {
+ if (*cp == '/' && cp[1])
+ last_slash = cp;
+ }
+ pathlen = cp - path;
+ if (last_slash) {
+ basename = last_slash + 1;
+ dirlen = last_slash - path;
+ } else {
+ basename = path;
+ dirlen = 0;
+ }
- prepare_attr_stack(path);
+ prepare_attr_stack(path, dirlen);
for (i = 0; i < attr_nr; i++)
check_all_attr[i].value = ATTR__UNKNOWN;
- basename = find_basename(path);
- pathlen = strlen(path);
rem = attr_nr;
for (stk = attr_stack; 0 < rem && stk; stk = stk->prev)
rem = fill(path, pathlen, basename, stk, rem);
--
1.8.0.rc3.18.g0d9b108
-- 8< --
^ permalink raw reply related
* Re: t9902 fails (Was: [PATCH] attr: fix off-by-one directory component length calculation)
From: Torsten Bögershausen @ 2013-01-16 6:15 UTC (permalink / raw)
To: Jeff King
Cc: Jean-Noël AVILA, Junio C Hamano, git,
Nguyễn Thái Ngọc Duy, Torsten Bögershausen
In-Reply-To: <20130115232400.GA16147@sigill.intra.peff.net>
On 01/16/2013 12:24 AM, Jeff King wrote:
> On Tue, Jan 15, 2013 at 12:49:05PM -0800, Junio C Hamano wrote:
>
>> "Jean-Noël AVILA"<avila.jn@gmail.com> writes:
>>
>>> Btw, the test 10 to t9902 is failing on my Debian testing. Is it a known
>>> issue?
>>
>> Which branch?
>
> t9902.10 is overly sensitive to extra git commands in your PATH, as well
> as cruft in your build dir (especially if you have been building 'pu',
> which has git-check-ignore). Try "make clean&& make test".
>
> -Peff
This may help, or it may not.
If there are other binaries like
"git-check-email" or "git-check-ignore" in the PATH
.....
When you switch to a branch generating a file like
git-check-ignore then "make clean" will know about it
and will remove it.
If you switch to master, then "make clean" will not remove it.
What does "git status" say?
We had a discussion about this some weeks ago, but never concluded.
How about this:
http://comments.gmane.org/gmane.comp.version-control.git/211907
^ permalink raw reply
* Re: [PATCH] Allow custom "comment char"
From: Junio C Hamano @ 2013-01-16 6:23 UTC (permalink / raw)
To: Ralf Thielow; +Cc: jrnieder, git
In-Reply-To: <7v622y45wy.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
> Ralf Thielow <ralf.thielow@gmail.com> writes:
> ...
> Looks like a good progress overall, except for nits here and there.
>
>> diff --git a/builtin/notes.c b/builtin/notes.c
>> index 453457a..5e84e35 100644
>> --- a/builtin/notes.c
>> +++ b/builtin/notes.c
>> @@ -92,10 +92,7 @@ static const char * const git_notes_get_ref_usage[] = {
>> };
>>
>> static const char note_template[] =
>> - "\n"
>> - "#\n"
>> - "# Write/edit the notes for the following object:\n"
>> - "#\n";
>> + "Write/edit the notes for the following object:";
>
> I think this (and its use site that manually adds "\n#\n") is a
> symptom of strbuf_commented_add*() function not designed right.
> When it iterates over lines and adds each of them in a commented out
> form, it could check if the line is an empty one and refrain from
> adding a trailing SP if that is the case. Then this can become
>
> "\nWrite/edit the notes...\n\n";
>
> You have to create the "\n" blank line at the beginning manually,
> but that is logically outside the commented out block, so it is not
> a problem.
>> diff --git a/git-submodule.sh b/git-submodule.sh
>> index 22ec5b6..1b8d95f 100755
>> --- a/git-submodule.sh
>> +++ b/git-submodule.sh
>> @@ -975,13 +975,19 @@ cmd_summary() {
>> echo
>> done |
>> if test -n "$for_status"; then
>> + comment_char=`git config core.commentchar`
>> + if [ ! -n "$comment_char" ]; then
>> + comment_char='#'
>> + elif [ ${#comment_char} -gt 1 ]; then
>
> Not portable, I think.
>
>> + echo "$comment_char"
>> + sed -e "s|^|$comment_char |" -e "s|^$comment_char $|$comment_char|"
>
> Can $comment_char be a '|'?
I think it may be the easiest to teach one of the pure-helper
commands, e.g. "git stripspace", to do this kind of thing for you
with a new option.
To summarize, along the lines of the attached patch (on top of
jc/custom-comment-char topic).
builtin/branch.c | 20 +++++++++-----------
builtin/stripspace.c | 35 +++++++++++++++++++++++++++++------
strbuf.c | 42 +++++++++++++++++++++++++++++++++++++++++-
strbuf.h | 4 ++++
4 files changed, 83 insertions(+), 18 deletions(-)
diff --git a/builtin/branch.c b/builtin/branch.c
index 7f8865a..42de4c5 100644
--- a/builtin/branch.c
+++ b/builtin/branch.c
@@ -707,18 +707,16 @@ static int edit_branch_description(const char *branch_name)
if (!buf.len || buf.buf[buf.len-1] != '\n')
strbuf_addch(&buf, '\n');
/*
- * NEEDSWORK: introduce a strbuf_commented_addf(), possibly
- * sharing code with status_vprintf(), that makes each line
- * commented with comment_line_char, and use it here and from
- * other places (e.g. write_commented_object() and create_note()
- * in builtin/notes.c and create_tag() in builtin/tag.c).
+ * NEEDSWORK: convert more code to use this:
+ * (e.g. write_commented_object() and create_note() in
+ * builtin/notes.c and create_tag() in builtin/tag.c).
*/
- strbuf_addf(&buf,
- "%c Please edit the description for the branch\n"
- "%c %s\n"
- "%c Lines starting with '%c' will be stripped.\n",
- comment_line_char, comment_line_char,
- branch_name, comment_line_char, comment_line_char);
+ strbuf_commented_addf(&buf,
+ "Please edit the description for the branch\n"
+ " %s\n"
+ "Lines starting with '%c' will be stripped.\n",
+ branch_name, comment_line_char);
+
fp = fopen(git_path(edit_description), "w");
if ((fwrite(buf.buf, 1, buf.len, fp) < buf.len) || fclose(fp)) {
strbuf_release(&buf);
diff --git a/builtin/stripspace.c b/builtin/stripspace.c
index 600ca66..790b500 100644
--- a/builtin/stripspace.c
+++ b/builtin/stripspace.c
@@ -66,21 +66,44 @@ void stripspace(struct strbuf *sb, int skip_comments)
strbuf_setlen(sb, j);
}
+static void comment_lines(struct strbuf *buf)
+{
+ char *msg;
+ size_t len;
+
+ msg = strbuf_detach(buf, &len);
+ strbuf_add_commented_lines(buf, msg, len);
+}
+
int cmd_stripspace(int argc, const char **argv, const char *prefix)
{
struct strbuf buf = STRBUF_INIT;
int strip_comments = 0;
+ enum { INVAL = 0, STRIP_SPACE = 1, COMMENT_LINES = 2 } mode = STRIP_SPACE;
+
+ if (argc == 2) {
+ if (!strcmp(argv[1], "-s") ||
+ !strcmp(argv[1], "--strip-comments")) {
+ strip_comments = 1;
+ } else if (!strcmp(argv[1], "-c")) {
+ mode = COMMENT_LINES;
+ git_config(git_default_config, NULL);
+ } else {
+ mode = INVAL;
+ }
+ } else if (argc > 1)
+ mode = INVAL;
- if (argc == 2 && (!strcmp(argv[1], "-s") ||
- !strcmp(argv[1], "--strip-comments")))
- strip_comments = 1;
- else if (argc > 1)
- usage("git stripspace [-s | --strip-comments] < input");
+ if (mode == INVAL)
+ usage("git stripspace [-s|-c] <input");
if (strbuf_read(&buf, 0, 1024) < 0)
die_errno("could not read the input");
- stripspace(&buf, strip_comments);
+ if (mode == STRIP_SPACE)
+ stripspace(&buf, strip_comments);
+ else /* i.e. COMMENT_LINES */
+ comment_lines(&buf);
write_or_die(1, buf.buf, buf.len);
strbuf_release(&buf);
diff --git a/strbuf.c b/strbuf.c
index 9a373be..d0525c8 100644
--- a/strbuf.c
+++ b/strbuf.c
@@ -411,12 +411,17 @@ int strbuf_read_file(struct strbuf *sb, const char *path, size_t hint)
return len;
}
-void strbuf_add_lines(struct strbuf *out, const char *prefix,
+static void add_lines(struct strbuf *out,
+ const char *prefix1,
+ const char *prefix2,
const char *buf, size_t size)
{
while (size) {
+ const char *prefix;
const char *next = memchr(buf, '\n', size);
next = next ? (next + 1) : (buf + size);
+
+ prefix = (prefix2 && buf[0] == '\n') ? prefix2 : prefix1;
strbuf_addstr(out, prefix);
strbuf_add(out, buf, next - buf);
size -= next - buf;
@@ -425,6 +430,41 @@ void strbuf_add_lines(struct strbuf *out, const char *prefix,
strbuf_complete_line(out);
}
+void strbuf_add_lines(struct strbuf *out, const char *prefix,
+ const char *buf, size_t size)
+{
+ add_lines(out, prefix, NULL, buf, size);
+}
+
+void strbuf_add_commented_lines(struct strbuf *out,
+ const char *buf, size_t size)
+{
+ static char prefix1[3];
+ static char prefix2[2];
+
+ if (prefix1[0] != comment_line_char) {
+ sprintf(prefix1, "%c ", comment_line_char);
+ sprintf(prefix2, "%c", comment_line_char);
+ }
+ add_lines(out, prefix1, prefix2, buf, size);
+}
+
+void strbuf_commented_addf(struct strbuf *sb, const char *fmt, ...)
+{
+ va_list params;
+ struct strbuf buf = STRBUF_INIT;
+ int incomplete_line = sb->len && sb->buf[sb->len - 1] != '\n';
+
+ va_start(params, fmt);
+ strbuf_vaddf(&buf, fmt, params);
+ va_end(params);
+
+ strbuf_add_commented_lines(sb, buf.buf, buf.len);
+ if (incomplete_line)
+ sb->buf[--sb->len] = '\0';
+ strbuf_release(&buf);
+}
+
void strbuf_addstr_xml_quoted(struct strbuf *buf, const char *s)
{
while (*s) {
diff --git a/strbuf.h b/strbuf.h
index ecae4e2..1eb0c75 100644
--- a/strbuf.h
+++ b/strbuf.h
@@ -131,10 +131,14 @@ extern void strbuf_addbuf_percentquote(struct strbuf *dst, const struct strbuf *
__attribute__((format (printf,2,3)))
extern void strbuf_addf(struct strbuf *sb, const char *fmt, ...);
+__attribute__((format (printf,2,3)))
+extern void strbuf_commented_addf(struct strbuf *sb, const char *fmt, ...);
__attribute__((format (printf,2,0)))
extern void strbuf_vaddf(struct strbuf *sb, const char *fmt, va_list ap);
extern void strbuf_add_lines(struct strbuf *sb, const char *prefix, const char *buf, size_t size);
+extern void strbuf_add_commented_lines(struct strbuf *out, const char *buf, size_t size);
+
/*
* Append s to sb, with the characters '<', '>', '&' and '"' converted
^ permalink raw reply related
* [PATCH v3 3/3] diff: Introduce --diff-algorithm command line option
From: Michal Privoznik @ 2013-01-16 7:51 UTC (permalink / raw)
To: git; +Cc: gitster, trast, peff
In-Reply-To: <cover.1358322212.git.mprivozn@redhat.com>
Since command line options have higher priority than config file
variables and taking previous commit into account, we need a way
how to specify myers algorithm on command line. However,
inventing `--myers` is not the right answer. We need far more
general option, and that is `--diff-algorithm`.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
---
Documentation/diff-options.txt | 21 +++++++++++++++++++++
contrib/completion/git-completion.bash | 11 +++++++++++
diff.c | 12 +++++++++++-
diff.h | 2 ++
merge-recursive.c | 9 +++++++++
5 files changed, 54 insertions(+), 1 deletion(-)
diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt
index 39f2c50..6f11c34 100644
--- a/Documentation/diff-options.txt
+++ b/Documentation/diff-options.txt
@@ -55,6 +55,27 @@ endif::git-format-patch[]
--histogram::
Generate a diff using the "histogram diff" algorithm.
+--diff-algorithm={patience|minimal|histogram|myers}::
+ Choose a diff algorithm. The variants are as follows:
++
+--
+`default`, `myers`;;
+ The basic greedy diff algorithm. Currently, this happens to be
+ the default algorithm as well.
+`minimal`;;
+ Spend extra time to make sure the smallest possible diff is
+ produced.
+`patience`;;
+ Use "patience diff" algorithm when generating patches.
+`histogram`;;
+ This algorithm extends the patience algorithm to "support
+ low-occurrence common elements".
+--
++
+For instance, if you configured diff.algorithm variable to a
+non-default value and want to use the default one, then you
+have to use `--diff-algorithm=default` option.
+
--stat[=<width>[,<name-width>[,<count>]]]::
Generate a diffstat. By default, as much space as necessary
will be used for the filename part, and the rest for the graph
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 33e25dc..d592cf9 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1021,6 +1021,8 @@ _git_describe ()
__gitcomp_nl "$(__git_refs)"
}
+__git_diff_algorithms="myers minimal patience histogram"
+
__git_diff_common_options="--stat --numstat --shortstat --summary
--patch-with-stat --name-only --name-status --color
--no-color --color-words --no-renames --check
@@ -1035,6 +1037,7 @@ __git_diff_common_options="--stat --numstat --shortstat --summary
--raw
--dirstat --dirstat= --dirstat-by-file
--dirstat-by-file= --cumulative
+ --diff-algorithm=
"
_git_diff ()
@@ -1042,6 +1045,10 @@ _git_diff ()
__git_has_doubledash && return
case "$cur" in
+ --diff-algorithm=*)
+ __gitcomp "$__git_diff_algorithms" "" "${cur##--diff-algorithm=}"
+ return
+ ;;
--*)
__gitcomp "--cached --staged --pickaxe-all --pickaxe-regex
--base --ours --theirs --no-index
@@ -2114,6 +2121,10 @@ _git_show ()
" "" "${cur#*=}"
return
;;
+ --diff-algorithm=*)
+ __gitcomp "$__git_diff_algorithms" "" "${cur##--diff-algorithm=}"
+ return
+ ;;
--*)
__gitcomp "--pretty= --format= --abbrev-commit --oneline
$__git_diff_common_options
diff --git a/diff.c b/diff.c
index 7d6cc4c..5fa40e9 100644
--- a/diff.c
+++ b/diff.c
@@ -144,7 +144,7 @@ static int git_config_rename(const char *var, const char *value)
return git_config_bool(var,value) ? DIFF_DETECT_RENAME : 0;
}
-static long parse_algorithm_value(const char *value)
+long parse_algorithm_value(const char *value)
{
if (!value)
return -1;
@@ -3634,6 +3634,16 @@ int diff_opt_parse(struct diff_options *options, const char **av, int ac)
options->xdl_opts = DIFF_WITH_ALG(options, PATIENCE_DIFF);
else if (!strcmp(arg, "--histogram"))
options->xdl_opts = DIFF_WITH_ALG(options, HISTOGRAM_DIFF);
+ else if (!prefixcmp(arg, "--diff-algorithm=")) {
+ long value = parse_algorithm_value(arg+17);
+ if (value < 0)
+ return error("option diff-algorithm accepts \"myers\", "
+ "\"minimal\", \"patience\" and \"histogram\"");
+ /* clear out previous settings */
+ DIFF_XDL_CLR(options, NEED_MINIMAL);
+ options->xdl_opts &= ~XDF_DIFF_ALGORITHM_MASK;
+ options->xdl_opts |= value;
+ }
/* flags options */
else if (!strcmp(arg, "--binary")) {
diff --git a/diff.h b/diff.h
index a47bae4..54c2590 100644
--- a/diff.h
+++ b/diff.h
@@ -333,6 +333,8 @@ extern struct userdiff_driver *get_textconv(struct diff_filespec *one);
extern int parse_rename_score(const char **cp_p);
+extern long parse_algorithm_value(const char *value);
+
extern int print_stat_summary(FILE *fp, int files,
int insertions, int deletions);
extern void setup_diff_pager(struct diff_options *);
diff --git a/merge-recursive.c b/merge-recursive.c
index 33ba5dc..ea9dbd3 100644
--- a/merge-recursive.c
+++ b/merge-recursive.c
@@ -2068,6 +2068,15 @@ int parse_merge_opt(struct merge_options *o, const char *s)
o->xdl_opts = DIFF_WITH_ALG(o, PATIENCE_DIFF);
else if (!strcmp(s, "histogram"))
o->xdl_opts = DIFF_WITH_ALG(o, HISTOGRAM_DIFF);
+ else if (!strcmp(s, "diff-algorithm=")) {
+ long value = parse_algorithm_value(s+15);
+ if (value < 0)
+ return -1;
+ /* clear out previous settings */
+ DIFF_XDL_CLR(o, NEED_MINIMAL);
+ o->xdl_opts &= ~XDF_DIFF_ALGORITHM_MASK;
+ o->xdl_opts |= value;
+ }
else if (!strcmp(s, "ignore-space-change"))
o->xdl_opts |= XDF_IGNORE_WHITESPACE_CHANGE;
else if (!strcmp(s, "ignore-all-space"))
--
1.8.0.2
^ permalink raw reply related
* [PATCH v3 1/3] git-completion.bash: Autocomplete --minimal and --histogram for git-diff
From: Michal Privoznik @ 2013-01-16 7:51 UTC (permalink / raw)
To: git; +Cc: gitster, trast, peff
In-Reply-To: <cover.1358322212.git.mprivozn@redhat.com>
Even though --patience was already there, we missed --minimal and
--histogram for some reason.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
---
contrib/completion/git-completion.bash | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index a4c48e1..383518c 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1031,7 +1031,7 @@ __git_diff_common_options="--stat --numstat --shortstat --summary
--no-ext-diff
--no-prefix --src-prefix= --dst-prefix=
--inter-hunk-context=
- --patience
+ --patience --histogram --minimal
--raw
--dirstat --dirstat= --dirstat-by-file
--dirstat-by-file= --cumulative
--
1.8.0.2
^ permalink raw reply related
* [PATCH v3 0/3] Rework git-diff algorithm selection
From: Michal Privoznik @ 2013-01-16 7:51 UTC (permalink / raw)
To: git; +Cc: gitster, trast, peff
It's been a while I was trying to get this in. Recently, I realized how
important this is.
Please keep me CC'ed as I am not subscribed to the list.
diff to v1:
-Junio's suggestions worked in
diff to v2:
-yet more Junio's suggestions included
Michal Privoznik (3):
git-completion.bash: Autocomplete --minimal and --histogram for
git-diff
config: Introduce diff.algorithm variable
diff: Introduce --diff-algorithm command line option
Documentation/diff-config.txt | 18 ++++++++++++++++++
Documentation/diff-options.txt | 21 +++++++++++++++++++++
contrib/completion/git-completion.bash | 14 +++++++++++++-
diff.c | 34 ++++++++++++++++++++++++++++++++++
diff.h | 2 ++
merge-recursive.c | 9 +++++++++
6 files changed, 97 insertions(+), 1 deletion(-)
--
1.8.0.2
^ permalink raw reply
* [PATCH v3 2/3] config: Introduce diff.algorithm variable
From: Michal Privoznik @ 2013-01-16 7:51 UTC (permalink / raw)
To: git; +Cc: gitster, trast, peff
In-Reply-To: <cover.1358322212.git.mprivozn@redhat.com>
Some users or projects prefer different algorithms over others, e.g.
patience over myers or similar. However, specifying appropriate
argument every time diff is to be used is impractical. Moreover,
creating an alias doesn't play nicely with other tools based on diff
(git-show for instance). Hence, a configuration variable which is able
to set specific algorithm is needed. For now, these four values are
accepted: 'myers' (which has the same effect as not setting the config
variable at all), 'minimal', 'patience' and 'histogram'.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
---
Documentation/diff-config.txt | 18 ++++++++++++++++++
contrib/completion/git-completion.bash | 1 +
diff.c | 24 ++++++++++++++++++++++++
3 files changed, 43 insertions(+)
diff --git a/Documentation/diff-config.txt b/Documentation/diff-config.txt
index 4314ad0..3a62ace 100644
--- a/Documentation/diff-config.txt
+++ b/Documentation/diff-config.txt
@@ -155,3 +155,21 @@ diff.tool::
"kompare". Any other value is treated as a custom diff tool,
and there must be a corresponding `difftool.<tool>.cmd`
option.
+
+diff.algorithm::
+ Choose a diff algorithm. The variants are as follows:
++
+--
+`default`, `myers`;;
+ The basic greedy diff algorithm. Currently, this happens to be
+ the default algorithm as well.
+`minimal`;;
+ Spend extra time to make sure the smallest possible diff is
+ produced.
+`patience`;;
+ Use "patience diff" algorithm when generating patches.
+`histogram`;;
+ This algorithm extends the patience algorithm to "support
+ low-occurrence common elements".
+--
++
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 383518c..33e25dc 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1839,6 +1839,7 @@ _git_config ()
diff.suppressBlankEmpty
diff.tool
diff.wordRegex
+ diff.algorithm
difftool.
difftool.prompt
fetch.recurseSubmodules
diff --git a/diff.c b/diff.c
index 348f71b..7d6cc4c 100644
--- a/diff.c
+++ b/diff.c
@@ -36,6 +36,7 @@ static int diff_no_prefix;
static int diff_stat_graph_width;
static int diff_dirstat_permille_default = 30;
static struct diff_options default_diff_options;
+static long diff_algorithm;
static char diff_colors[][COLOR_MAXLEN] = {
GIT_COLOR_RESET,
@@ -143,6 +144,21 @@ static int git_config_rename(const char *var, const char *value)
return git_config_bool(var,value) ? DIFF_DETECT_RENAME : 0;
}
+static long parse_algorithm_value(const char *value)
+{
+ if (!value)
+ return -1;
+ else if (!strcasecmp(value, "myers") || !strcasecmp(value, "default"))
+ return 0;
+ else if (!strcasecmp(value, "minimal"))
+ return XDF_NEED_MINIMAL;
+ else if (!strcasecmp(value, "patience"))
+ return XDF_PATIENCE_DIFF;
+ else if (!strcasecmp(value, "histogram"))
+ return XDF_HISTOGRAM_DIFF;
+ return -1;
+}
+
/*
* These are to give UI layer defaults.
* The core-level commands such as git-diff-files should
@@ -196,6 +212,13 @@ int git_diff_ui_config(const char *var, const char *value, void *cb)
return 0;
}
+ if (!strcmp(var, "diff.algorithm")) {
+ diff_algorithm = parse_algorithm_value(value);
+ if (diff_algorithm < 0)
+ return -1;
+ return 0;
+ }
+
if (git_color_config(var, value, cb) < 0)
return -1;
@@ -3213,6 +3236,7 @@ void diff_setup(struct diff_options *options)
options->add_remove = diff_addremove;
options->use_color = diff_use_color_default;
options->detect_rename = diff_detect_rename_default;
+ options->xdl_opts |= diff_algorithm;
if (diff_no_prefix) {
options->a_prefix = options->b_prefix = "";
--
1.8.0.2
^ permalink raw reply related
* Re: [PATCH] Allow custom "comment char"
From: Ralf Thielow @ 2013-01-16 8:17 UTC (permalink / raw)
To: Junio C Hamano; +Cc: jrnieder, git
In-Reply-To: <7vmww9zlwj.fsf@alter.siamese.dyndns.org>
2013/1/16 Junio C Hamano <gitster@pobox.com>:
>>> diff --git a/git-submodule.sh b/git-submodule.sh
>>> index 22ec5b6..1b8d95f 100755
>>> --- a/git-submodule.sh
>>> +++ b/git-submodule.sh
>>> @@ -975,13 +975,19 @@ cmd_summary() {
>>> echo
>>> done |
>>> if test -n "$for_status"; then
>>> + comment_char=`git config core.commentchar`
>>> + if [ ! -n "$comment_char" ]; then
>>> + comment_char='#'
>>> + elif [ ${#comment_char} -gt 1 ]; then
>>
>> Not portable, I think.
>>
>>> + echo "$comment_char"
>>> + sed -e "s|^|$comment_char |" -e "s|^$comment_char $|$comment_char|"
>>
>> Can $comment_char be a '|'?
>
> I think it may be the easiest to teach one of the pure-helper
> commands, e.g. "git stripspace", to do this kind of thing for you
> with a new option.
>
> To summarize, along the lines of the attached patch (on top of
> jc/custom-comment-char topic).
Very good idea. I'll integrate.
Thanks
^ permalink raw reply
* Re: [PATCH v2 06/14] imap-send.c: remove some unused fields from struct store
From: Michael Haggerty @ 2013-01-16 8:23 UTC (permalink / raw)
To: Jonathan Nieder; +Cc: Junio C Hamano, git, Jeff King
In-Reply-To: <20130115203204.GA12524@google.com>
On 01/15/2013 09:32 PM, Jonathan Nieder wrote:
> Michael Haggerty wrote:
>
>> - else if ((arg1 = next_arg(&cmd))) {
>> - if (!strcmp("EXISTS", arg1))
>> - ctx->gen.count = atoi(arg);
>> - else if (!strcmp("RECENT", arg1))
>> - ctx->gen.recent = atoi(arg);
>> + } else if ((arg1 = next_arg(&cmd))) {
>> + /* unused */
>
> The above is just the right thing to do to ensure no behavior change.
> Let's take a look at the resulting code, though:
>
> if (... various reasonable things ...) {
> ...
> } else if ((arg1 = next_arg(&cmd))) {
> /* unused */
> } else {
> fprintf(stderr, "IMAP error: unable to parse untagged response\n");
> return RESP_BAD;
>
> Anyone forced by some bug to examine this "/* unused */" case is going
> to have no clue what's going on. In that respect, the old code was
> much better, since it at least made it clear that one case where this
> code gets hit is handling "<num> EXISTS" and "<num> RECENT" untagged
> responses.
>
> I suspect that original code did not have an implicit and intended
> missing
>
> else
> ; /* negligible response; ignore it */
>
> but the intent was rather
>
> else {
> fprintf(stderr, "IMAP error: I can't parse this\n");
> return RESP_BAD;
> }
>
> Since actually fixing that is probably too aggressive for this patch,
> how about a FIXME comment like the following?
>
> /*
> * Unhandled response-data with at least two words.
> * Ignore it.
> *
> * NEEDSWORK: Previously this case handled '<num> EXISTS'
> * and '<num> RECENT' but as a probably-unintended side
> * effect it ignores other unrecognized two-word
> * responses. imap-send doesn't ever try to read
> * messages or mailboxes these days, so consider
> * eliminating this case.
> */
Yes, this sounds reasonable to me. Thanks for the improvement.
Michael
--
Michael Haggerty
mhagger@alum.mit.edu
http://softwareswirl.blogspot.com/
^ permalink raw reply
* Re: [PATCH v2 07/14] imap-send.c: inline imap_parse_list() in imap_list()
From: Michael Haggerty @ 2013-01-16 8:26 UTC (permalink / raw)
To: Matt Kraai; +Cc: Junio C Hamano, git
In-Reply-To: <20130115185147.GB14552@ftbfs.org>
On 01/15/2013 07:51 PM, Matt Kraai wrote:
> On Tue, Jan 15, 2013 at 09:06:25AM +0100, Michael Haggerty wrote:
>> -static struct imap_list *parse_imap_list(struct imap *imap, char **sp)
>> +static struct imap_list *parse_list(char **sp)
>
> The commit subject refers to imap_parse_list and imap_list whereas the
> code refers to parse_imap_list and parse_list.
Yes, you're right. Thanks.
Michael
--
Michael Haggerty
mhagger@alum.mit.edu
http://softwareswirl.blogspot.com/
^ permalink raw reply
* Re: [BUG] Possible bug in `remote set-url --add --push`
From: Michael J Gruber @ 2013-01-16 8:46 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Jardel Weyrich, Sascha Cunz, git@vger.kernel.org
In-Reply-To: <7v4nii5tp2.fsf@alter.siamese.dyndns.org>
Junio C Hamano venit, vidit, dixit 15.01.2013 16:53:
> Michael J Gruber <git@drmicha.warpmail.net> writes:
>
>> Also there is a conceptual confusion: pushurl is meant to push to the
>> same repo using a different url, e.g. something authenticated
>> (https/ssh) for push and something faster/easier for fetch.
>
> That is not necessarily true, depending on the definition of your
> "same". Having multiple URLs/PushURLs that refer to physically
> different locations, as long as "git push there" immediately
> followed by "git fetch here" should work with the repositories that
> are conceptually equivalent, is a supported mode of operation. In
That is my definition of "same", in the sense of "object-and-ref-same"
when "in-sync" (at least regarding all pushed refs; there may be more
there).
> fact, they being physically different _was_ the original motivation
> of the feature. See 755225d (git builtin "push", 2006-04-29).
I thought it was about unauthenticated git-protocol vs. git+ssh but was
wrong.
> The definition of the "immediate" above also depends on your use; it
> could be tens of minutes (you may be fetching from git.k.org that
> can be reached from the general public, which may be a cname for
> multiple machines mirroring a single master.k.org that k.org account
> holders push to, and there may be propagation delays). In such a
> scenario, your URL may point at the public git.k.org, pushURL may
> point at master.k.org, and you may have other pushURLs that point at
> other places you use as back-up locations (e.g. git.or.cz or
> github.com).
Yes. That is also why we fetch from one fetch URL only, because we
assume they point at the "same" repo and don't need to check.
> As long as you _mean_ to maintain their contents the same, you can
> call them conceptually "the same repo" and your statement becomes
> true.
>
>> It never was meant to push to several repos.
>
> This is false. It _was_ designed to be used that way from day one.
It is very true with me definition of "same" ;)
> (I am not saying using it in other ways is an abuse---I am merely
> saying that pushing to multiple physically different repositories is
> within its scope).
>
>> That being said, I don't mind changing the behaviour of set-url.
>
> I do not think we want to change the behaviour of set-url. What
> needs to be fixed is the output from "remote -v". It should:
>
> * When there is no pushURL but there is a URL, then show it as
> (fetch/push), and you are done;
>
> * When there is one or more pushURLs and a URL, then show the URL
> as (fetch), and show pushURLs as (push), and you are done;
>
> * When there are more than one URLs, and there is no pushURL, then
> show the first URL as (fetch/push), and the remainder in a
> notation that says it is used only for push, but it shouldn't be
> the same "(push)"; the user has to be able to distinguish it from
> the pushURLs in a repository that also has URLs.
Maybe "(fetch fallback/push)" if we do use it as a fallback? If we don't
we probably should?
> * When there are more than one URLs, and there are one or more
> pushURLs, then show the first URL as (fetch), the other URLs
> as (unused), and the pushURLs as (push).
>
> Strictly speaking, the last one could be a misconfiguration. If you
> have:
>
> [remote "origin"]
> url = one
> url = two
> pushurl = three
> pushurl = four
>
> then your "git fetch" will go to one, and "git push" will go to
> three and four, and two is never used.
Do we fall back to two if one is unavailable? In any case, people may
use a configuration like that to keep track of mirrors and shuffle
around the fetch lines (rather than commenting/uncommenting) when one
goes offline.
> It should also be stressed that the third one a supported
> configuration. With
>
> [remote "origin"]
> url = one
> url = two
>
> your "git fetch" goes to one, and your "git push" will go to one and
> two. This is the originally intended use case of 755225d. It is to
> push to and fetch from master.k.org (think of "one" above) and in
> addition to push to backup.github.com ("two").
Michael
^ permalink raw reply
* Re: [RFC/PATCH 2/8 v3] git_remote_helpers: fix input when running under Python 3
From: John Keeping @ 2013-01-16 9:45 UTC (permalink / raw)
To: Pete Wyckoff
Cc: Junio C Hamano, Michael Haggerty, git, Eric S. Raymond,
Felipe Contreras, Sverre Rabbelier
In-Reply-To: <20130116000316.GA26999@padd.com>
On Tue, Jan 15, 2013 at 07:03:16PM -0500, Pete Wyckoff wrote:
> john@keeping.me.uk wrote on Tue, 15 Jan 2013 22:40 +0000:
>> This is what keeping the refs as byte strings looks like.
>
> As John knows, it is not possible to interpret text from a byte
> string without talking about the character encoding.
>
> Git is (largely) a C program and uses the character set defined
> in the C standard, which is a subset of ASCII. But git does
> "math" on strings, like this snippet that takes something from
> argv[] and prepends "refs/heads/":
>
> strcpy(refname, "refs/heads/");
> strcpy(refname + strlen("refs/heads/"), ret->name);
>
> The result doesn't talk about what character set it is using,
> but because it combines a prefix from ASCII with its input,
> git makes the assumption that the input is ASCII-compatible.
>
> If you feed a UTF-16 string in argv, e.g.
>
> $ echo master | iconv -f ascii -t utf16 | xargs git branch
> xargs: Warning: a NUL character occurred in the input. It cannot be passed through in the argument list. Did you mean to use the --null option?
> fatal: Not a valid object name: ''.
>
> you get an error about NUL, and not the branch you hoped for.
> Git assumes that the input character set contains roughly ASCII
> in byte positions 0..127.
>
> That's one small reason why the useful character encodings put
> ASCII in the 0..127 range, including utf-8, big5 and shift-jis.
> ASCII is indeed special due to its legacy, and both C and Python
> recognize this.
>
>> diff --git a/git_remote_helpers/git/importer.py b/git_remote_helpers/git/importer.py
>> @@ -18,13 +18,16 @@ class GitImporter(object):
>>
>> def get_refs(self, gitdir):
>> """Returns a dictionary with refs.
>> +
>> + Note that the keys in the returned dictionary are byte strings as
>> + read from git.
>> """
>> args = ["git", "--git-dir=" + gitdir, "for-each-ref", "refs/heads"]
>> - lines = check_output(args).strip().split('\n')
>> + lines = check_output(args).strip().split('\n'.encode('utf-8'))
>> refs = {}
>> for line in lines:
>> - value, name = line.split(' ')
>> - name = name.strip('commit\t')
>> + value, name = line.split(' '.encode('utf-8'))
>> + name = name.strip('commit\t'.encode('utf-8'))
>> refs[name] = value
>> return refs
>
> I'd suggest for this Python conundrum using byte-string literals, e.g.:
>
> lines = check_output(args).strip().split(b'\n')
> value, name = line.split(b' ')
> name = name.strip(b'commit\t')
>
> Essentially identical to what you have, but avoids naming "utf-8" as
> the encoding. It instead relies on Python's interpretation of
> ASCII characters in string context, which is exactly what C does.
The problem is that AFAICT the byte-string prefix is only available in
Python 2.7 and later (compare [1] and [2]). I think we need this more
convoluted code if we want to keep supporting Python 2.6 (although
perhaps 'ascii' would be a better choice than 'utf-8').
[1] http://docs.python.org/2.6/reference/lexical_analysis.html#literals
[2] http://docs.python.org/2.7/reference/lexical_analysis.html#literals
John
^ permalink raw reply
* [PATCH] git-remote: distinguish between default and configured URLs
From: Michael J Gruber @ 2013-01-16 10:14 UTC (permalink / raw)
To: git; +Cc: Junio C Hamano, Jardel Weyrich, Sascha Cunz
In-Reply-To: <7v4nii5tp2.fsf@alter.siamese.dyndns.org>
The current output of "git remote -v" does not distinguish between
explicitly configured push URLs and those coming from fetch lines.
Revise the output so so that URLs are distinguished by their labels:
(fetch): fetch config used for fetching only
(fetch/push): fetch config used for fetching and pushing
(fetch fallback/push): fetch config used for pushing only
(fetch fallback): fetch config which is unused
(push): push config used for pushing
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
---
Maybe something like this? It even seems to make the code in get_one_entry
clearer.
I yet have to look at the tests, doc and other git-remote invocations.
builtin/remote.c | 31 +++++++++++++++++--------------
1 file changed, 17 insertions(+), 14 deletions(-)
diff --git a/builtin/remote.c b/builtin/remote.c
index 937484d..ec07109 100644
--- a/builtin/remote.c
+++ b/builtin/remote.c
@@ -1509,25 +1509,28 @@ static int get_one_entry(struct remote *remote, void *priv)
{
struct string_list *list = priv;
struct strbuf url_buf = STRBUF_INIT;
- const char **url;
- int i, url_nr;
+ char *fetchurl0, *fetchurl1;
+ int i;
+
+ if (remote->pushurl_nr > 0) {
+ fetchurl0 = "fetch";
+ fetchurl1 = "fetch fallback";
+ } else {
+ fetchurl0 = "fetch/push";
+ fetchurl1 = "fetch fallback/push";
+ }
- if (remote->url_nr > 0) {
- strbuf_addf(&url_buf, "%s (fetch)", remote->url[0]);
+ for (i = 0; i < remote->url_nr; i++) {
+ strbuf_addf(&url_buf, "%s (%s)", remote->url[0], i ? fetchurl1 : fetchurl0);
string_list_append(list, remote->name)->util =
strbuf_detach(&url_buf, NULL);
- } else
+ } /* else */
+ if (remote->url_nr == 0)
string_list_append(list, remote->name)->util = NULL;
- if (remote->pushurl_nr) {
- url = remote->pushurl;
- url_nr = remote->pushurl_nr;
- } else {
- url = remote->url;
- url_nr = remote->url_nr;
- }
- for (i = 0; i < url_nr; i++)
+
+ for (i = 0; i < remote->pushurl_nr; i++)
{
- strbuf_addf(&url_buf, "%s (push)", url[i]);
+ strbuf_addf(&url_buf, "%s (push)", remote->pushurl[i]);
string_list_append(list, remote->name)->util =
strbuf_detach(&url_buf, NULL);
}
--
1.8.1.1.456.g93e7b0a
^ permalink raw reply related
* [PATCH v3] test-lib.sh: unfilter GIT_PERF_*
From: Nguyễn Thái Ngọc Duy @ 2013-01-16 10:23 UTC (permalink / raw)
To: git; +Cc: Junio C Hamano, Thomas Rast,
Nguyễn Thái Ngọc Duy
In-Reply-To: <1358257856-3274-1-git-send-email-pclouds@gmail.com>
These variables are user parameters to control how to run the perf
tests. Allow users to do so.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
PERF -> PERF_
t/test-lib.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/t/test-lib.sh b/t/test-lib.sh
index f50f834..bf4cf71 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -85,7 +85,7 @@ unset VISUAL EMAIL LANGUAGE COLUMNS $("$PERL_PATH" -e '
.*_TEST
PROVE
VALGRIND
- PERF_AGGREGATING_LATER
+ PERF_
));
my @vars = grep(/^GIT_/ && !/^GIT_($ok)/o, @env);
print join("\n", @vars);
--
1.8.0.rc2.23.g1fb49df
^ permalink raw reply related
* Re: [PATCH] git-remote: distinguish between default and configured URLs
From: Michael J Gruber @ 2013-01-16 10:27 UTC (permalink / raw)
To: Michael J Gruber; +Cc: git, Junio C Hamano, Jardel Weyrich, Sascha Cunz
In-Reply-To: <a5bf3511b3ecf4e9243d550d11ab977f95ecea30.1358331096.git.git@drmicha.warpmail.net>
Michael J Gruber venit, vidit, dixit 16.01.2013 11:14:
> The current output of "git remote -v" does not distinguish between
> explicitly configured push URLs and those coming from fetch lines.
>
> Revise the output so so that URLs are distinguished by their labels:
>
> (fetch): fetch config used for fetching only
> (fetch/push): fetch config used for fetching and pushing
> (fetch fallback/push): fetch config used for pushing only
> (fetch fallback): fetch config which is unused
> (push): push config used for pushing
>
> Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
> ---
> Maybe something like this? It even seems to make the code in get_one_entry
> clearer.
>
> I yet have to look at the tests, doc and other git-remote invocations.
Okay, so "git remote show remotename" copied the logic from "git remote
-v" but neither reused the code nor the output format. I guess we'd have
to implement the new logic and keep the old format? Refactoring would
require settling on a common format. Both outputs should be
ui-as-ui-can, but I'm afraid people are still grepping the output in
their scripts :(
Michael
^ permalink raw reply
* Re: [PATCH 3/3] Avoid non-portable strftime format specifiers in git-cvsimport
From: Ben Walton @ 2013-01-16 10:38 UTC (permalink / raw)
To: Chris Rorvick; +Cc: Junio C Hamano, esr, git
In-Reply-To: <CAEUsAPZakGKUmQWrsTaF1cpbQm0Y4C3sDxCWD_i1gkQxeC-bRQ@mail.gmail.com>
On Wed, Jan 16, 2013 at 1:53 AM, Chris Rorvick <chris@rorvick.com> wrote:
> On Tue, Jan 15, 2013 at 5:10 PM, Ben Walton <bdwalton@gmail.com> wrote:
>> Neither %s or %z are portable strftime format specifiers. There is no
>> need for %s in git-cvsimport as the supplied time is already in
>> seconds since the epoch. For %z, use the function get_tz_offset
>> provided by Git.pm instead.
>
> Out of curiosity, which platforms are affected? Assuming DST is a 1
> hour shift (patch 2/3) is not necessarily portable either, though this
> currently appears to only affect a small island off of the coast of
> Australia. :-)
My primary motivation on this change was for solaris. %s isn't
supported in 10 (not sure about 11) and %z was only added in 10. The
issue affects other older platforms as well.
Good point about the 1 hour assumption. Is it worth hacking in
additional logic to handle Lord Howe Island? I think it's likely a
case of "in for a penny, in for a pound" but that could lead to
madness when it comes to time zones. Either way, the function behaves
better now than before.
(I wasn't aware of the half hour oddball wrt to DST, so I learned
something new here too!)
Thanks
-Ben
--
---------------------------------------------------------------------------------------------------------------------------
Take the risk of thinking for yourself. Much more happiness,
truth, beauty and wisdom will come to you that way.
-Christopher Hitchens
---------------------------------------------------------------------------------------------------------------------------
^ permalink raw reply
* Re: [PATCH] git-remote: distinguish between default and configured URLs
From: John Keeping @ 2013-01-16 10:42 UTC (permalink / raw)
To: Michael J Gruber; +Cc: git, Junio C Hamano, Jardel Weyrich, Sascha Cunz
In-Reply-To: <a5bf3511b3ecf4e9243d550d11ab977f95ecea30.1358331096.git.git@drmicha.warpmail.net>
On Wed, Jan 16, 2013 at 11:14:48AM +0100, Michael J Gruber wrote:
> The current output of "git remote -v" does not distinguish between
> explicitly configured push URLs and those coming from fetch lines.
>
> Revise the output so so that URLs are distinguished by their labels:
>
> (fetch): fetch config used for fetching only
> (fetch/push): fetch config used for fetching and pushing
> (fetch fallback/push): fetch config used for pushing only
> (fetch fallback): fetch config which is unused
> (push): push config used for pushing
How does this interact with url.<base>.pushInsteadOf?
I have a global rule to convert git:// URLs to ssh:// for pushing:
[url "git@example.com:"]
pushInsteadOf = git://example.com/
With only a URL configured for a remote (no pushURL), I get (with Git
1.8.1):
origin git://example.com/repository.git (fetch)
origin git@example.com:repository.git (push)
>From the original discussion in this thread, I think that if I did
"git remote set-url --add --push <url>" it would replace my current push
URL, and the change to "(fetch/push)" doesn't help in this case.
Should there be special handling for pushInsteadOf here?
John
^ permalink raw reply
* Re: What's cooking in git.git (Jan 2013, #06; Mon, 14)
From: Adam Spiers @ 2013-01-16 12:06 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
In-Reply-To: <7v7gnd26pr.fsf@alter.siamese.dyndns.org>
On Wed, Jan 16, 2013 at 2:37 AM, Junio C Hamano <gitster@pobox.com> wrote:
> Adam Spiers <git@adamspiers.org> writes:
>
>> On Mon, Jan 14, 2013 at 10:23 PM, Junio C Hamano <gitster@pobox.com> wrote:
>>> * as/check-ignore (2013-01-10) 12 commits
>>> (merged to 'next' on 2013-01-14 at 9df2afc)
>>> + t0008: avoid brace expansion
>>> + add git-check-ignore sub-command
>>> + setup.c: document get_pathspec()
>>> + add.c: extract new die_if_path_beyond_symlink() for reuse
>>> + add.c: extract check_path_for_gitlink() from treat_gitlinks() for reuse
>>> + pathspec.c: rename newly public functions for clarity
>>> + add.c: move pathspec matchers into new pathspec.c for reuse
>>> + add.c: remove unused argument from validate_pathspec()
>>> + dir.c: improve docs for match_pathspec() and match_pathspec_depth()
>>> + dir.c: provide clear_directory() for reclaiming dir_struct memory
>>> + dir.c: keep track of where patterns came from
>>> + dir.c: use a single struct exclude_list per source of excludes
>>>
>>> Add a new command "git check-ignore" for debugging .gitignore
>>> files.
>>
>> The above is v4 plus the "t0008: avoid brace expansion" fix. v4 is
>> slightly outdated and not quite the right version to merge to 'next'.
>
> Sigh.
>
> The "What's cooking" is a report of what _has_ already happened. I
> would have appreciated if you said the above _before_ this happened.
I did, 8 days ago in the link which you just trimmed from your reply:
http://thread.gmane.org/gmane.comp.version-control.git/212184/focus=212856
The additional issues with t0008 were discovered after I posted v4, as
reflected in last Wednesday's "What's cooking" (#04):
"The test it adds seems to break under dash.
Expecting a reroll or fixup."
I assumed that for brevity you had deliberately omitted mentioning the
outstanding dir.exclude_list_group[EXC_CMDL].el[0] encapsulation
issue linked above, so I thought we were aligned at this point.
However I see now that you changed the status to an intention to merge
this to 'next' in last Friday's "What's cooking" (#05). That gave me
a window of under 72 hours in which to reiterate the need for a final
re-roll. Unfortunately with other commitments and illness over the
weekend, I didn't catch this in time.
However, the damage is very small:
>> I'll post a v5 re-roll as per:
>
> Now the series is in 'next', it is too late to _replace_ it X-<.
> Could you instead make an incremental updates on top? That way, we
> do not have to re-review the whole thing; we only need to review the
> changes relative to the old one, making sure that the fixes in the
> updates are better than the v4 version.
Sure, that's easy to do. It'll be a single small patch very similar
to this one:
http://article.gmane.org/gmane.comp.version-control.git/212852
minus the superfluous printf() debug statements. I'll do that now.
Thanks,
Adam
^ permalink raw reply
* Re: erratic behavior commit --allow-empty
From: Joachim Schmitz @ 2013-01-16 12:26 UTC (permalink / raw)
To: git
In-Reply-To: <alpine.LNX.2.01.1301121927350.15558@nerf07.vanv.qr>
Jan Engelhardt wrote:
> On Tuesday 2012-10-02 10:26, Johannes Sixt wrote:
>>
>> Note that git commit -m A --allow-empty *DID* create a commit. Only,
>> that it received the same name (SHA1) as the commit you created
>> before it because it had the exact same contents (files, parents,
>> author, committer, and timestamps). Obviously, your script was
>> executed sufficiently fast that the two commits happend in the same
>> second.
>
> What about introducing nanosecond-granular timestamps into Git?
Not every platform (supported by git) does have a nanosecond clock
resolution
Bye, Jojo
^ permalink raw reply
* Re: [PATCH] git-remote: distinguish between default and configured URLs
From: Michael J Gruber @ 2013-01-16 12:45 UTC (permalink / raw)
To: John Keeping; +Cc: git, Junio C Hamano, Jardel Weyrich, Sascha Cunz
In-Reply-To: <20130116104222.GA15125@farnsworth.metanate.com>
John Keeping venit, vidit, dixit 16.01.2013 11:42:
> On Wed, Jan 16, 2013 at 11:14:48AM +0100, Michael J Gruber wrote:
>> The current output of "git remote -v" does not distinguish between
>> explicitly configured push URLs and those coming from fetch lines.
>>
>> Revise the output so so that URLs are distinguished by their labels:
>>
>> (fetch): fetch config used for fetching only
>> (fetch/push): fetch config used for fetching and pushing
>> (fetch fallback/push): fetch config used for pushing only
>> (fetch fallback): fetch config which is unused
>> (push): push config used for pushing
>
> How does this interact with url.<base>.pushInsteadOf?
>
> I have a global rule to convert git:// URLs to ssh:// for pushing:
>
> [url "git@example.com:"]
> pushInsteadOf = git://example.com/
>
> With only a URL configured for a remote (no pushURL), I get (with Git
> 1.8.1):
>
> origin git://example.com/repository.git (fetch)
> origin git@example.com:repository.git (push)
>
> From the original discussion in this thread, I think that if I did
> "git remote set-url --add --push <url>" it would replace my current push
> URL, and the change to "(fetch/push)" doesn't help in this case.
>
> Should there be special handling for pushInsteadOf here?
>
>
> John
Thanks for pointing out this case.
The new code would still list this as two separate URLs because they
really are; whether they come from two config entries or from one being
subject to two different insteadof expansions is completely opaque to
builtin/remote.c, unless remote.c learns to stick that additional info
into struct remote somehow.
In short, the separate listing is correct, but in this case there's no
improvement in readability.
We could still say that (push)InsteadOf is a power feature and we want
to help the "normal" case, but it's a bit half-assed. In the end we
might even have to keep track of insteadof-expansions and display those
also (i.e. "expanded from...")?
Michael
^ permalink raw reply
* Re: [PATCH] git-remote: distinguish between default and configured URLs
From: John Keeping @ 2013-01-16 13:04 UTC (permalink / raw)
To: Michael J Gruber
Cc: John Keeping, git, Junio C Hamano, Jardel Weyrich, Sascha Cunz
In-Reply-To: <50F6A0F0.70800@drmicha.warpmail.net>
On Wed, Jan 16, 2013 at 01:45:36PM +0100, Michael J Gruber wrote:
> John Keeping venit, vidit, dixit 16.01.2013 11:42:
>> On Wed, Jan 16, 2013 at 11:14:48AM +0100, Michael J Gruber wrote:
>>> The current output of "git remote -v" does not distinguish between
>>> explicitly configured push URLs and those coming from fetch lines.
>>>
>>> Revise the output so so that URLs are distinguished by their labels:
>>>
>>> (fetch): fetch config used for fetching only
>>> (fetch/push): fetch config used for fetching and pushing
>>> (fetch fallback/push): fetch config used for pushing only
>>> (fetch fallback): fetch config which is unused
>>> (push): push config used for pushing
>>
>> How does this interact with url.<base>.pushInsteadOf?
>>
>> I have a global rule to convert git:// URLs to ssh:// for pushing:
>>
>> [url "git@example.com:"]
>> pushInsteadOf = git://example.com/
>>
>> With only a URL configured for a remote (no pushURL), I get (with Git
>> 1.8.1):
>>
>> origin git://example.com/repository.git (fetch)
>> origin git@example.com:repository.git (push)
>>
>> From the original discussion in this thread, I think that if I did
>> "git remote set-url --add --push <url>" it would replace my current push
>> URL, and the change to "(fetch/push)" doesn't help in this case.
>>
>> Should there be special handling for pushInsteadOf here?
>
> Thanks for pointing out this case.
>
> The new code would still list this as two separate URLs because they
> really are; whether they come from two config entries or from one being
> subject to two different insteadof expansions is completely opaque to
> builtin/remote.c, unless remote.c learns to stick that additional info
> into struct remote somehow.
OK. I like the new format, I was just wondering if it was a simple
enhancement to indicate a pushInsteadOf URL specially as well.
> In short, the separate listing is correct, but in this case there's no
> improvement in readability.
>
> We could still say that (push)InsteadOf is a power feature and we want
> to help the "normal" case, but it's a bit half-assed. In the end we
> might even have to keep track of insteadof-expansions and display those
> also (i.e. "expanded from...")?
Given that it's not a trivial enhancement, I'd accept the argument that
someone who has configured pushInsteadOf can be expected to understand
the underlying git-config semantics of "git remote set-url".
John
^ permalink raw reply
* [PATCH] diff: show file creation/deletion and type change in diffstat
From: Nguyễn Thái Ngọc Duy @ 2013-01-16 13:16 UTC (permalink / raw)
To: git; +Cc: Nguyễn Thái Ngọc Duy
A short string is appended after the path name in diffstat:
- "(new)" for new 0644 files
- "(new +x)" for new 0755 files
- "(new +l)" for new symlinks
- "(gone)" for deleted files
- "(mode +x)" for files gaining executable permission
- "(mode -x)" for files losing executable permission
This shows most of the information from --summary, but in a more compact
format. The only missing information is rewrite percentage. This makes
--stat a replacement for --summary in most cases. In a diff where a
lot of files are added/removed, not displaying --summary shortens the
stat significantly (e.g. a pull)
Another good point is the information is now all in one line. The user
does not have to match two lines from --stat and --summary of the same
file anymore.
The summary piece is short enough that it will not eat too much into
the diffstat estate.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
A resurrection of [1] but without colors.
[1] http://thread.gmane.org/gmane.comp.version-control.git/207749
diff.c | 44 ++++++++++++++++++++--
t/t3404-rebase-interactive.sh | 2 +-
t/t3406-rebase-message.sh | 4 +-
t/t4012-diff-binary.sh | 4 +-
...diff-tree_--cc_--patch-with-stat_--summary_side | 6 +--
t/t4013/diff.diff-tree_--cc_--stat_--summary_side | 6 +--
...pretty=oneline_--root_--patch-with-stat_initial | 6 +--
.../diff.diff-tree_--pretty_--patch-with-stat_side | 6 +--
...-tree_--pretty_--root_--patch-with-stat_initial | 6 +--
...f-tree_--pretty_--root_--stat_--summary_initial | 6 +--
.../diff.diff-tree_--pretty_--root_--stat_initial | 6 +--
...diff.diff-tree_--root_--patch-with-stat_initial | 6 +--
t/t4013/diff.diff-tree_-c_--stat_--summary_side | 6 +--
.../diff.diff_--patch-with-stat_-r_initial..side | 6 +--
t/t4013/diff.diff_--patch-with-stat_initial..side | 6 +--
t/t4013/diff.diff_--stat_initial..side | 6 +--
t/t4013/diff.diff_-r_--stat_initial..side | 6 +--
..._--attach_--stdout_--suffix=.diff_initial..side | 6 +--
....format-patch_--attach_--stdout_initial..master | 16 ++++----
...format-patch_--attach_--stdout_initial..master^ | 10 ++---
...ff.format-patch_--attach_--stdout_initial..side | 6 +--
...nline_--stdout_--numbered-files_initial..master | 16 ++++----
...tdout_--subject-prefix=TESTCASE_initial..master | 16 ++++----
....format-patch_--inline_--stdout_initial..master | 16 ++++----
...format-patch_--inline_--stdout_initial..master^ | 10 ++---
...ormat-patch_--inline_--stdout_initial..master^^ | 6 +--
...ff.format-patch_--inline_--stdout_initial..side | 6 +--
...tch_--stdout_--cover-letter_-n_initial..master^ | 18 ++++-----
...at-patch_--stdout_--no-numbered_initial..master | 16 ++++----
...ormat-patch_--stdout_--numbered_initial..master | 16 ++++----
t/t4013/diff.format-patch_--stdout_initial..master | 16 ++++----
.../diff.format-patch_--stdout_initial..master^ | 10 ++---
t/t4013/diff.format-patch_--stdout_initial..side | 6 +--
t/t4013/diff.log_--patch-with-stat_master | 16 ++++----
..._--root_--cc_--patch-with-stat_--summary_master | 22 +++++------
...f.log_--root_--patch-with-stat_--summary_master | 22 +++++------
t/t4013/diff.log_--root_--patch-with-stat_master | 22 +++++------
...og_--root_-c_--patch-with-stat_--summary_master | 22 +++++------
t/t4013/diff.show_--patch-with-stat_--summary_side | 6 +--
t/t4013/diff.show_--patch-with-stat_side | 6 +--
t/t4013/diff.show_--stat_--summary_side | 6 +--
t/t4013/diff.show_--stat_side | 6 +--
t/t4013/diff.whatchanged_--patch-with-stat_master | 16 ++++----
..._--root_--cc_--patch-with-stat_--summary_master | 22 +++++------
...anged_--root_--patch-with-stat_--summary_master | 22 +++++------
...iff.whatchanged_--root_--patch-with-stat_master | 22 +++++------
...ed_--root_-c_--patch-with-stat_--summary_master | 22 +++++------
t/t4045-diff-relative.sh | 2 +-
t/t4049-diff-stat-count.sh | 4 +-
t/t4052-stat-output.sh | 18 ++++-----
t/t4202-log.sh | 28 +++++++-------
t/t7602-merge-octopus-many.sh | 12 +++---
52 files changed, 327 insertions(+), 291 deletions(-)
diff --git a/diff.c b/diff.c
index 348f71b..7005628 100644
--- a/diff.c
+++ b/diff.c
@@ -1250,7 +1250,8 @@ static void fn_out_consume(void *priv, char *line, unsigned long len)
}
}
-static char *pprint_rename(const char *a, const char *b)
+static char *pprint_rename(const char *a, const char *b,
+ const char *summary_word)
{
const char *old = a;
const char *new = b;
@@ -1266,6 +1267,8 @@ static char *pprint_rename(const char *a, const char *b)
quote_c_style(a, &name, NULL, 0);
strbuf_addstr(&name, " => ");
quote_c_style(b, &name, NULL, 0);
+ if (summary_word)
+ strbuf_addf(&name, " (%s)", summary_word);
return strbuf_detach(&name, NULL);
}
@@ -1314,6 +1317,8 @@ static char *pprint_rename(const char *a, const char *b)
strbuf_addch(&name, '}');
strbuf_add(&name, a + len_a - sfx_length, sfx_length);
}
+ if (summary_word)
+ strbuf_addf(&name, " (%s)", summary_word);
return strbuf_detach(&name, NULL);
}
@@ -1324,6 +1329,7 @@ struct diffstat_t {
char *from_name;
char *name;
char *print_name;
+ char *summary_word;
unsigned is_unmerged:1;
unsigned is_binary:1;
unsigned is_renamed:1;
@@ -1407,14 +1413,17 @@ static void fill_print_name(struct diffstat_file *file)
if (!file->is_renamed) {
struct strbuf buf = STRBUF_INIT;
- if (quote_c_style(file->name, &buf, NULL, 0)) {
+ if (quote_c_style(file->name, &buf, NULL, 0) ||
+ file->summary_word) {
+ strbuf_addf(&buf, " (%s)", file->summary_word);
pname = strbuf_detach(&buf, NULL);
} else {
pname = file->name;
strbuf_release(&buf);
}
} else {
- pname = pprint_rename(file->from_name, file->name);
+ pname = pprint_rename(file->from_name, file->name,
+ file->summary_word);
}
file->print_name = pname;
}
@@ -2424,6 +2433,32 @@ static void builtin_diff(const char *name_a,
return;
}
+static char *get_summary_word(const struct diff_filepair *p, int is_renamed)
+{
+ if (!is_renamed) {
+ if (p->status == DIFF_STATUS_ADDED) {
+ if (S_ISLNK(p->two->mode))
+ return "new +l";
+ else if ((p->two->mode & 0777) == 0755)
+ return "new +x";
+ else
+ return "new";
+ } else if (p->status == DIFF_STATUS_DELETED)
+ return "gone";
+ }
+ if (S_ISLNK(p->one->mode) && !S_ISLNK(p->two->mode))
+ return "mode -l";
+ else if (!S_ISLNK(p->one->mode) && S_ISLNK(p->two->mode))
+ return "mode +l";
+ else if ((p->one->mode & 0777) == 0644 &&
+ (p->two->mode & 0777) == 0755)
+ return "mode +x";
+ else if ((p->one->mode & 0777) == 0755 &&
+ (p->two->mode & 0777) == 0644)
+ return "mode -x";
+ return NULL;
+}
+
static void builtin_diffstat(const char *name_a, const char *name_b,
struct diff_filespec *one,
struct diff_filespec *two,
@@ -2443,6 +2478,7 @@ static void builtin_diffstat(const char *name_a, const char *name_b,
data = diffstat_add(diffstat, name_a, name_b);
data->is_interesting = p->status != DIFF_STATUS_UNKNOWN;
+ data->summary_word = get_summary_word(p, data->is_renamed);
if (!one || !two) {
data->is_unmerged = 1;
@@ -4165,7 +4201,7 @@ static void show_mode_change(FILE *file, struct diff_filepair *p, int show_name,
static void show_rename_copy(FILE *file, const char *renamecopy, struct diff_filepair *p,
const char *line_prefix)
{
- char *names = pprint_rename(p->one->path, p->two->path);
+ char *names = pprint_rename(p->one->path, p->two->path, NULL);
fprintf(file, " %s %s (%d%%)\n", renamecopy, names, similarity_index(p));
free(names);
diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh
index 8462be1..9124497 100755
--- a/t/t3404-rebase-interactive.sh
+++ b/t/t3404-rebase-interactive.sh
@@ -329,7 +329,7 @@ test_expect_success 'verbose flag is heeded, even after --continue' '
echo resolved > file1 &&
git add file1 &&
git rebase --continue > output &&
- grep "^ file1 | 2 +-$" output
+ grep "^ file1 * | 2 +-$" output
'
test_expect_success 'multi-squash only fires up editor once' '
diff --git a/t/t3406-rebase-message.sh b/t/t3406-rebase-message.sh
index e6a9a0d..ff33403 100755
--- a/t/t3406-rebase-message.sh
+++ b/t/t3406-rebase-message.sh
@@ -45,14 +45,14 @@ test_expect_success 'rebase -m' '
test_expect_success 'rebase --stat' '
git reset --hard start &&
git rebase --stat master >diffstat.txt &&
- grep "^ fileX | *1 +$" diffstat.txt
+ grep "^ fileX (new) | *1 +$" diffstat.txt
'
test_expect_success 'rebase w/config rebase.stat' '
git reset --hard start &&
git config rebase.stat true &&
git rebase master >diffstat.txt &&
- grep "^ fileX | *1 +$" diffstat.txt
+ grep "^ fileX (new) | *1 +$" diffstat.txt
'
test_expect_success 'rebase -n overrides config rebase.stat config' '
diff --git a/t/t4012-diff-binary.sh b/t/t4012-diff-binary.sh
index 1215ae5..5aff829 100755
--- a/t/t4012-diff-binary.sh
+++ b/t/t4012-diff-binary.sh
@@ -114,8 +114,8 @@ test_expect_success 'diff --no-index with binary creation' '
'
cat >expect <<EOF
- binfile | Bin 0 -> 1026 bytes
- textfile | 10000 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ binfile (new) | Bin 0 -> 1026 bytes
+ textfile (new) | 10000 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
EOF
test_expect_success 'diff --stat with binary files and big change count' '
diff --git a/t/t4013/diff.diff-tree_--cc_--patch-with-stat_--summary_side b/t/t4013/diff.diff-tree_--cc_--patch-with-stat_--summary_side
index cec33fa..ca5512d 100644
--- a/t/t4013/diff.diff-tree_--cc_--patch-with-stat_--summary_side
+++ b/t/t4013/diff.diff-tree_--cc_--patch-with-stat_--summary_side
@@ -1,8 +1,8 @@
$ git diff-tree --cc --patch-with-stat --summary side
c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a
- dir/sub | 2 ++
- file0 | 3 +++
- file3 | 4 ++++
+ dir/sub | 2 ++
+ file0 | 3 +++
+ file3 (new) | 4 ++++
3 files changed, 9 insertions(+)
create mode 100644 file3
diff --git a/t/t4013/diff.diff-tree_--cc_--stat_--summary_side b/t/t4013/diff.diff-tree_--cc_--stat_--summary_side
index 12b2eee..1e5efa5 100644
--- a/t/t4013/diff.diff-tree_--cc_--stat_--summary_side
+++ b/t/t4013/diff.diff-tree_--cc_--stat_--summary_side
@@ -1,8 +1,8 @@
$ git diff-tree --cc --stat --summary side
c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a
- dir/sub | 2 ++
- file0 | 3 +++
- file3 | 4 ++++
+ dir/sub | 2 ++
+ file0 | 3 +++
+ file3 (new) | 4 ++++
3 files changed, 9 insertions(+)
create mode 100644 file3
$
diff --git a/t/t4013/diff.diff-tree_--pretty=oneline_--root_--patch-with-stat_initial b/t/t4013/diff.diff-tree_--pretty=oneline_--root_--patch-with-stat_initial
index 817ed06..7131b96 100644
--- a/t/t4013/diff.diff-tree_--pretty=oneline_--root_--patch-with-stat_initial
+++ b/t/t4013/diff.diff-tree_--pretty=oneline_--root_--patch-with-stat_initial
@@ -1,8 +1,8 @@
$ git diff-tree --pretty=oneline --root --patch-with-stat initial
444ac553ac7612cc88969031b02b3767fb8a353a Initial
- dir/sub | 2 ++
- file0 | 3 +++
- file2 | 3 +++
+ dir/sub (new) | 2 ++
+ file0 (new) | 3 +++
+ file2 (new) | 3 +++
3 files changed, 8 insertions(+)
diff --git a/dir/sub b/dir/sub
diff --git a/t/t4013/diff.diff-tree_--pretty_--patch-with-stat_side b/t/t4013/diff.diff-tree_--pretty_--patch-with-stat_side
index fe3f6b7..56c14ae 100644
--- a/t/t4013/diff.diff-tree_--pretty_--patch-with-stat_side
+++ b/t/t4013/diff.diff-tree_--pretty_--patch-with-stat_side
@@ -5,9 +5,9 @@ Date: Mon Jun 26 00:03:00 2006 +0000
Side
---
- dir/sub | 2 ++
- file0 | 3 +++
- file3 | 4 ++++
+ dir/sub | 2 ++
+ file0 | 3 +++
+ file3 (new) | 4 ++++
3 files changed, 9 insertions(+)
diff --git a/dir/sub b/dir/sub
diff --git a/t/t4013/diff.diff-tree_--pretty_--root_--patch-with-stat_initial b/t/t4013/diff.diff-tree_--pretty_--root_--patch-with-stat_initial
index 06eb77e..db0744e 100644
--- a/t/t4013/diff.diff-tree_--pretty_--root_--patch-with-stat_initial
+++ b/t/t4013/diff.diff-tree_--pretty_--root_--patch-with-stat_initial
@@ -5,9 +5,9 @@ Date: Mon Jun 26 00:00:00 2006 +0000
Initial
---
- dir/sub | 2 ++
- file0 | 3 +++
- file2 | 3 +++
+ dir/sub (new) | 2 ++
+ file0 (new) | 3 +++
+ file2 (new) | 3 +++
3 files changed, 8 insertions(+)
diff --git a/dir/sub b/dir/sub
diff --git a/t/t4013/diff.diff-tree_--pretty_--root_--stat_--summary_initial b/t/t4013/diff.diff-tree_--pretty_--root_--stat_--summary_initial
index 680eab5..1d90882 100644
--- a/t/t4013/diff.diff-tree_--pretty_--root_--stat_--summary_initial
+++ b/t/t4013/diff.diff-tree_--pretty_--root_--stat_--summary_initial
@@ -5,9 +5,9 @@ Date: Mon Jun 26 00:00:00 2006 +0000
Initial
- dir/sub | 2 ++
- file0 | 3 +++
- file2 | 3 +++
+ dir/sub (new) | 2 ++
+ file0 (new) | 3 +++
+ file2 (new) | 3 +++
3 files changed, 8 insertions(+)
create mode 100644 dir/sub
create mode 100644 file0
diff --git a/t/t4013/diff.diff-tree_--pretty_--root_--stat_initial b/t/t4013/diff.diff-tree_--pretty_--root_--stat_initial
index 9722d1b..98e71a3 100644
--- a/t/t4013/diff.diff-tree_--pretty_--root_--stat_initial
+++ b/t/t4013/diff.diff-tree_--pretty_--root_--stat_initial
@@ -5,8 +5,8 @@ Date: Mon Jun 26 00:00:00 2006 +0000
Initial
- dir/sub | 2 ++
- file0 | 3 +++
- file2 | 3 +++
+ dir/sub (new) | 2 ++
+ file0 (new) | 3 +++
+ file2 (new) | 3 +++
3 files changed, 8 insertions(+)
$
diff --git a/t/t4013/diff.diff-tree_--root_--patch-with-stat_initial b/t/t4013/diff.diff-tree_--root_--patch-with-stat_initial
index ad69ffe..23470f2 100644
--- a/t/t4013/diff.diff-tree_--root_--patch-with-stat_initial
+++ b/t/t4013/diff.diff-tree_--root_--patch-with-stat_initial
@@ -1,8 +1,8 @@
$ git diff-tree --root --patch-with-stat initial
444ac553ac7612cc88969031b02b3767fb8a353a
- dir/sub | 2 ++
- file0 | 3 +++
- file2 | 3 +++
+ dir/sub (new) | 2 ++
+ file0 (new) | 3 +++
+ file2 (new) | 3 +++
3 files changed, 8 insertions(+)
diff --git a/dir/sub b/dir/sub
diff --git a/t/t4013/diff.diff-tree_-c_--stat_--summary_side b/t/t4013/diff.diff-tree_-c_--stat_--summary_side
index e8dc12b..610e74a 100644
--- a/t/t4013/diff.diff-tree_-c_--stat_--summary_side
+++ b/t/t4013/diff.diff-tree_-c_--stat_--summary_side
@@ -1,8 +1,8 @@
$ git diff-tree -c --stat --summary side
c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a
- dir/sub | 2 ++
- file0 | 3 +++
- file3 | 4 ++++
+ dir/sub | 2 ++
+ file0 | 3 +++
+ file3 (new) | 4 ++++
3 files changed, 9 insertions(+)
create mode 100644 file3
$
diff --git a/t/t4013/diff.diff_--patch-with-stat_-r_initial..side b/t/t4013/diff.diff_--patch-with-stat_-r_initial..side
index be8d1ea..ca39dcc 100644
--- a/t/t4013/diff.diff_--patch-with-stat_-r_initial..side
+++ b/t/t4013/diff.diff_--patch-with-stat_-r_initial..side
@@ -1,7 +1,7 @@
$ git diff --patch-with-stat -r initial..side
- dir/sub | 2 ++
- file0 | 3 +++
- file3 | 4 ++++
+ dir/sub | 2 ++
+ file0 | 3 +++
+ file3 (new) | 4 ++++
3 files changed, 9 insertions(+)
diff --git a/dir/sub b/dir/sub
diff --git a/t/t4013/diff.diff_--patch-with-stat_initial..side b/t/t4013/diff.diff_--patch-with-stat_initial..side
index 5424e6d..987bd17 100644
--- a/t/t4013/diff.diff_--patch-with-stat_initial..side
+++ b/t/t4013/diff.diff_--patch-with-stat_initial..side
@@ -1,7 +1,7 @@
$ git diff --patch-with-stat initial..side
- dir/sub | 2 ++
- file0 | 3 +++
- file3 | 4 ++++
+ dir/sub | 2 ++
+ file0 | 3 +++
+ file3 (new) | 4 ++++
3 files changed, 9 insertions(+)
diff --git a/dir/sub b/dir/sub
diff --git a/t/t4013/diff.diff_--stat_initial..side b/t/t4013/diff.diff_--stat_initial..side
index b7741e2..42d216a 100644
--- a/t/t4013/diff.diff_--stat_initial..side
+++ b/t/t4013/diff.diff_--stat_initial..side
@@ -1,6 +1,6 @@
$ git diff --stat initial..side
- dir/sub | 2 ++
- file0 | 3 +++
- file3 | 4 ++++
+ dir/sub | 2 ++
+ file0 | 3 +++
+ file3 (new) | 4 ++++
3 files changed, 9 insertions(+)
$
diff --git a/t/t4013/diff.diff_-r_--stat_initial..side b/t/t4013/diff.diff_-r_--stat_initial..side
index 5d514f5..ddf55fd 100644
--- a/t/t4013/diff.diff_-r_--stat_initial..side
+++ b/t/t4013/diff.diff_-r_--stat_initial..side
@@ -1,6 +1,6 @@
$ git diff -r --stat initial..side
- dir/sub | 2 ++
- file0 | 3 +++
- file3 | 4 ++++
+ dir/sub | 2 ++
+ file0 | 3 +++
+ file3 (new) | 4 ++++
3 files changed, 9 insertions(+)
$
diff --git a/t/t4013/diff.format-patch_--attach_--stdout_--suffix=.diff_initial..side b/t/t4013/diff.format-patch_--attach_--stdout_--suffix=.diff_initial..side
index 547ca06..459d3e7 100644
--- a/t/t4013/diff.format-patch_--attach_--stdout_--suffix=.diff_initial..side
+++ b/t/t4013/diff.format-patch_--attach_--stdout_--suffix=.diff_initial..side
@@ -12,9 +12,9 @@ Content-Type: text/plain; charset=UTF-8; format=fixed
Content-Transfer-Encoding: 8bit
---
- dir/sub | 2 ++
- file0 | 3 +++
- file3 | 4 ++++
+ dir/sub | 2 ++
+ file0 | 3 +++
+ file3 (new) | 4 ++++
3 files changed, 9 insertions(+)
create mode 100644 file3
diff --git a/t/t4013/diff.format-patch_--attach_--stdout_initial..master b/t/t4013/diff.format-patch_--attach_--stdout_initial..master
index 52fedc1..080a952 100644
--- a/t/t4013/diff.format-patch_--attach_--stdout_initial..master
+++ b/t/t4013/diff.format-patch_--attach_--stdout_initial..master
@@ -14,9 +14,9 @@ Content-Transfer-Encoding: 8bit
This is the second commit.
---
- dir/sub | 2 ++
- file0 | 3 +++
- file2 | 3 ---
+ dir/sub | 2 ++
+ file0 | 3 +++
+ file2 (gone) | 3 ---
3 files changed, 5 insertions(+), 3 deletions(-)
delete mode 100644 file2
@@ -73,8 +73,8 @@ Content-Type: text/plain; charset=UTF-8; format=fixed
Content-Transfer-Encoding: 8bit
---
- dir/sub | 2 ++
- file1 | 3 +++
+ dir/sub | 2 ++
+ file1 (new) | 3 +++
2 files changed, 5 insertions(+)
create mode 100644 file1
@@ -121,9 +121,9 @@ Content-Type: text/plain; charset=UTF-8; format=fixed
Content-Transfer-Encoding: 8bit
---
- dir/sub | 2 ++
- file0 | 3 +++
- file3 | 4 ++++
+ dir/sub | 2 ++
+ file0 | 3 +++
+ file3 (new) | 4 ++++
3 files changed, 9 insertions(+)
create mode 100644 file3
diff --git a/t/t4013/diff.format-patch_--attach_--stdout_initial..master^ b/t/t4013/diff.format-patch_--attach_--stdout_initial..master^
index 1c3cde2..b97ed20 100644
--- a/t/t4013/diff.format-patch_--attach_--stdout_initial..master^
+++ b/t/t4013/diff.format-patch_--attach_--stdout_initial..master^
@@ -14,9 +14,9 @@ Content-Transfer-Encoding: 8bit
This is the second commit.
---
- dir/sub | 2 ++
- file0 | 3 +++
- file2 | 3 ---
+ dir/sub | 2 ++
+ file0 | 3 +++
+ file2 (gone) | 3 ---
3 files changed, 5 insertions(+), 3 deletions(-)
delete mode 100644 file2
@@ -73,8 +73,8 @@ Content-Type: text/plain; charset=UTF-8; format=fixed
Content-Transfer-Encoding: 8bit
---
- dir/sub | 2 ++
- file1 | 3 +++
+ dir/sub | 2 ++
+ file1 (new) | 3 +++
2 files changed, 5 insertions(+)
create mode 100644 file1
diff --git a/t/t4013/diff.format-patch_--attach_--stdout_initial..side b/t/t4013/diff.format-patch_--attach_--stdout_initial..side
index 4717bd8..467fafa 100644
--- a/t/t4013/diff.format-patch_--attach_--stdout_initial..side
+++ b/t/t4013/diff.format-patch_--attach_--stdout_initial..side
@@ -12,9 +12,9 @@ Content-Type: text/plain; charset=UTF-8; format=fixed
Content-Transfer-Encoding: 8bit
---
- dir/sub | 2 ++
- file0 | 3 +++
- file3 | 4 ++++
+ dir/sub | 2 ++
+ file0 | 3 +++
+ file3 (new) | 4 ++++
3 files changed, 9 insertions(+)
create mode 100644 file3
diff --git a/t/t4013/diff.format-patch_--inline_--stdout_--numbered-files_initial..master b/t/t4013/diff.format-patch_--inline_--stdout_--numbered-files_initial..master
index 02c4db7..eae31b0 100644
--- a/t/t4013/diff.format-patch_--inline_--stdout_--numbered-files_initial..master
+++ b/t/t4013/diff.format-patch_--inline_--stdout_--numbered-files_initial..master
@@ -14,9 +14,9 @@ Content-Transfer-Encoding: 8bit
This is the second commit.
---
- dir/sub | 2 ++
- file0 | 3 +++
- file2 | 3 ---
+ dir/sub | 2 ++
+ file0 | 3 +++
+ file2 (gone) | 3 ---
3 files changed, 5 insertions(+), 3 deletions(-)
delete mode 100644 file2
@@ -73,8 +73,8 @@ Content-Type: text/plain; charset=UTF-8; format=fixed
Content-Transfer-Encoding: 8bit
---
- dir/sub | 2 ++
- file1 | 3 +++
+ dir/sub | 2 ++
+ file1 (new) | 3 +++
2 files changed, 5 insertions(+)
create mode 100644 file1
@@ -121,9 +121,9 @@ Content-Type: text/plain; charset=UTF-8; format=fixed
Content-Transfer-Encoding: 8bit
---
- dir/sub | 2 ++
- file0 | 3 +++
- file3 | 4 ++++
+ dir/sub | 2 ++
+ file0 | 3 +++
+ file3 (new) | 4 ++++
3 files changed, 9 insertions(+)
create mode 100644 file3
diff --git a/t/t4013/diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..master b/t/t4013/diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..master
index c7677c5..a1c3dfa 100644
--- a/t/t4013/diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..master
+++ b/t/t4013/diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..master
@@ -14,9 +14,9 @@ Content-Transfer-Encoding: 8bit
This is the second commit.
---
- dir/sub | 2 ++
- file0 | 3 +++
- file2 | 3 ---
+ dir/sub | 2 ++
+ file0 | 3 +++
+ file2 (gone) | 3 ---
3 files changed, 5 insertions(+), 3 deletions(-)
delete mode 100644 file2
@@ -73,8 +73,8 @@ Content-Type: text/plain; charset=UTF-8; format=fixed
Content-Transfer-Encoding: 8bit
---
- dir/sub | 2 ++
- file1 | 3 +++
+ dir/sub | 2 ++
+ file1 (new) | 3 +++
2 files changed, 5 insertions(+)
create mode 100644 file1
@@ -121,9 +121,9 @@ Content-Type: text/plain; charset=UTF-8; format=fixed
Content-Transfer-Encoding: 8bit
---
- dir/sub | 2 ++
- file0 | 3 +++
- file3 | 4 ++++
+ dir/sub | 2 ++
+ file0 | 3 +++
+ file3 (new) | 4 ++++
3 files changed, 9 insertions(+)
create mode 100644 file3
diff --git a/t/t4013/diff.format-patch_--inline_--stdout_initial..master b/t/t4013/diff.format-patch_--inline_--stdout_initial..master
index 5b3e34e..dab61d6 100644
--- a/t/t4013/diff.format-patch_--inline_--stdout_initial..master
+++ b/t/t4013/diff.format-patch_--inline_--stdout_initial..master
@@ -14,9 +14,9 @@ Content-Transfer-Encoding: 8bit
This is the second commit.
---
- dir/sub | 2 ++
- file0 | 3 +++
- file2 | 3 ---
+ dir/sub | 2 ++
+ file0 | 3 +++
+ file2 (gone) | 3 ---
3 files changed, 5 insertions(+), 3 deletions(-)
delete mode 100644 file2
@@ -73,8 +73,8 @@ Content-Type: text/plain; charset=UTF-8; format=fixed
Content-Transfer-Encoding: 8bit
---
- dir/sub | 2 ++
- file1 | 3 +++
+ dir/sub | 2 ++
+ file1 (new) | 3 +++
2 files changed, 5 insertions(+)
create mode 100644 file1
@@ -121,9 +121,9 @@ Content-Type: text/plain; charset=UTF-8; format=fixed
Content-Transfer-Encoding: 8bit
---
- dir/sub | 2 ++
- file0 | 3 +++
- file3 | 4 ++++
+ dir/sub | 2 ++
+ file0 | 3 +++
+ file3 (new) | 4 ++++
3 files changed, 9 insertions(+)
create mode 100644 file3
diff --git a/t/t4013/diff.format-patch_--inline_--stdout_initial..master^ b/t/t4013/diff.format-patch_--inline_--stdout_initial..master^
index d13f8a8..f8eca66 100644
--- a/t/t4013/diff.format-patch_--inline_--stdout_initial..master^
+++ b/t/t4013/diff.format-patch_--inline_--stdout_initial..master^
@@ -14,9 +14,9 @@ Content-Transfer-Encoding: 8bit
This is the second commit.
---
- dir/sub | 2 ++
- file0 | 3 +++
- file2 | 3 ---
+ dir/sub | 2 ++
+ file0 | 3 +++
+ file2 (gone) | 3 ---
3 files changed, 5 insertions(+), 3 deletions(-)
delete mode 100644 file2
@@ -73,8 +73,8 @@ Content-Type: text/plain; charset=UTF-8; format=fixed
Content-Transfer-Encoding: 8bit
---
- dir/sub | 2 ++
- file1 | 3 +++
+ dir/sub | 2 ++
+ file1 (new) | 3 +++
2 files changed, 5 insertions(+)
create mode 100644 file1
diff --git a/t/t4013/diff.format-patch_--inline_--stdout_initial..master^^ b/t/t4013/diff.format-patch_--inline_--stdout_initial..master^^
index caec553..5e7c68e 100644
--- a/t/t4013/diff.format-patch_--inline_--stdout_initial..master^^
+++ b/t/t4013/diff.format-patch_--inline_--stdout_initial..master^^
@@ -14,9 +14,9 @@ Content-Transfer-Encoding: 8bit
This is the second commit.
---
- dir/sub | 2 ++
- file0 | 3 +++
- file2 | 3 ---
+ dir/sub | 2 ++
+ file0 | 3 +++
+ file2 (gone) | 3 ---
3 files changed, 5 insertions(+), 3 deletions(-)
delete mode 100644 file2
diff --git a/t/t4013/diff.format-patch_--inline_--stdout_initial..side b/t/t4013/diff.format-patch_--inline_--stdout_initial..side
index d3a6762..be9f3da 100644
--- a/t/t4013/diff.format-patch_--inline_--stdout_initial..side
+++ b/t/t4013/diff.format-patch_--inline_--stdout_initial..side
@@ -12,9 +12,9 @@ Content-Type: text/plain; charset=UTF-8; format=fixed
Content-Transfer-Encoding: 8bit
---
- dir/sub | 2 ++
- file0 | 3 +++
- file3 | 4 ++++
+ dir/sub | 2 ++
+ file0 | 3 +++
+ file3 (new) | 4 ++++
3 files changed, 9 insertions(+)
create mode 100644 file3
diff --git a/t/t4013/diff.format-patch_--stdout_--cover-letter_-n_initial..master^ b/t/t4013/diff.format-patch_--stdout_--cover-letter_-n_initial..master^
index 244d964..8abfae6 100644
--- a/t/t4013/diff.format-patch_--stdout_--cover-letter_-n_initial..master^
+++ b/t/t4013/diff.format-patch_--stdout_--cover-letter_-n_initial..master^
@@ -10,10 +10,10 @@ A U Thor (2):
Second
Third
- dir/sub | 4 ++++
- file0 | 3 +++
- file1 | 3 +++
- file2 | 3 ---
+ dir/sub | 4 ++++
+ file0 | 3 +++
+ file1 (new) | 3 +++
+ file2 (gone) | 3 ---
4 files changed, 10 insertions(+), 3 deletions(-)
create mode 100644 file1
delete mode 100644 file2
@@ -28,9 +28,9 @@ Subject: [DIFFERENT_PREFIX 1/2] Second
This is the second commit.
---
- dir/sub | 2 ++
- file0 | 3 +++
- file2 | 3 ---
+ dir/sub | 2 ++
+ file0 | 3 +++
+ file2 (gone) | 3 ---
3 files changed, 5 insertions(+), 3 deletions(-)
delete mode 100644 file2
@@ -73,8 +73,8 @@ Date: Mon, 26 Jun 2006 00:02:00 +0000
Subject: [DIFFERENT_PREFIX 2/2] Third
---
- dir/sub | 2 ++
- file1 | 3 +++
+ dir/sub | 2 ++
+ file1 (new) | 3 +++
2 files changed, 5 insertions(+)
create mode 100644 file1
diff --git a/t/t4013/diff.format-patch_--stdout_--no-numbered_initial..master b/t/t4013/diff.format-patch_--stdout_--no-numbered_initial..master
index bfc287a..ac92c50 100644
--- a/t/t4013/diff.format-patch_--stdout_--no-numbered_initial..master
+++ b/t/t4013/diff.format-patch_--stdout_--no-numbered_initial..master
@@ -6,9 +6,9 @@ Subject: [PATCH] Second
This is the second commit.
---
- dir/sub | 2 ++
- file0 | 3 +++
- file2 | 3 ---
+ dir/sub | 2 ++
+ file0 | 3 +++
+ file2 (gone) | 3 ---
3 files changed, 5 insertions(+), 3 deletions(-)
delete mode 100644 file2
@@ -51,8 +51,8 @@ Date: Mon, 26 Jun 2006 00:02:00 +0000
Subject: [PATCH] Third
---
- dir/sub | 2 ++
- file1 | 3 +++
+ dir/sub | 2 ++
+ file1 (new) | 3 +++
2 files changed, 5 insertions(+)
create mode 100644 file1
@@ -85,9 +85,9 @@ Date: Mon, 26 Jun 2006 00:03:00 +0000
Subject: [PATCH] Side
---
- dir/sub | 2 ++
- file0 | 3 +++
- file3 | 4 ++++
+ dir/sub | 2 ++
+ file0 | 3 +++
+ file3 (new) | 4 ++++
3 files changed, 9 insertions(+)
create mode 100644 file3
diff --git a/t/t4013/diff.format-patch_--stdout_--numbered_initial..master b/t/t4013/diff.format-patch_--stdout_--numbered_initial..master
index 568f6f5..1229ef1 100644
--- a/t/t4013/diff.format-patch_--stdout_--numbered_initial..master
+++ b/t/t4013/diff.format-patch_--stdout_--numbered_initial..master
@@ -6,9 +6,9 @@ Subject: [PATCH 1/3] Second
This is the second commit.
---
- dir/sub | 2 ++
- file0 | 3 +++
- file2 | 3 ---
+ dir/sub | 2 ++
+ file0 | 3 +++
+ file2 (gone) | 3 ---
3 files changed, 5 insertions(+), 3 deletions(-)
delete mode 100644 file2
@@ -51,8 +51,8 @@ Date: Mon, 26 Jun 2006 00:02:00 +0000
Subject: [PATCH 2/3] Third
---
- dir/sub | 2 ++
- file1 | 3 +++
+ dir/sub | 2 ++
+ file1 (new) | 3 +++
2 files changed, 5 insertions(+)
create mode 100644 file1
@@ -85,9 +85,9 @@ Date: Mon, 26 Jun 2006 00:03:00 +0000
Subject: [PATCH 3/3] Side
---
- dir/sub | 2 ++
- file0 | 3 +++
- file3 | 4 ++++
+ dir/sub | 2 ++
+ file0 | 3 +++
+ file3 (new) | 4 ++++
3 files changed, 9 insertions(+)
create mode 100644 file3
diff --git a/t/t4013/diff.format-patch_--stdout_initial..master b/t/t4013/diff.format-patch_--stdout_initial..master
index 5f0352f..f6b80e9 100644
--- a/t/t4013/diff.format-patch_--stdout_initial..master
+++ b/t/t4013/diff.format-patch_--stdout_initial..master
@@ -6,9 +6,9 @@ Subject: [PATCH 1/3] Second
This is the second commit.
---
- dir/sub | 2 ++
- file0 | 3 +++
- file2 | 3 ---
+ dir/sub | 2 ++
+ file0 | 3 +++
+ file2 (gone) | 3 ---
3 files changed, 5 insertions(+), 3 deletions(-)
delete mode 100644 file2
@@ -51,8 +51,8 @@ Date: Mon, 26 Jun 2006 00:02:00 +0000
Subject: [PATCH 2/3] Third
---
- dir/sub | 2 ++
- file1 | 3 +++
+ dir/sub | 2 ++
+ file1 (new) | 3 +++
2 files changed, 5 insertions(+)
create mode 100644 file1
@@ -85,9 +85,9 @@ Date: Mon, 26 Jun 2006 00:03:00 +0000
Subject: [PATCH 3/3] Side
---
- dir/sub | 2 ++
- file0 | 3 +++
- file3 | 4 ++++
+ dir/sub | 2 ++
+ file0 | 3 +++
+ file3 (new) | 4 ++++
3 files changed, 9 insertions(+)
create mode 100644 file3
diff --git a/t/t4013/diff.format-patch_--stdout_initial..master^ b/t/t4013/diff.format-patch_--stdout_initial..master^
index 2ae454d..6995728 100644
--- a/t/t4013/diff.format-patch_--stdout_initial..master^
+++ b/t/t4013/diff.format-patch_--stdout_initial..master^
@@ -6,9 +6,9 @@ Subject: [PATCH 1/2] Second
This is the second commit.
---
- dir/sub | 2 ++
- file0 | 3 +++
- file2 | 3 ---
+ dir/sub | 2 ++
+ file0 | 3 +++
+ file2 (gone) | 3 ---
3 files changed, 5 insertions(+), 3 deletions(-)
delete mode 100644 file2
@@ -51,8 +51,8 @@ Date: Mon, 26 Jun 2006 00:02:00 +0000
Subject: [PATCH 2/2] Third
---
- dir/sub | 2 ++
- file1 | 3 +++
+ dir/sub | 2 ++
+ file1 (new) | 3 +++
2 files changed, 5 insertions(+)
create mode 100644 file1
diff --git a/t/t4013/diff.format-patch_--stdout_initial..side b/t/t4013/diff.format-patch_--stdout_initial..side
index a7d52fb..d8d9a1d 100644
--- a/t/t4013/diff.format-patch_--stdout_initial..side
+++ b/t/t4013/diff.format-patch_--stdout_initial..side
@@ -5,9 +5,9 @@ Date: Mon, 26 Jun 2006 00:03:00 +0000
Subject: [PATCH] Side
---
- dir/sub | 2 ++
- file0 | 3 +++
- file3 | 4 ++++
+ dir/sub | 2 ++
+ file0 | 3 +++
+ file3 (new) | 4 ++++
3 files changed, 9 insertions(+)
create mode 100644 file3
diff --git a/t/t4013/diff.log_--patch-with-stat_master b/t/t4013/diff.log_--patch-with-stat_master
index ae425c4..fd768ff 100644
--- a/t/t4013/diff.log_--patch-with-stat_master
+++ b/t/t4013/diff.log_--patch-with-stat_master
@@ -12,9 +12,9 @@ Date: Mon Jun 26 00:03:00 2006 +0000
Side
---
- dir/sub | 2 ++
- file0 | 3 +++
- file3 | 4 ++++
+ dir/sub | 2 ++
+ file0 | 3 +++
+ file3 (new) | 4 ++++
3 files changed, 9 insertions(+)
diff --git a/dir/sub b/dir/sub
@@ -54,8 +54,8 @@ Date: Mon Jun 26 00:02:00 2006 +0000
Third
---
- dir/sub | 2 ++
- file1 | 3 +++
+ dir/sub | 2 ++
+ file1 (new) | 3 +++
2 files changed, 5 insertions(+)
diff --git a/dir/sub b/dir/sub
@@ -86,9 +86,9 @@ Date: Mon Jun 26 00:01:00 2006 +0000
This is the second commit.
---
- dir/sub | 2 ++
- file0 | 3 +++
- file2 | 3 ---
+ dir/sub | 2 ++
+ file0 | 3 +++
+ file2 (gone) | 3 ---
3 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/dir/sub b/dir/sub
diff --git a/t/t4013/diff.log_--root_--cc_--patch-with-stat_--summary_master b/t/t4013/diff.log_--root_--cc_--patch-with-stat_--summary_master
index 0fc1e8c..372f0b3 100644
--- a/t/t4013/diff.log_--root_--cc_--patch-with-stat_--summary_master
+++ b/t/t4013/diff.log_--root_--cc_--patch-with-stat_--summary_master
@@ -44,9 +44,9 @@ Date: Mon Jun 26 00:03:00 2006 +0000
Side
---
- dir/sub | 2 ++
- file0 | 3 +++
- file3 | 4 ++++
+ dir/sub | 2 ++
+ file0 | 3 +++
+ file3 (new) | 4 ++++
3 files changed, 9 insertions(+)
create mode 100644 file3
@@ -87,8 +87,8 @@ Date: Mon Jun 26 00:02:00 2006 +0000
Third
---
- dir/sub | 2 ++
- file1 | 3 +++
+ dir/sub | 2 ++
+ file1 (new) | 3 +++
2 files changed, 5 insertions(+)
create mode 100644 file1
@@ -120,9 +120,9 @@ Date: Mon Jun 26 00:01:00 2006 +0000
This is the second commit.
---
- dir/sub | 2 ++
- file0 | 3 +++
- file2 | 3 ---
+ dir/sub | 2 ++
+ file0 | 3 +++
+ file2 (gone) | 3 ---
3 files changed, 5 insertions(+), 3 deletions(-)
delete mode 100644 file2
@@ -162,9 +162,9 @@ Date: Mon Jun 26 00:00:00 2006 +0000
Initial
---
- dir/sub | 2 ++
- file0 | 3 +++
- file2 | 3 +++
+ dir/sub (new) | 2 ++
+ file0 (new) | 3 +++
+ file2 (new) | 3 +++
3 files changed, 8 insertions(+)
create mode 100644 dir/sub
create mode 100644 file0
diff --git a/t/t4013/diff.log_--root_--patch-with-stat_--summary_master b/t/t4013/diff.log_--root_--patch-with-stat_--summary_master
index dffc09d..2c705a8 100644
--- a/t/t4013/diff.log_--root_--patch-with-stat_--summary_master
+++ b/t/t4013/diff.log_--root_--patch-with-stat_--summary_master
@@ -12,9 +12,9 @@ Date: Mon Jun 26 00:03:00 2006 +0000
Side
---
- dir/sub | 2 ++
- file0 | 3 +++
- file3 | 4 ++++
+ dir/sub | 2 ++
+ file0 | 3 +++
+ file3 (new) | 4 ++++
3 files changed, 9 insertions(+)
create mode 100644 file3
@@ -55,8 +55,8 @@ Date: Mon Jun 26 00:02:00 2006 +0000
Third
---
- dir/sub | 2 ++
- file1 | 3 +++
+ dir/sub | 2 ++
+ file1 (new) | 3 +++
2 files changed, 5 insertions(+)
create mode 100644 file1
@@ -88,9 +88,9 @@ Date: Mon Jun 26 00:01:00 2006 +0000
This is the second commit.
---
- dir/sub | 2 ++
- file0 | 3 +++
- file2 | 3 ---
+ dir/sub | 2 ++
+ file0 | 3 +++
+ file2 (gone) | 3 ---
3 files changed, 5 insertions(+), 3 deletions(-)
delete mode 100644 file2
@@ -130,9 +130,9 @@ Date: Mon Jun 26 00:00:00 2006 +0000
Initial
---
- dir/sub | 2 ++
- file0 | 3 +++
- file2 | 3 +++
+ dir/sub (new) | 2 ++
+ file0 (new) | 3 +++
+ file2 (new) | 3 +++
3 files changed, 8 insertions(+)
create mode 100644 dir/sub
create mode 100644 file0
diff --git a/t/t4013/diff.log_--root_--patch-with-stat_master b/t/t4013/diff.log_--root_--patch-with-stat_master
index 55aa980..a51f794 100644
--- a/t/t4013/diff.log_--root_--patch-with-stat_master
+++ b/t/t4013/diff.log_--root_--patch-with-stat_master
@@ -12,9 +12,9 @@ Date: Mon Jun 26 00:03:00 2006 +0000
Side
---
- dir/sub | 2 ++
- file0 | 3 +++
- file3 | 4 ++++
+ dir/sub | 2 ++
+ file0 | 3 +++
+ file3 (new) | 4 ++++
3 files changed, 9 insertions(+)
diff --git a/dir/sub b/dir/sub
@@ -54,8 +54,8 @@ Date: Mon Jun 26 00:02:00 2006 +0000
Third
---
- dir/sub | 2 ++
- file1 | 3 +++
+ dir/sub | 2 ++
+ file1 (new) | 3 +++
2 files changed, 5 insertions(+)
diff --git a/dir/sub b/dir/sub
@@ -86,9 +86,9 @@ Date: Mon Jun 26 00:01:00 2006 +0000
This is the second commit.
---
- dir/sub | 2 ++
- file0 | 3 +++
- file2 | 3 ---
+ dir/sub | 2 ++
+ file0 | 3 +++
+ file2 (gone) | 3 ---
3 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/dir/sub b/dir/sub
@@ -127,9 +127,9 @@ Date: Mon Jun 26 00:00:00 2006 +0000
Initial
---
- dir/sub | 2 ++
- file0 | 3 +++
- file2 | 3 +++
+ dir/sub (new) | 2 ++
+ file0 (new) | 3 +++
+ file2 (new) | 3 +++
3 files changed, 8 insertions(+)
diff --git a/dir/sub b/dir/sub
diff --git a/t/t4013/diff.log_--root_-c_--patch-with-stat_--summary_master b/t/t4013/diff.log_--root_-c_--patch-with-stat_--summary_master
index 019d85f..2588563 100644
--- a/t/t4013/diff.log_--root_-c_--patch-with-stat_--summary_master
+++ b/t/t4013/diff.log_--root_-c_--patch-with-stat_--summary_master
@@ -44,9 +44,9 @@ Date: Mon Jun 26 00:03:00 2006 +0000
Side
---
- dir/sub | 2 ++
- file0 | 3 +++
- file3 | 4 ++++
+ dir/sub | 2 ++
+ file0 | 3 +++
+ file3 (new) | 4 ++++
3 files changed, 9 insertions(+)
create mode 100644 file3
@@ -87,8 +87,8 @@ Date: Mon Jun 26 00:02:00 2006 +0000
Third
---
- dir/sub | 2 ++
- file1 | 3 +++
+ dir/sub | 2 ++
+ file1 (new) | 3 +++
2 files changed, 5 insertions(+)
create mode 100644 file1
@@ -120,9 +120,9 @@ Date: Mon Jun 26 00:01:00 2006 +0000
This is the second commit.
---
- dir/sub | 2 ++
- file0 | 3 +++
- file2 | 3 ---
+ dir/sub | 2 ++
+ file0 | 3 +++
+ file2 (gone) | 3 ---
3 files changed, 5 insertions(+), 3 deletions(-)
delete mode 100644 file2
@@ -162,9 +162,9 @@ Date: Mon Jun 26 00:00:00 2006 +0000
Initial
---
- dir/sub | 2 ++
- file0 | 3 +++
- file2 | 3 +++
+ dir/sub (new) | 2 ++
+ file0 (new) | 3 +++
+ file2 (new) | 3 +++
3 files changed, 8 insertions(+)
create mode 100644 dir/sub
create mode 100644 file0
diff --git a/t/t4013/diff.show_--patch-with-stat_--summary_side b/t/t4013/diff.show_--patch-with-stat_--summary_side
index 95a474e..4c83862 100644
--- a/t/t4013/diff.show_--patch-with-stat_--summary_side
+++ b/t/t4013/diff.show_--patch-with-stat_--summary_side
@@ -5,9 +5,9 @@ Date: Mon Jun 26 00:03:00 2006 +0000
Side
---
- dir/sub | 2 ++
- file0 | 3 +++
- file3 | 4 ++++
+ dir/sub | 2 ++
+ file0 | 3 +++
+ file3 (new) | 4 ++++
3 files changed, 9 insertions(+)
create mode 100644 file3
diff --git a/t/t4013/diff.show_--patch-with-stat_side b/t/t4013/diff.show_--patch-with-stat_side
index 974e99b..d021de9 100644
--- a/t/t4013/diff.show_--patch-with-stat_side
+++ b/t/t4013/diff.show_--patch-with-stat_side
@@ -5,9 +5,9 @@ Date: Mon Jun 26 00:03:00 2006 +0000
Side
---
- dir/sub | 2 ++
- file0 | 3 +++
- file3 | 4 ++++
+ dir/sub | 2 ++
+ file0 | 3 +++
+ file3 (new) | 4 ++++
3 files changed, 9 insertions(+)
diff --git a/dir/sub b/dir/sub
diff --git a/t/t4013/diff.show_--stat_--summary_side b/t/t4013/diff.show_--stat_--summary_side
index a71492f..8978cfa 100644
--- a/t/t4013/diff.show_--stat_--summary_side
+++ b/t/t4013/diff.show_--stat_--summary_side
@@ -5,9 +5,9 @@ Date: Mon Jun 26 00:03:00 2006 +0000
Side
- dir/sub | 2 ++
- file0 | 3 +++
- file3 | 4 ++++
+ dir/sub | 2 ++
+ file0 | 3 +++
+ file3 (new) | 4 ++++
3 files changed, 9 insertions(+)
create mode 100644 file3
$
diff --git a/t/t4013/diff.show_--stat_side b/t/t4013/diff.show_--stat_side
index 9be7124..60c2bb1 100644
--- a/t/t4013/diff.show_--stat_side
+++ b/t/t4013/diff.show_--stat_side
@@ -5,8 +5,8 @@ Date: Mon Jun 26 00:03:00 2006 +0000
Side
- dir/sub | 2 ++
- file0 | 3 +++
- file3 | 4 ++++
+ dir/sub | 2 ++
+ file0 | 3 +++
+ file3 (new) | 4 ++++
3 files changed, 9 insertions(+)
$
diff --git a/t/t4013/diff.whatchanged_--patch-with-stat_master b/t/t4013/diff.whatchanged_--patch-with-stat_master
index 1ac431b..298f1d9 100644
--- a/t/t4013/diff.whatchanged_--patch-with-stat_master
+++ b/t/t4013/diff.whatchanged_--patch-with-stat_master
@@ -5,9 +5,9 @@ Date: Mon Jun 26 00:03:00 2006 +0000
Side
---
- dir/sub | 2 ++
- file0 | 3 +++
- file3 | 4 ++++
+ dir/sub | 2 ++
+ file0 | 3 +++
+ file3 (new) | 4 ++++
3 files changed, 9 insertions(+)
diff --git a/dir/sub b/dir/sub
@@ -47,8 +47,8 @@ Date: Mon Jun 26 00:02:00 2006 +0000
Third
---
- dir/sub | 2 ++
- file1 | 3 +++
+ dir/sub | 2 ++
+ file1 (new) | 3 +++
2 files changed, 5 insertions(+)
diff --git a/dir/sub b/dir/sub
@@ -79,9 +79,9 @@ Date: Mon Jun 26 00:01:00 2006 +0000
This is the second commit.
---
- dir/sub | 2 ++
- file0 | 3 +++
- file2 | 3 ---
+ dir/sub | 2 ++
+ file0 | 3 +++
+ file2 (gone) | 3 ---
3 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/dir/sub b/dir/sub
diff --git a/t/t4013/diff.whatchanged_--root_--cc_--patch-with-stat_--summary_master b/t/t4013/diff.whatchanged_--root_--cc_--patch-with-stat_--summary_master
index 30aae78..70f4da6 100644
--- a/t/t4013/diff.whatchanged_--root_--cc_--patch-with-stat_--summary_master
+++ b/t/t4013/diff.whatchanged_--root_--cc_--patch-with-stat_--summary_master
@@ -44,9 +44,9 @@ Date: Mon Jun 26 00:03:00 2006 +0000
Side
---
- dir/sub | 2 ++
- file0 | 3 +++
- file3 | 4 ++++
+ dir/sub | 2 ++
+ file0 | 3 +++
+ file3 (new) | 4 ++++
3 files changed, 9 insertions(+)
create mode 100644 file3
@@ -87,8 +87,8 @@ Date: Mon Jun 26 00:02:00 2006 +0000
Third
---
- dir/sub | 2 ++
- file1 | 3 +++
+ dir/sub | 2 ++
+ file1 (new) | 3 +++
2 files changed, 5 insertions(+)
create mode 100644 file1
@@ -120,9 +120,9 @@ Date: Mon Jun 26 00:01:00 2006 +0000
This is the second commit.
---
- dir/sub | 2 ++
- file0 | 3 +++
- file2 | 3 ---
+ dir/sub | 2 ++
+ file0 | 3 +++
+ file2 (gone) | 3 ---
3 files changed, 5 insertions(+), 3 deletions(-)
delete mode 100644 file2
@@ -162,9 +162,9 @@ Date: Mon Jun 26 00:00:00 2006 +0000
Initial
---
- dir/sub | 2 ++
- file0 | 3 +++
- file2 | 3 +++
+ dir/sub (new) | 2 ++
+ file0 (new) | 3 +++
+ file2 (new) | 3 +++
3 files changed, 8 insertions(+)
create mode 100644 dir/sub
create mode 100644 file0
diff --git a/t/t4013/diff.whatchanged_--root_--patch-with-stat_--summary_master b/t/t4013/diff.whatchanged_--root_--patch-with-stat_--summary_master
index db90e51..6065050 100644
--- a/t/t4013/diff.whatchanged_--root_--patch-with-stat_--summary_master
+++ b/t/t4013/diff.whatchanged_--root_--patch-with-stat_--summary_master
@@ -5,9 +5,9 @@ Date: Mon Jun 26 00:03:00 2006 +0000
Side
---
- dir/sub | 2 ++
- file0 | 3 +++
- file3 | 4 ++++
+ dir/sub | 2 ++
+ file0 | 3 +++
+ file3 (new) | 4 ++++
3 files changed, 9 insertions(+)
create mode 100644 file3
@@ -48,8 +48,8 @@ Date: Mon Jun 26 00:02:00 2006 +0000
Third
---
- dir/sub | 2 ++
- file1 | 3 +++
+ dir/sub | 2 ++
+ file1 (new) | 3 +++
2 files changed, 5 insertions(+)
create mode 100644 file1
@@ -81,9 +81,9 @@ Date: Mon Jun 26 00:01:00 2006 +0000
This is the second commit.
---
- dir/sub | 2 ++
- file0 | 3 +++
- file2 | 3 ---
+ dir/sub | 2 ++
+ file0 | 3 +++
+ file2 (gone) | 3 ---
3 files changed, 5 insertions(+), 3 deletions(-)
delete mode 100644 file2
@@ -123,9 +123,9 @@ Date: Mon Jun 26 00:00:00 2006 +0000
Initial
---
- dir/sub | 2 ++
- file0 | 3 +++
- file2 | 3 +++
+ dir/sub (new) | 2 ++
+ file0 (new) | 3 +++
+ file2 (new) | 3 +++
3 files changed, 8 insertions(+)
create mode 100644 dir/sub
create mode 100644 file0
diff --git a/t/t4013/diff.whatchanged_--root_--patch-with-stat_master b/t/t4013/diff.whatchanged_--root_--patch-with-stat_master
index 9a6cc92..de03ba3 100644
--- a/t/t4013/diff.whatchanged_--root_--patch-with-stat_master
+++ b/t/t4013/diff.whatchanged_--root_--patch-with-stat_master
@@ -5,9 +5,9 @@ Date: Mon Jun 26 00:03:00 2006 +0000
Side
---
- dir/sub | 2 ++
- file0 | 3 +++
- file3 | 4 ++++
+ dir/sub | 2 ++
+ file0 | 3 +++
+ file3 (new) | 4 ++++
3 files changed, 9 insertions(+)
diff --git a/dir/sub b/dir/sub
@@ -47,8 +47,8 @@ Date: Mon Jun 26 00:02:00 2006 +0000
Third
---
- dir/sub | 2 ++
- file1 | 3 +++
+ dir/sub | 2 ++
+ file1 (new) | 3 +++
2 files changed, 5 insertions(+)
diff --git a/dir/sub b/dir/sub
@@ -79,9 +79,9 @@ Date: Mon Jun 26 00:01:00 2006 +0000
This is the second commit.
---
- dir/sub | 2 ++
- file0 | 3 +++
- file2 | 3 ---
+ dir/sub | 2 ++
+ file0 | 3 +++
+ file2 (gone) | 3 ---
3 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/dir/sub b/dir/sub
@@ -120,9 +120,9 @@ Date: Mon Jun 26 00:00:00 2006 +0000
Initial
---
- dir/sub | 2 ++
- file0 | 3 +++
- file2 | 3 +++
+ dir/sub (new) | 2 ++
+ file0 (new) | 3 +++
+ file2 (new) | 3 +++
3 files changed, 8 insertions(+)
diff --git a/dir/sub b/dir/sub
diff --git a/t/t4013/diff.whatchanged_--root_-c_--patch-with-stat_--summary_master b/t/t4013/diff.whatchanged_--root_-c_--patch-with-stat_--summary_master
index d1d32bd..772cfca 100644
--- a/t/t4013/diff.whatchanged_--root_-c_--patch-with-stat_--summary_master
+++ b/t/t4013/diff.whatchanged_--root_-c_--patch-with-stat_--summary_master
@@ -44,9 +44,9 @@ Date: Mon Jun 26 00:03:00 2006 +0000
Side
---
- dir/sub | 2 ++
- file0 | 3 +++
- file3 | 4 ++++
+ dir/sub | 2 ++
+ file0 | 3 +++
+ file3 (new) | 4 ++++
3 files changed, 9 insertions(+)
create mode 100644 file3
@@ -87,8 +87,8 @@ Date: Mon Jun 26 00:02:00 2006 +0000
Third
---
- dir/sub | 2 ++
- file1 | 3 +++
+ dir/sub | 2 ++
+ file1 (new) | 3 +++
2 files changed, 5 insertions(+)
create mode 100644 file1
@@ -120,9 +120,9 @@ Date: Mon Jun 26 00:01:00 2006 +0000
This is the second commit.
---
- dir/sub | 2 ++
- file0 | 3 +++
- file2 | 3 ---
+ dir/sub | 2 ++
+ file0 | 3 +++
+ file2 (gone) | 3 ---
3 files changed, 5 insertions(+), 3 deletions(-)
delete mode 100644 file2
@@ -162,9 +162,9 @@ Date: Mon Jun 26 00:00:00 2006 +0000
Initial
---
- dir/sub | 2 ++
- file0 | 3 +++
- file2 | 3 +++
+ dir/sub (new) | 2 ++
+ file0 (new) | 3 +++
+ file2 (new) | 3 +++
3 files changed, 8 insertions(+)
create mode 100644 dir/sub
create mode 100644 file0
diff --git a/t/t4045-diff-relative.sh b/t/t4045-diff-relative.sh
index 3950f50..e0f274d 100755
--- a/t/t4045-diff-relative.sh
+++ b/t/t4045-diff-relative.sh
@@ -44,7 +44,7 @@ test_expect_success "--numstat $*" "
check_stat() {
expect=$1; shift
cat >expected <<EOF
- $expect | 1 +
+ $expect (new) | 1 +
1 file changed, 1 insertion(+)
EOF
test_expect_success "--stat $*" "
diff --git a/t/t4049-diff-stat-count.sh b/t/t4049-diff-stat-count.sh
index 5b594e8..55bd81e 100755
--- a/t/t4049-diff-stat-count.sh
+++ b/t/t4049-diff-stat-count.sh
@@ -19,8 +19,8 @@ test_expect_success 'mode-only change show as a 0-line change' '
echo a >a &&
echo c >c &&
cat >expect <<-\EOF
- a | 1 +
- b | 0
+ a | 1 +
+ b (mode +x) | 0
...
4 files changed, 2 insertions(+)
EOF
diff --git a/t/t4052-stat-output.sh b/t/t4052-stat-output.sh
index b68afef..b0a5340 100755
--- a/t/t4052-stat-output.sh
+++ b/t/t4052-stat-output.sh
@@ -223,10 +223,10 @@ test_expect_success 'preparation for long filename tests' '
'
cat >expect <<'EOF'
- ...aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | 1000 ++++++++++++
+ ...aaaaaaaaaaaaaaaaaaaaaaaaaaaaa (new) | 1000 ++++++++++++
EOF
cat >expect-graph <<'EOF'
-| ...aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | 1000 ++++++++++++
+| ...aaaaaaaaaaaaaaaaaaaaaaaaaaaaa (new) | 1000 ++++++++++++
EOF
while read cmd args
do
@@ -251,16 +251,16 @@ log -1 --stat
EOF
cat >expect80 <<'EOF'
- ...aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | 1000 ++++++++++++++++++++
+ ...aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa (new) | 1000 ++++++++++++++++++++
EOF
cat >expect80-graph <<'EOF'
-| ...aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | 1000 ++++++++++++++++++++
+| ...aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa (new) | 1000 ++++++++++++++++++++
EOF
cat >expect200 <<'EOF'
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | 1000 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa (new) | 1000 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
EOF
cat >expect200-graph <<'EOF'
-| aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | 1000 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+| aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa (new) | 1000 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
EOF
while read verb expect cmd args
do
@@ -285,10 +285,10 @@ respects expect200 log -1 --stat
EOF
cat >expect1 <<'EOF'
- ...aaaaaaa | 1000 ++++++
+ ...a (new) | 1000 ++++++
EOF
cat >expect1-graph <<'EOF'
-| ...aaaaaaa | 1000 ++++++
+| ...a (new) | 1000 ++++++
EOF
while read verb expect cmd args
do
@@ -325,7 +325,7 @@ test_expect_success 'merge --stat respects COLUMNS (big change)' '
'
cat >expect <<'EOF'
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | 1000 +++++++++++++++++++++++++++++++++++++++
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa (new) | 1000 +++++++++++++++++++++++++++++++++
EOF
test_expect_success 'merge --stat respects COLUMNS (long filename)' '
COLUMNS=100 git merge --stat --no-ff master >output &&
diff --git a/t/t4202-log.sh b/t/t4202-log.sh
index fa686b8..26d2057 100755
--- a/t/t4202-log.sh
+++ b/t/t4202-log.sh
@@ -554,7 +554,7 @@ cat >expect <<\EOF
| |
| | reach
| | ---
-| | reach.t | 1 +
+| | reach.t (new) | 1 +
| | 1 file changed, 1 insertion(+)
| |
| | diff --git a/reach.t b/reach.t
@@ -577,7 +577,7 @@ cat >expect <<\EOF
| | |
| | | octopus-b
| | | ---
-| | | octopus-b.t | 1 +
+| | | octopus-b.t (new) | 1 +
| | | 1 file changed, 1 insertion(+)
| | |
| | | diff --git a/octopus-b.t b/octopus-b.t
@@ -593,7 +593,7 @@ cat >expect <<\EOF
| |
| | octopus-a
| | ---
-| | octopus-a.t | 1 +
+| | octopus-a.t (new) | 1 +
| | 1 file changed, 1 insertion(+)
| |
| | diff --git a/octopus-a.t b/octopus-a.t
@@ -609,7 +609,7 @@ cat >expect <<\EOF
|
| seventh
| ---
-| seventh.t | 1 +
+| seventh.t (new) | 1 +
| 1 file changed, 1 insertion(+)
|
| diff --git a/seventh.t b/seventh.t
@@ -643,7 +643,7 @@ cat >expect <<\EOF
| | | |
| | | | tangle-a
| | | | ---
-| | | | tangle-a | 1 +
+| | | | tangle-a (new) | 1 +
| | | | 1 file changed, 1 insertion(+)
| | | |
| | | | diff --git a/tangle-a b/tangle-a
@@ -665,7 +665,7 @@ cat >expect <<\EOF
| |/| |
| | | | side-2
| | | | ---
-| | | | 2 | 1 +
+| | | | 2 (new) | 1 +
| | | | 1 file changed, 1 insertion(+)
| | | |
| | | | diff --git a/2 b/2
@@ -681,7 +681,7 @@ cat >expect <<\EOF
| | | |
| | | | side-1
| | | | ---
-| | | | 1 | 1 +
+| | | | 1 (new) | 1 +
| | | | 1 file changed, 1 insertion(+)
| | | |
| | | | diff --git a/1 b/1
@@ -697,7 +697,7 @@ cat >expect <<\EOF
| | | |
| | | | Second
| | | | ---
-| | | | one | 1 +
+| | | | one (new) | 1 +
| | | | 1 file changed, 1 insertion(+)
| | | |
| | | | diff --git a/one b/one
@@ -713,7 +713,7 @@ cat >expect <<\EOF
|/| |
| | | sixth
| | | ---
-| | | a/two | 1 -
+| | | a/two (gone) | 1 -
| | | 1 file changed, 1 deletion(-)
| | |
| | | diff --git a/a/two b/a/two
@@ -729,7 +729,7 @@ cat >expect <<\EOF
| | |
| | | fifth
| | | ---
-| | | a/two | 1 +
+| | | a/two (new) | 1 +
| | | 1 file changed, 1 insertion(+)
| | |
| | | diff --git a/a/two b/a/two
@@ -745,7 +745,7 @@ cat >expect <<\EOF
| |
| | fourth
| | ---
-| | ein | 1 +
+| | ein (new) | 1 +
| | 1 file changed, 1 insertion(+)
| |
| | diff --git a/ein b/ein
@@ -761,8 +761,8 @@ cat >expect <<\EOF
|
| third
| ---
-| ichi | 1 +
-| one | 1 -
+| ichi (new) | 1 +
+| one (gone) | 1 -
| 2 files changed, 1 insertion(+), 1 deletion(-)
|
| diff --git a/ichi b/ichi
@@ -801,7 +801,7 @@ cat >expect <<\EOF
initial
---
- one | 1 +
+ one (new) | 1 +
1 file changed, 1 insertion(+)
diff --git a/one b/one
diff --git a/t/t7602-merge-octopus-many.sh b/t/t7602-merge-octopus-many.sh
index 955f09f..d383b50 100755
--- a/t/t7602-merge-octopus-many.sh
+++ b/t/t7602-merge-octopus-many.sh
@@ -54,9 +54,9 @@ Trying simple merge with c2
Trying simple merge with c3
Trying simple merge with c4
Merge made by the 'octopus' strategy.
- c2.c | 1 +
- c3.c | 1 +
- c4.c | 1 +
+ c2.c (new) | 1 +
+ c3.c (new) | 1 +
+ c4.c (new) | 1 +
3 files changed, 3 insertions(+)
create mode 100644 c2.c
create mode 100644 c3.c
@@ -71,7 +71,7 @@ test_expect_success 'merge output uses pretty names' '
cat >expected <<\EOF
Merge made by the 'recursive' strategy.
- c5.c | 1 +
+ c5.c (new) | 1 +
1 file changed, 1 insertion(+)
create mode 100644 c5.c
EOF
@@ -85,8 +85,8 @@ cat >expected <<\EOF
Fast-forwarding to: c1
Trying simple merge with c2
Merge made by the 'octopus' strategy.
- c1.c | 1 +
- c2.c | 1 +
+ c1.c (new) | 1 +
+ c2.c (new) | 1 +
2 files changed, 2 insertions(+)
create mode 100644 c1.c
create mode 100644 c2.c
--
1.8.0.rc2.23.g1fb49df
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox