[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: single-command git commits

From: Eric Abrahamsen
Subject: Re: single-command git commits
Date: Mon, 18 Jul 2016 20:44:14 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

Emanuel Berg <address@hidden> writes:

> Eric Abrahamsen <eric(a)>
> 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!


reply via email to

[Prev in Thread] Current Thread [Next in Thread]