On Mon, Dec 1, 2014 at 12:55 AM, Torsten Bögershausen tbo...@web.de wrote:
On 12/01/2014 04:40 AM, David Michael wrote:
On Sun, Nov 30, 2014 at 3:16 PM, Torsten Bögershausen tbo...@web.de
wrote:
[snip]
Could the code be more human-readable ?
static inline mode_t mode_native_to_git(mode_t
On Sun, Nov 30, 2014 at 9:41 AM, David Michael fedora@gmail.com wrote:
+int git_stat(const char *path, struct stat *buf)
+{
+ int rc;
+ rc = stat(path, buf);
+ if (buf != NULL)
It's a minor thing, but maybe test !rc instead of buf != NULL?
+ buf-st_mode
On Mon, Dec 1, 2014 at 7:48 AM, David Michael fedora@gmail.com wrote:
On Mon, Dec 1, 2014 at 12:55 AM, Torsten Bögershausen tbo...@web.de wrote:
On 12/01/2014 04:40 AM, David Michael wrote:
On Sun, Nov 30, 2014 at 3:16 PM, Torsten Bögershausen tbo...@web.de
wrote:
[snip]
Could the code
On Mon, Dec 1, 2014 at 9:44 AM, Duy Nguyen pclo...@gmail.com wrote:
On Sun, Nov 30, 2014 at 9:41 AM, David Michael fedora@gmail.com wrote:
+int git_stat(const char *path, struct stat *buf)
+{
+ int rc;
+ rc = stat(path, buf);
+ if (buf != NULL)
It's a minor thing, but
David Michael fedora@gmail.com writes:
On Mon, Dec 1, 2014 at 9:44 AM, Duy Nguyen pclo...@gmail.com wrote:
On Sun, Nov 30, 2014 at 9:41 AM, David Michael fedora@gmail.com wrote:
+int git_stat(const char *path, struct stat *buf)
+{
+ int rc;
+ rc = stat(path, buf);
+
On Mon, Dec 1, 2014 at 12:57 PM, Junio C Hamano gits...@pobox.com wrote:
David Michael fedora@gmail.com writes:
On Mon, Dec 1, 2014 at 9:44 AM, Duy Nguyen pclo...@gmail.com wrote:
On Sun, Nov 30, 2014 at 9:41 AM, David Michael fedora@gmail.com wrote:
+int git_stat(const char *path,
David Michael fedora@gmail.com writes:
Huh? I am confused. Since when is it legal to give NULL as statbuf
to (l)stat(2)?
Wouldn't something like this be sufficient and necessary?
int rc = stat(path, buf);
if (rc)
return rc;
That is, let the
On 2014-11-30 03.41, David Michael wrote:
Some minor comments:
+static inline mode_t mode_native_to_git(mode_t native_mode)
+{
+ if (S_ISREG(native_mode))
+ return 010 | (native_mode 0);
+ else if (S_ISDIR(native_mode))
+ return 004 | (native_mode
David Michael fedora@gmail.com writes:
This is my most recent attempt at solving the problem of z/OS using
different file type values than every other OS. I believe it should be
safe as long as the file type bits don't ever need to be converted back
to their native values (and I didn't
On Sun, Nov 30, 2014 at 3:16 PM, Torsten Bögershausen tbo...@web.de wrote:
[snip]
Could the code be more human-readable ?
static inline mode_t mode_native_to_git(mode_t native_mode)
{
int perm_bits = native_mode 0;
if (S_ISREG(native_mode))
return 010
On 12/01/2014 04:40 AM, David Michael wrote:
On Sun, Nov 30, 2014 at 3:16 PM, Torsten Bögershausen tbo...@web.de wrote:
[snip]
Could the code be more human-readable ?
static inline mode_t mode_native_to_git(mode_t native_mode)
{
int perm_bits = native_mode 0;
if
11 matches
Mail list logo