Re: [RFC PATCH 1/6] DO NOT MERGE: compute commit-graph on every commit

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

 



On Thu, May 31, 2018 at 10:41 AM, Derrick Stolee <dstolee@xxxxxxxxxxxxx> wrote:
> Also enable core.commitGraph and gc.commitGraph. Helps to test the
> commit-graph feature with the rest of the test infrastructure.
>
> Signed-off-by: Derrick Stolee <dstolee@xxxxxxxxxxxxx>
> ---
>  builtin/commit.c | 5 +++++
>  builtin/gc.c     | 2 +-
>  environment.c    | 2 +-
>  3 files changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/builtin/commit.c b/builtin/commit.c
> index e8e8d13be4..8751b816c1 100644
> --- a/builtin/commit.c
> +++ b/builtin/commit.c
> @@ -32,6 +32,7 @@
>  #include "column.h"
>  #include "sequencer.h"
>  #include "mailmap.h"
> +#include "commit-graph.h"
>
>  static const char * const builtin_commit_usage[] = {
>         N_("git commit [<options>] [--] <pathspec>..."),
> @@ -1623,5 +1624,9 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
>
>         UNLEAK(err);
>         UNLEAK(sb);
> +
> +       if (core_commit_graph)
> +               write_commit_graph_reachable(get_object_directory(), 1);
> +

I'd personally put it before the UNLEAKS, as then
we have the cleanup at the end of the function and
not scattered somewhere in the middle.



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

  Powered by Linux