Re: [PATCH] Make git prune remove temporary packs that look like write failures

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

 



On Feb 6, 2008 4:48 PM, Brandon Casey <casey@xxxxxxxxxxxxxxx> wrote:
> I also suggest taking a look at the functions in builtin-prune-packed.c to see
> how similar functions are implemented there.
>
> Use strlcpy instead of sprintf.
> Use prefixcmp instead of strncmp.
> Use same messages as prune_dir() for show_only path and unlink failure.
> You could also check the opendir call and print a suitable message on failure.

All the other path creation in builtin-prune.c is using sprintf; is
doing 3 strlcpy's much better? (I backed off from using snprintf when
the other element in the if that tested it vanished; I probably ought
to put that back.) I'll use prefixcmp and check the opendir call
(although if get_object_directory() doesn't return something sensible
presumably bigger problems are in the mix.)

-- 
cheers, dave tweed__________________________
david.tweed@xxxxxxxxx
Rm 124, School of Systems Engineering, University of Reading.
"while having code so boring anyone can maintain it, use Python." --
attempted insult seen on slashdot
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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