From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Abrahamsen Subject: Re: [OT] Git plus Syncthing: breaking hard links Date: Wed, 06 Apr 2016 14:41:10 +0800 Message-ID: <87pou38cjd.fsf@ericabrahamsen.net> References: <87h9fgbm2j.fsf@ericabrahamsen.net> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43937) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1anh9Y-0003vQ-RR for emacs-orgmode@gnu.org; Wed, 06 Apr 2016 02:41:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1anh9V-0001Lu-Ix for emacs-orgmode@gnu.org; Wed, 06 Apr 2016 02:41:24 -0400 Received: from plane.gmane.org ([80.91.229.3]:37335) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1anh9V-0001Lq-CU for emacs-orgmode@gnu.org; Wed, 06 Apr 2016 02:41:21 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1anh9S-0005D4-VX for emacs-orgmode@gnu.org; Wed, 06 Apr 2016 08:41:19 +0200 Received: from 114.248.29.184 ([114.248.29.184]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 06 Apr 2016 08:41:18 +0200 Received: from eric by 114.248.29.184 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 06 Apr 2016 08:41:18 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Tim Howes writes: > To avoid data loss, Syncthing creates a temporary file during transfer > with the name ~syncthing~.{filename}.tmp > > If the transfer completes successfully, then it moves that file in place > of the previous version. It's a new inode, not an update of the previous > inode, so the hard link will be lost. Ugh, that's what I was starting to suspect. > Instead of using hard links, you could share your git repo folder > directly using Syncthing, but use an .stignore file to exclude the files > that you want to keep private (such as the .git directory). Luckily you're right -- it isn't all that hard to work around. I'm currently using one git repo to manage both my work-related *and* personal Org files, and there's no particular reason to be doing that. I'll split the repos, keep the work one in the Syncthing folder, and sidestep the problem altogether. Thanks to all who responded! Eric