git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Mark Ryden" <markryde@gmail.com>
To: git@vger.kernel.org
Subject: checking action of git-pull
Date: Sun, 7 Dec 2008 10:23:18 +0200	[thread overview]
Message-ID: <dac45060812070023h7f6a6c86ve2e4ba9f1773f03f@mail.gmail.com> (raw)

Hello,
  I am working against a git repository which is updated at non regular
intervals; sometimes it takes a day and sometimes a week or two.

I have a script in crontab which runs daily which tries "git pull" of
this repository.

I want write a bash script which echoes yhe  result of this git pull
to a log file in such
a way that in case that any files were pulled, a short message
saying "files were pulled at date ddmmyyyy" will be added to a log file.
In case that there there were no changes, a message saying
"Already up-to-date (ddmmyyyy) will be added to a log file.

How can it be done ?
can I test somehow the return value of git pull in a bash script for
these two different
cases?

Regards,
Mark

             reply	other threads:[~2008-12-07  8:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-07  8:23 Mark Ryden [this message]
2008-12-07 10:51 ` checking action of git-pull Junio C Hamano

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=dac45060812070023h7f6a6c86ve2e4ba9f1773f03f@mail.gmail.com \
    --to=markryde@gmail.com \
    --cc=git@vger.kernel.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.
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).