From: Junio C Hamano <gitster@pobox.com>
To: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Cc: git@vger.kernel.org, Kacper Kornet <kornet@camk.edu.pl>
Subject: Re: [PATCH] fetch-pack: do not remove .git/shallow file when --depth is not specified
Date: Sun, 25 Aug 2013 23:09:30 -0700 [thread overview]
Message-ID: <xmqqk3j9j84l.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <1377483446-24834-1-git-send-email-pclouds@gmail.com> ("Nguyễn Thái Ngọc Duy"'s message of "Mon, 26 Aug 2013 09:17:26 +0700")
Nguyễn Thái Ngọc Duy <pclouds@gmail.com> writes:
> > The two possible fixes which I see are:
> >
> > 1) Replace back if (alternate_shallow_file) condition in fetch pack with
> > if (args->depth > 0)
> >
> > 2) alternate_shallow_file should be copy of shallow_lock.filename not a
> > reference to it
>
> 3) Move alternate_shallow_file to struct fetch_pack_args, which will
> always be zero'd by memset
>
> I think #1 is better. It's the original condition before 6035d6a
> replaces it with "if (alternate_shallow_file)". Apparently I did not
> see that fetch_pack() could be called twice. #3 is also an option,
> but we still need static "shallow_lock" anyway, so I disregarded it.
Thanks.
prev parent reply other threads:[~2013-08-26 6:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-26 0:22 [BUG] Shallow fetch can result in broken git repo Kacper Kornet
2013-08-26 2:17 ` [PATCH] fetch-pack: do not remove .git/shallow file when --depth is not specified Nguyễn Thái Ngọc Duy
2013-08-26 6:09 ` 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=xmqqk3j9j84l.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=kornet@camk.edu.pl \
--cc=pclouds@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.