From: Jonathan Nieder <jrnieder@gmail.com>
To: Brad King <brad.king@kitware.com>
Cc: git@vger.kernel.org, gitster@pobox.com, newren@gmail.com
Subject: Re: [PATCH/RFC 1/3] t3030-merge-recursive: Test known breakage with empty work tree
Date: Fri, 24 Jan 2014 08:51:12 -0800 [thread overview]
Message-ID: <20140124165112.GK18964@google.com> (raw)
In-Reply-To: <bee33fbfe83408a69085d58db302b3e72edf16a4.1390574981.git.brad.king@kitware.com>
Hi,
Brad King wrote:
> Add test cases that use 'merge-recursive' plumbing with a temporary
> index and empty work tree. Populate the index using 'read-tree' and
> 'update-index --ignore-missing --refresh' to prepare for merge without
> actually checking all files out to disk. Verify that each merge
> produces its expected tree while displaying no error diagnostics.
Following my usual review practice of lazy reading for the sake of
readers in the future who might be in a hurry, it's not clear what
problem these tests are solving or trying to detect. Could you start
with a quick summary of the symptoms and when it came up?
The commit message doesn't need to paraphrase the actual code, since
anyone curious about the details can always look at the code. It's
more important to explain the motivation and intended effect so people
can understand what went wrong if something ends up being broken by a
later patch.
> This approach can be used to compute tree merges while checking out only
> conflicting files to disk (which is useful for server-side scripts).
> Prior to commit 5b448b85 (merge-recursive: When we detect we can skip an
> update, actually skip it, 2011-08-11) this worked cleanly in all cases.
Do you mean something like the following?
Sometimes when working with a large repository it can be useful to
try out a merge and only check out conflicting files to disk (for
example as a speed optimization on a server). Until v1.7.7-rc1~28^2~20
(merge-recursive: When we detect we can skip an update, actually
skip it, 2011-08-11), it was possible to do so with the following
idiom:
... summary of commands here ...
Nowadays, that still works and the exit status is the same,
but merge-recursive produces a diagnostic if "our" side renamed
a file:
error: addinfo_cache failed for path 'dst'
Add a test to document this regression.
[...]
> +++ b/t/t3030-merge-recursive.sh
[...]
> @@ -517,6 +518,52 @@ test_expect_success 'reset and bind merge' '
>
> '
>
> +test_expect_failure 'merge-recursive w/ empty work tree - ours has rename' '
> + (
> + GIT_WORK_TREE="$PWD/ours-has-rename-work" &&
Elsewhere in the test, commands in a subshell are indented by another
tab, so these new tests should probably follow suit. As a side
effect, that makes the indentation easier to see.
Hope that helps,
Jonathan
next prev parent reply other threads:[~2014-01-24 16:51 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CABPp-BGAsrrjcZxVirzKU_VEyUM1U=4TFj18CieKKE7==c7v2A@mail.gmail.com>
2014-01-24 15:01 ` [PATCH/RFC 0/3] merge-recursive: Avoid diagnostic on empty work tree Brad King
2014-01-24 15:01 ` [PATCH/RFC 1/3] t3030-merge-recursive: Test known breakage with " Brad King
2014-01-24 16:51 ` Jonathan Nieder [this message]
2014-01-24 17:50 ` Brad King
2014-01-24 15:01 ` [PATCH/RFC 2/3] read-cache.c: Thread lstat error through make_cache_entry signature Brad King
2014-01-24 15:01 ` [PATCH/RFC 3/3] merge-recursive: Tolerate missing file when HEAD is up to date Brad King
[not found] ` <CABPp-BEK9+_ebRiodCp59DHJZExYn3N1jjtBsikSmwt-s_v_0A@mail.gmail.com>
2014-01-24 19:37 ` Fwd: " newren
2014-01-24 19:45 ` Brad King
2014-01-24 19:50 ` Junio C Hamano
2014-01-24 20:02 ` Brad King
2014-01-24 20:10 ` [PATCH v2 0/3] merge-recursive: Avoid diagnostic on empty work tree Brad King
2014-01-24 20:10 ` [PATCH v2 1/3] t3030-merge-recursive: Test known breakage with " Brad King
2014-01-24 20:10 ` [PATCH v2 2/3] read-cache.c: Optionally tolerate missing files in make_cache_entry Brad King
2014-01-24 20:39 ` Junio C Hamano
2014-01-24 20:10 ` [PATCH v2 3/3] merge-recursive.c: Tolerate missing files while refreshing index Brad King
2014-01-27 14:45 ` [PATCH v3 0/3] merge-recursive: Avoid diagnostic on empty work tree Brad King
2014-01-27 14:45 ` [PATCH v3 1/4] t3030-merge-recursive: Test known breakage with " Brad King
2014-01-27 14:45 ` [PATCH v3 2/4] read-cache.c: Refactor --ignore-missing implementation Brad King
2014-01-27 17:39 ` Junio C Hamano
2014-01-27 14:45 ` [PATCH v3 3/4] read-cache.c: Extend make_cache_entry refresh flag with options Brad King
2014-01-27 14:45 ` [PATCH v3 4/4] merge-recursive.c: Tolerate missing files while refreshing index Brad King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140124165112.GK18964@google.com \
--to=jrnieder@gmail.com \
--cc=brad.king@kitware.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=newren@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).