public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox•com>
To: Jeff King <peff@peff•net>
Cc: Johannes Schindelin <Johannes.Schindelin@gmx•de>,
	Lars Schneider <larsxschneider@gmail•com>,
	git <git@vger•kernel.org>
Subject: Re: What's cooking in git.git (Jan 2017, #04; Mon, 23)
Date: Wed, 25 Jan 2017 10:16:40 -0800	[thread overview]
Message-ID: <xmqq4m0nc8dz.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <20170125173958.pg546a6w33dirp5k@sigill.intra.peff.net> (Jeff King's message of "Wed, 25 Jan 2017 12:39:58 -0500")

Jeff King <peff@peff•net> writes:

> On Wed, Jan 25, 2017 at 06:01:11PM +0100, Johannes Schindelin wrote:
>
>> > Looks like "mv" prompts and then fails to move the file (so we get the
>> > dangling blob for the source blob, and fsck doesn't report failure
>> > because we didn't actually corrupt the destination blob).
>> 
>> IIRC I had similar problems years ago, on a machine where the
>> administrator defined mandatory aliases, including mv="mv -i".
>
> Yeah, that was my first thought, too. But this should be a
> non-interactive shell, which would generally avoid loading rc files. I
> think there are some exceptions, though (e.g., setting ENV or BASH_ENV).
> Loading aliases like "mv -i" for non-interactive shells seems somewhat
> insane to me. 

It does to me, too.

> But whatever the cause, I think the workaround I posted is
> easy enough to do.

Or spelling it explicitly as "/bin/mv" (forgetting systems that does
not have it in /bin but as /usr/bin/mv) would also defeat alias if
that were the cause.

One downside of working it around like your patch does, or spelling
it out as "/bin/mv", is that we'd need to worry about all the uses
of "mv" in our scripts.  If this were _only_ happening in the Travis
environment, I'd prefer to see why it happens only there and fix that
instead.


  reply	other threads:[~2017-01-25 18:16 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-24  0:18 What's cooking in git.git (Jan 2017, #04; Mon, 23) Junio C Hamano
2017-01-24 10:04 ` Lars Schneider
2017-01-24 13:27   ` Jeff King
2017-01-24 14:43     ` Lars Schneider
2017-01-25 17:01     ` Johannes Schindelin
2017-01-25 17:39       ` Jeff King
2017-01-25 18:16         ` Junio C Hamano [this message]
2017-01-25 18:39           ` Jeff King
2017-01-25 22:51             ` Junio C Hamano
2017-01-26  9:14               ` Lars Schneider
2017-01-26  9:48                 ` Lars Schneider
2017-01-26 14:26                   ` Jeff King
2017-01-26 18:05                 ` Junio C Hamano
2017-01-25 18:38 ` Stefan Beller
2017-01-25 20:35   ` Junio C Hamano

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=xmqq4m0nc8dz.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox$(echo .)com \
    --cc=Johannes.Schindelin@gmx$(echo .)de \
    --cc=git@vger$(echo .)kernel.org \
    --cc=larsxschneider@gmail$(echo .)com \
    --cc=peff@peff$(echo .)net \
    /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