From mboxrd@z Thu Jan 1 00:00:00 1970 From: dexen deVries To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Date: Thu, 19 Apr 2012 14:10:51 +0200 Message-ID: <11062559.g3nL0L32eo@coil> User-Agent: KMail/4.8.2 (Linux/3.4.0-rc3-l44; KDE/4.8.2; x86_64; ; ) In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [9fans] git and (p9p) acme Topicbox-Message-UUID: 78755e10-ead7-11e9-9d60-3106f5b1d025 hi list, On Thursday 19 of April 2012 13:51:40 Mathieu Lonjaret wrote: > Is anyone using git with p9p acme set as the editor? i have the following in ~dexen/.profile export VISUAL=E if [ "$DISPLAY" ]; then nohup plumber /dev/null 2>/dev/null & fi plus a few custom rules in ~dexen/lib/plumbing to deal with PHP's `FILE on line LINE' convention in error messages etc. > Most things here work fine (as long as the pager is set to cat or > something like that), but I've been having problems with 'git commit > --amend'. If I use B as the $EDITOR, git considers the log file edited > as soon as it is opened in acme (and does not wait for a Put), and if > I use E instead (which I thought was meant for that), git does not > "notice" when I Put the file, so it just hangs there. > Am I missing something? is there a simple solution to that? i use `git gui' for commits, but had similar problem with `git rebase -i'. git did not notice change in file when i merely re-ordered commits, cause the total length stays the same, and mtime somehow doesn't get listed by `ls -l'. git notices change of file when the editor exit()s. E has a simple loop around `ls -l $1' to detect file change; exit()s when it notices change in ls' output. if you have strange output of `ls', E may not notice change. a possible workaround is to change length of the file -- add something in the comment (hashed-out) section of commit message. in case of `git rebase -i', change `edit' to `e'. or re-implement E, really. caveat: using VISUAL=E with git, be wary of saving the file several times; the first Put will cause git to go ahead and subsequent changes to file will most likely be ignored. cheers, -- dexen deVries Weightless and alone you speed through the eerie nothingness of space you circle 'round the Moon and journey back to face the punishing torment of re-entry -- LUNA-C, ``Supaset8 (full release)'', #24m52s