Re: [PATCH 13/16] repack: consider bitmaps when performing repacks

2013-06-25 Thread Vicent Martí
On Wed, Jun 26, 2013 at 1:00 AM, Junio C Hamano  wrote:
>> @@ -156,6 +156,11 @@ do
>>   fullbases="$fullbases pack-$name"
>>   chmod a-w "$PACKTMP-$name.pack"
>>   chmod a-w "$PACKTMP-$name.idx"
>> +
>> + test -f "$PACKTMP-$name.bitmap" &&
>> + chmod a-w "$PACKTMP-$name.bitmap" &&
>> + mv -f "$PACKTMP-$name.bitmap" "$PACKDIR/pack-$name.bitmap"
>
> If we see a temporary bitmap but somehow failed to move it to the
> final name, should we _ignore_ that error, or should we die, like
> the next two lines do?

I obviously decided against dying (as you can see on the patch, har
har), because the bitmap is not required for the proper operation of
the Git repository, unlike the packfile and the index.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 13/16] repack: consider bitmaps when performing repacks

2013-06-25 Thread Junio C Hamano
Vicent Marti  writes:

> @@ -156,6 +156,11 @@ do
>   fullbases="$fullbases pack-$name"
>   chmod a-w "$PACKTMP-$name.pack"
>   chmod a-w "$PACKTMP-$name.idx"
> +
> + test -f "$PACKTMP-$name.bitmap" &&
> + chmod a-w "$PACKTMP-$name.bitmap" &&
> + mv -f "$PACKTMP-$name.bitmap" "$PACKDIR/pack-$name.bitmap"

If we see a temporary bitmap but somehow failed to move it to the
final name, should we _ignore_ that error, or should we die, like
the next two lines do?

>   mv -f "$PACKTMP-$name.pack" "$PACKDIR/pack-$name.pack" &&
>   mv -f "$PACKTMP-$name.idx"  "$PACKDIR/pack-$name.idx" ||
>   exit
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html