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 >/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


Reply via email to