git/list[1] front-page[2] threads[3] people[4] search[5] about
 

checking action of git-pull

From
MRMark Ryden <markryde@gmail.com>
Date
Dec 7, 2008, 08:23 UTC
Message-ID
<dac45060812070023h7f6a6c86ve2e4ba9f1773f03f@mail.gmail.com>
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

Next: Junio C Hamano
Message 1 of 2 in “checking action of git-pull”
  1. Mark RydenDec 7, 2008
  2. Junio C HamanoDec 7, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.