emacs-devel
[Top][All Lists]
Advanced

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

Re: wrap-search 3.3.5


From: Emanuel Berg
Subject: Re: wrap-search 3.3.5
Date: Fri, 02 Sep 2022 00:20:42 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Gregory Heytings wrote:

> git diff --quiet --exit-code
>
> or
>
> git diff-index --quiet HEAD
>
> Both commands return 1 if there are changes, and 0
> otherwise. So you can make your "git commit && git push"
> conditional to that return value.

OK, works!

#! /bin/zsh

git diff -q --exit-code
if [[ $? == 1 ]]; then
  git commit -a -m "$(date)"
  git push -q
fi

46 lines locally!
<https://dataswamp.org/~incal/conf/.zsh/git>

31 lines at the server.

wrap-search.el is 106 lines so the ratio is 0.72 :)
<https://dataswamp.org/~incal/emacs-init/wrap-search.el>

-- 
underground experts united
https://dataswamp.org/~incal




reply via email to

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