Re: [PATCH v4 24/27] prune: strategies for linked checkouts

2014-03-05 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy pclo...@gmail.com writes: + if (get_device_or_die(path) != get_device_or_die(get_git_dir())) { + strbuf_reset(sb); + strbuf_addf(sb, %s/locked, sb_repo.buf); + write_file(sb.buf, 1, located on a different file system\n); +

[PATCH v4 24/27] prune: strategies for linked checkouts

2014-03-01 Thread Nguyễn Thái Ngọc Duy
(alias R=$GIT_COMMON_DIR/repos/id) - linked checkouts are supposed to keep its location in $R/gitdir up to date. The use case is auto fixup after a manual checkout move. - linked checkouts are supposed to update mtime of $R/gitdir. If $R/gitdir's mtime is older than a limit, and it

Re: [PATCH v4 24/27] prune: strategies for linked checkouts

2014-03-01 Thread Torsten Bögershausen
On 2014-03-01 13.13, Nguyễn Thái Ngọc Duy wrote: [] +static dev_t get_device_or_die(const char *path) +{ + struct stat buf; + if (stat(path, buf)) + die_errno(failed to stat '%s', path); + /* Ah Windows! Make different drives different partitions */ + if

Re: [PATCH v4 24/27] prune: strategies for linked checkouts

2014-03-01 Thread Duy Nguyen
On Sun, Mar 2, 2014 at 12:12 AM, Torsten Bögershausen tbo...@web.de wrote: On 2014-03-01 13.13, Nguyễn Thái Ngọc Duy wrote: [] +static dev_t get_device_or_die(const char *path) +{ + struct stat buf; + if (stat(path, buf)) + die_errno(failed to stat '%s', path); +