Re: [PATCH v3 3/6] Make the require_clean_work_tree() function reusable

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

 



Johannes Schindelin <johannes.schindelin@xxxxxx> writes:

> It is remarkable that libgit.a did not sport this function yet... Let's
> move it into a more prominent (and into an actually reusable) spot:
> wt-status.[ch].
>
> Signed-off-by: Johannes Schindelin <johannes.schindelin@xxxxxx>
> ---

Thanks.

I'd tweak the message while queuing, though.

    wt-status: make the require_clean_work_tree() function reusable
    
    The function "git pull" uses to stop the user when the working
    tree has changes is useful in other places.
    
    Let's move it into a more prominent (and into an actually reusable)
    spot: wt-status.[ch].
    
    Signed-off-by: Johannes Schindelin <johannes.schindelin@xxxxxx>
    Signed-off-by: Junio C Hamano <gitster@xxxxxxxxx>

Readers won't care whether you found something remarkable and even
if they wanted to care, it is rather hard to sympathize with you
unless they know what "this function" does well enough to understand
why it is a good thing to make it available more widely.  That is a
more important point to address in the log message.

> diff --git a/wt-status.c b/wt-status.c
> index 9628c1d..b92c54d 100644
> --- a/wt-status.c
> +++ b/wt-status.c
> @@ -16,6 +16,7 @@
>  #include "strbuf.h"
>  #include "utf8.h"
>  #include "worktree.h"
> +#include "lockfile.h"

Makes sense.  We'd be opportunistically refreshing the index.




[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]