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

Re: Commiting automatically

From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Date
Oct 10, 2010, 21:11 UTC
Message-ID
<vpqzkulah2w.fsf@bauges.imag.fr>
In-Reply-To
<loom.20101010T212207-709@post.gmane.org>
Maaartin <grajcar1@seznam.cz> writes:
> # the first parent should be autocom
> parent1="-p $(git show-ref -s refs/heads/autocom)"
> # needed for the very first use
> test -f .git/refs/heads/autocom || parent1=""

Don't use the content of .git/refs/ directly. Git can pack them, and you can have a branch autocom packed in .git/info/refs without having it in .git/refs/*

perhaps
parent1=$(git show-ref -s refs/heads/autocom)
if [ "$parent1" != "" ]; then
	parent1="-p $parent1"
fi
?
-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Previous: Maaartin
Message 5 of 5 in “Commiting automatically”
  1. MaaartinSep 24, 2010
  2. Ramkumar RamachandraSep 25, 2010
  3. Alex RiesenSep 25, 2010
  4. MaaartinOct 10, 2010
  5. Matthieu MoyOct 10, 2010

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.