From: Junio C Hamano <gitster@pobox•com>
To: Johannes Sixt <j6t@kdbg•org>
Cc: git@vger•kernel.org
Subject: Re: [PATCH] clone: --dissociate option to mark that reference is only temporary
Date: Wed, 15 Oct 2014 14:33:59 -0700 [thread overview]
Message-ID: <xmqqoatduiew.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <543ECE88.7050703@kdbg.org> (Johannes Sixt's message of "Wed, 15 Oct 2014 21:44:08 +0200")
Johannes Sixt <j6t@kdbg•org> writes:
> Unless you have a secret plan, you can do it even shorter with our
> helpers:
Thanks. No there isn't a secret plan. It was just me being rusty.
>
> diff --git a/builtin/clone.c b/builtin/clone.c
> index 8649090..81efb07 100644
> --- a/builtin/clone.c
> +++ b/builtin/clone.c
> @@ -743,14 +743,9 @@ static void write_refspec_config(const char *src_ref_prefix,
>
> static void dissociate_from_references(void)
> {
> - struct child_process cmd;
> -
> - memset(&cmd, 0, sizeof(cmd));
> - argv_array_pushl(&cmd.args, "repack", "-a", "-d", NULL);
> - cmd.git_cmd = 1;
> - cmd.out = -1;
> - cmd.no_stdin = 1;
> - if (run_command(&cmd))
> + static const char* argv[] = { "repack", "-a", "-d", NULL };
> +
> + if (run_command_v_opt(argv, RUN_GIT_CMD|RUN_COMMAND_NO_STDIN))
> die(_("cannot repack to clean up"));
> if (unlink(git_path("objects/info/alternates")) && errno != ENOENT)
> die_errno(_("cannot unlink temporary alternates file"));
prev parent reply other threads:[~2014-10-15 21:34 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-14 19:57 [PATCH] clone: --dissociate option to mark that reference is only temporary Junio C Hamano
2014-10-15 14:34 ` Marc Branchaud
2014-10-15 17:29 ` Junio C Hamano
2014-10-15 20:51 ` Marc Branchaud
2014-10-15 21:33 ` Junio C Hamano
2014-10-15 21:44 ` Marc Branchaud
2014-10-15 21:50 ` Junio C Hamano
2014-10-16 15:26 ` Marc Branchaud
2014-10-17 12:47 ` Jakub Narębski
2014-10-16 19:27 ` Junio C Hamano
2014-10-15 19:44 ` Johannes Sixt
2014-10-15 21:33 ` Junio C Hamano [this message]
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=xmqqoatduiew.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=j6t@kdbg$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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