[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
- Re: wrap-search 3.3.5, tomas, 2022/09/01
- Re: wrap-search 3.3.5, Gregory Heytings, 2022/09/01
- Re: wrap-search 3.3.5, Emanuel Berg, 2022/09/01
- Re: wrap-search 3.3.5, Gregory Heytings, 2022/09/01
- Re: wrap-search 3.3.5, Emanuel Berg, 2022/09/01
- Re: wrap-search 3.3.5, Gregory Heytings, 2022/09/01
- Re: wrap-search 3.3.5, Emanuel Berg, 2022/09/01
- Re: wrap-search 3.3.5, Gregory Heytings, 2022/09/01
- Re: wrap-search 3.3.5,
Emanuel Berg <=
- Re: wrap-search 3.3.5, Yuri Khan, 2022/09/02
- Re: wrap-search 3.3.5, Gregory Heytings, 2022/09/02
- Re: wrap-search 3.3.5, Emanuel Berg, 2022/09/02