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

cogito: cannot add dangling symlinks whereas git can

From
Gerrit Pape <pape@smarden.org>
Date
Jan 2, 2006, 12:15 UTC
Message-ID
<20060102120912.13409.qmail@c3aed7b85ae352.315fe32.mid.smarden.org>

forwarded 313596 upstream quit

Hi, cg-add refuses to add special files such as dangling symlinks while git can handle them just fine. Please see http://bugs.debian.org/313596

I'm not sure why cg-add checks files to commit with test -f.
Regards, Gerrit.
---
diff --git a/cg-add b/cg-add
index 33cdc7f..382f8d5 100755
--- a/cg-add
+++ b/cg-add
@@ -61,9 +61,6 @@ for file in "${ARGS[@]}"; do
 			echo "$file is a directory (use cg-add -r?)" >&2
 			error=1
 		fi
-	elif [ ! -f "$absfile" ]; then
-		echo "$file does not exist or is not a regular file" >&2
-		error=1
 	else
 		echo "$file" >>"$TMPFILE"
 	fi
Next: Petr Baudis
Message 1 of 2 in “cogito: cannot add dangling symlinks whereas git can”
  1. Gerrit PapeJan 2, 2006
  2. Petr BaudisFeb 7, 2006

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.