{"thread":{"id":"2606","subject":"cg-commit doesn't like new repository","startedAt":"2005-11-19T22:43:10Z","lastAt":"2005-11-27T14:20:05Z","messageCount":2,"participants":["Alan Chandler","Petr Baudis"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"12344","messageId":"200511192243.10815.alan@chandlerfamily.org.uk","threadId":"2606","inReplyTo":null,"subject":"cg-commit doesn't like new repository","fromName":"Alan Chandler","fromEmail":"alan@chandlerfamily.org.uk","sentAt":"2005-11-19T22:43:10Z","receivedAt":"2005-11-19T22:43:10Z","isPatch":false,"sender":{"key":"alan@chandlerfamily.org.uk","avatar":"https://gravatar.com/avatar/1862247e5ea8eac114c842f9dc3a5db6253754e24ef7171757cf97eedce48b8c?d=mp&s=160"},"body":"I just decided to make a repository of /etc, but because I didn't want to load \nin all the files, I used git-init-db to create the repository rather than \ncg-init-db\n\nI then did cg-add for fstab\n\nfollowed up by cg-commit which then failed as shown below\n\nAs soon as I have done a git-commit, all is OK, and cg-commit works again.\n\nI presume there is something that cg-init-db does which makes it suitable for \ncogito - but what, and shouldn't cg-commit notice and either do it \nautomatically or give a different error message?\n\n\ncg-commit\nusage: git-diff-index [-m] [--cached] [<common diff options>] <tree-ish> \n[<path>...]\ncommon diff options:\n  -z            output diff-raw with lines terminated with NUL.\n  -p            output patch format.\n  -u            synonym for -p.\n  --name-only   show only names of changed files.\n  --name-status show names and status of changed files.\n  -R            swap input file pairs.\n  -B            detect complete rewrites.\n  -M            detect renames.\n  -C            detect copies.\n  --find-copies-harder\n                try unchanged files as candidate for copy detection.\n  -l<n>         limit rename attempts up to <n> paths.\n  -O<file>      reorder diffs according to the <file>.\n  -S<string>    find filepair whose only one side contains the string.\n  --pickaxe-all\n                show all files diff when -S is used and hit is found.\n\ncg-commit: Nothing to commit\nroot@kanger etc[master]#                                            \n-- \nAlan Chandler\nhttp://www.chandlerfamily.org.uk\nOpen Source. It's the difference between trust and antitrust.\n"},{"id":"12798","messageId":"20051127142005.GG22159@pasky.or.cz","threadId":"2606","inReplyTo":"200511192243.10815.alan@chandlerfamily.org.uk","subject":"Re: cg-commit doesn't like new repository","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2005-11-27T14:20:05Z","receivedAt":"2005-11-27T14:20:05Z","isPatch":false,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Dear diary, on Sat, Nov 19, 2005 at 11:43:10PM CET, I got a letter\nwhere Alan Chandler <alan@chandlerfamily.org.uk> said that...\n> I just decided to make a repository of /etc, but because I didn't want to load \n> in all the files, I used git-init-db to create the repository rather than \n> cg-init-db\n\ncg-init -I ? Its help message would also explain to you how to make the\ninitial commit manually. ;-)\n\n> I presume there is something that cg-init-db does which makes it suitable for \n> cogito - but what\n\ncg-commit will try to determine the list of files to commit by diffing\nagainst the previous commit, but there is no previous commit. You need\nto pass cg-commit the -C option in order to make the initial commit.\n\n> and shouldn't cg-commit notice and either do it automatically or give\n> a different error message?\n\nGood point. cg-commit will now print out friendly error message and\nsuggest you to use -C.\n\nThanks,\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nStuff: http://pasky.or.cz/\nVI has two modes: the one in which it beeps and the one in which\nit doesn't.\n"}]}