Thread (3 messages) flat view 3 messages, 2 authors, 2016-06-15

Re: [Cogito] Various bugs

From: Jonas Fonseca <hidden>
Date: 2016-06-15 22:42:18
Subsystem: the rest · Maintainer: Linus Torvalds

Petr Baudis [off-list ref] wrote Tue, Feb 07, 2006:
Dear diary, on Tue, Jan 31, 2006 at 05:13:18AM CET, I got a letter
where Jonas Fonseca [off-list ref] said that...
quoted
A few Cogito bugs I found yesterday.

 - cg-fetch between local repos fails when the cloned branch URL does
   not point to a .git directory and a needed object from the repository
   being cloned is packed. git-local-fetch expects a .git directory.
Can't reproduce and I don't buy it. The very first line of local fetch
handler is

	[ -d "$uri/.git" ] && uri="$uri/.git"
I cannot reproduce it either and my strace file is long gone thanks to
cg-clean. Come to think of it it might have been caused by a pack file
not following the more strict name rules which recently was introduced
in GIT.
quoted
 - cg-status reports a deleted file both as deleted and as unknown:

	fonseca@antimatter:~/src/elinks/0.12 > git --version
	git version 1.1.6.g1506
	fonseca@antimatter:~/src/elinks/0.12 > cg --version
	cogito-0.17pre.GIT (d3aa9a2b3375e36c774ea477492db76baa1db03e)
	fonseca@antimatter:~/src/elinks/0.12 > cg rm AUTHORS
	Removing file AUTHORS
	fonseca@antimatter:~/src/elinks/0.12 > cg status | grep AUTHORS
	? AUTHORS
	D AUTHORS
This is fine, I'd say. The file was not deleted from the tree, either do
that manually by rm or say cg-rm -f.
Yes, I guess you are right, this is a special case. But I think it needs
to be noted that this is 'normal'. Something like this vague patch
signed-off-by me.
diff --git a/cg-status b/cg-status
index 6abc52f..d38c61f 100755
--- a/cg-status
+++ b/cg-status
@@ -21,12 +21,12 @@
 # D::
 #	'<file>' has been deleted.
 # !::
-#	'<file>' is gone from your working copy but not deleted by cg-rm.
+#	'<file>' is gone from your working copy but not deleted by `cg-rm`.
 # M::
 #	'<file>' has been touched or modified.
 # m::
 #	'<file>' has been touched or modified, but will not be automatically
-#	committed the next time you call cg-commit. This is used during a
+#	committed the next time you call `cg-commit`. This is used during a
 #	merge to mark files which contained local changes before the merge.
 #
 # OPTIONS
@@ -55,6 +55,14 @@
 #	Path to the directory to use as the base for the working tree
 #	file list (instead of the current directory).
 #
+# NOTES
+# -----
+# If a file has been removed with `cg-rm` without using the `-f` option
+# to remove it physically from the tree it will be reported as both being
+# deleted and unknown. The reason for this is that the file is internally
+# marked as deleted and thus also untracked. After next commit it will only
+# be reported as being untracked.
+#
 # FILES
 # -----
 # $GIT_DIR/info/exclude::
-- 
Jonas Fonseca
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help