Subject: [PATCH v2 0/2] Teach read-tree the -n|--dry-run option

From: Jens Lehmann <[email-masked]>
Date: Wed, 25 May 2011 22:06:54 +0200

Am 25.05.2011 01:18, schrieb Junio C Hamano:
> Jens Lehmann <[email-masked]> writes:
>> My "Teach read-tree the -n|--dry-run option" adapted to this new flag
>> runs all tests successfully ...
>>
>>
>>  unpack-trees.c |    4 ++--
>>  unpack-trees.h |    3 ++-
>>  2 files changed, 4 insertions(+), 3 deletions(-)
> 
> But on which change does this come?

As a preparing step for "read-tree the -n|--dry-run" (and adding
a dry-run option to other users of unpack_trees() should be pretty
straightforward now too).

The first patch in this series enables unpack_trees() to do a dry-run.
That enables users of unpack_trees() to see if running this function
with the update flag set would succeed.

The second patch uses this new dry_run flag to teach read-tree the
-n|--dry-run option.

Jens Lehmann (2):
  unpack-trees: add the dry_run flag to unpack_trees_options
  Teach read-tree the -n|--dry-run option

 Documentation/git-read-tree.txt      |    5 ++
 builtin/read-tree.c                  |    3 +-
 t/lib-read-tree.sh                   |   43 ++++++++++++++++++
 t/t1000-read-tree-m-3way.sh          |   81 +++++++++++++++++-----------------
 t/t1001-read-tree-m-2way.sh          |   45 ++++++++++---------
 t/t1002-read-tree-m-u-2way.sh        |   81 +++++++++++++++++-----------------
 t/t1004-read-tree-m-u-wf.sh          |   23 +++++-----
 t/t1005-read-tree-reset.sh           |   13 +++---
 t/t1008-read-tree-overlay.sh         |    3 +-
 t/t1011-read-tree-sparse-checkout.sh |   27 ++++++-----
 t/t1012-read-tree-df.sh              |    9 ++--
 t/t1020-subdirectory.sh              |    5 +-
 unpack-trees.c                       |    4 +-
 unpack-trees.h                       |    3 +-
 14 files changed, 202 insertions(+), 143 deletions(-)
 create mode 100644 t/lib-read-tree.sh

-- 
1.7.5.2.355.gdceb0