Re: [PATCH v2 1/2] unpack-trees: add the dry_run flag to unpack_trees_options

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jens Lehmann <Jens.Lehmann@xxxxxx> writes:

> Until now there was no way to test if unpack_trees() with update=1 would
> succeed without really updating the work tree. The reason for that is that
> setting update to 0 does skip the tests for new files and deactivates the
> sparse handling, thereby making that unsuitable as a dry run.
>
> Add the new dry_run flag to struct unpack_trees_options unpack_trees().
> Setting that together with the update flag will check if the work tree
> update would be successful without doing it for real.
>
> The only class of problems that is not detected at the moment are file
> system conditions like ENOSPC or missing permissions. Also the index
> entries of updated files are not as they would be after a real checkout
> because lstat() isn't run as the files aren't updated for real.
>
> Signed-off-by: Jens Lehmann <Jens.Lehmann@xxxxxx>
> ---

Looks good.  remove_marked_cache_entries() does not touch the working
tree, and because you are not calling unlink_entry(), you won't trigger
schedule_dir_for_removal() hence remove_scheduled_dirs() won't cause us
any trouble either.

Will queue.  Thanks.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]