all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: help-gnu-emacs@gnu.org
Subject: Re: single-command git commits
Date: Mon, 18 Jul 2016 20:44:14 -0400	[thread overview]
Message-ID: <87a8he8nj5.fsf@ericabrahamsen.net> (raw)
In-Reply-To: 86r3aq5uvn.fsf@student.uu.se

Emanuel Berg <embe8573@student.uu.se> writes:

> Eric Abrahamsen <eric(a)ericabrahamsen.net>
> writes:
>
>> I'm working on a long document in
>> a single-file git repository (I know there
>> are probably better solutions). What I'd like
>> to do is have a single command that prompts
>> me for a git commit message, and then
>> commits. The in-Emacs equivalent of:
>>
>> git commit -a -m "(read-string \"Commit
>> message: \")"
>
> (defun git-commit (msg)
>   (interactive "sCommit message: ")
>   (shell-command
>    (format "git commit -a -m %s" msg) ))

Yes, when I said "I could probably write a shell script..." that was
meant to include "or `shell-command'" (this is where I start backing out
of my free beer promise). I'd like to use the highest-level vc function
available to me, ideally something above the level of git-awareness!

E




  reply	other threads:[~2016-07-19  0:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.1664.1468886830.26859.help-gnu-emacs@gnu.org>
2016-07-19  0:33 ` single-command git commits Emanuel Berg
2016-07-19  0:44   ` Eric Abrahamsen [this message]
2016-07-19  0:54     ` Dmitry Gutov
2016-07-19  1:02       ` Eric Abrahamsen
     [not found]     ` <mailman.1667.1468889678.26859.help-gnu-emacs@gnu.org>
2016-07-19  1:04       ` Emanuel Berg
     [not found]   ` <mailman.1666.1468889079.26859.help-gnu-emacs@gnu.org>
2016-07-19  1:00     ` Emanuel Berg
2016-07-19  0:06 Eric Abrahamsen

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=87a8he8nj5.fsf@ericabrahamsen.net \
    --to=eric@ericabrahamsen.net \
    --cc=help-gnu-emacs@gnu.org \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.