9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: dexen deVries <dexen.devries@gmail.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] git and (p9p) acme
Date: Thu, 19 Apr 2012 14:10:51 +0200	[thread overview]
Message-ID: <11062559.g3nL0L32eo@coil> (raw)
In-Reply-To: <CAHcDtn=bMeocNQsyY_U92r5+7i1RNDEBDqaUuqZXs_sT26Y+yw@mail.gmail.com>

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	other threads:[~2012-04-19 12:10 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-19 11:51 Mathieu Lonjaret
2012-04-19 12:10 ` dexen deVries [this message]
2012-04-19 12:16   ` [9fans] " Aram Hăvărneanu
2012-04-19 12:12 ` Aram Hăvărneanu
2012-04-20 16:04 ` sqweek
2012-04-20 17:07   ` Mathieu Lonjaret
2012-04-20 19:39     ` Mark van Atten
2012-04-20 20:48       ` Mathieu Lonjaret
2012-04-25 20:21         ` Russ Cox
2012-04-25 20:30           ` [9fans] " Lyndon Nerenberg
2012-04-25 20:36             ` Russ Cox
2012-04-25 20:46               ` Lyndon Nerenberg
2012-04-25 20:51                 ` John Floren
2012-04-25 20:57                   ` Lyndon Nerenberg
2012-04-25 20:58                     ` Russ Cox
2012-04-25 21:01                       ` Lyndon Nerenberg
2012-04-25 20:56                 ` Russ Cox
2012-04-25 20:59                   ` Lyndon Nerenberg
2012-04-25 21:02                     ` Russ Cox
2012-04-25 21:04                       ` Lyndon Nerenberg
2012-04-25 21:05                       ` Lyndon Nerenberg
2012-04-25 21:06                         ` Russ Cox
2012-04-25 21:35           ` Mathieu Lonjaret
2012-04-25 21:44             ` [9fans] " Aram Hăvărneanu
2012-04-25 21:49               ` Aram Hăvărneanu
2012-04-25 22:35                 ` Mathieu Lonjaret
2012-04-26  3:32             ` Russ Cox
2012-04-26  8:05               ` [9fans] " Rob Pike
2012-04-26 22:20               ` Mathieu Lonjaret
2012-04-27 11:48                 ` Ethan Burns
2012-04-27 11:52                 ` Ethan Burns
2012-06-14 12:51                 ` Mathieu Lonjaret
2012-04-26  8:43             ` [9fans] " dexen deVries
2012-04-27 16:15 ` Christian Neukirchen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=11062559.g3nL0L32eo@coil \
    --to=dexen.devries@gmail.com \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).