Git development
 help / color / mirror / Atom feed
* [PATCH] fix cg-commit new file handling
@ 2005-06-08  5:59 Eugene Surovegin
  0 siblings, 0 replies; only message in thread
From: Eugene Surovegin @ 2005-06-08  5:59 UTC (permalink / raw)
  To: git

Hi!

There is a problem with committing new files with the current cogito 
version.

I got an error like this: 
  fatal: Unable to add arch/ppc/kernel/dcr.S to database

I think this is caused by the incorrect file list parsing in 
cg-commit precommit_update(): it expects new files prefixed with "A", 
while they are prefixed with "N".

The following trivial patch fixes this.

Signed-off-by: Eugene Surovegin <ebs@ebshome.net>

diff --git a/cg-commit b/cg-commit
--- a/cg-commit
+++ b/cg-commit
@@ -227,7 +227,7 @@ precommit_update () {
 	for file in "$@"; do
 		op=${file%% *}
 		fname=${file#* }
-		[ "$op" = "A" ] || [ "$op" = "D" ] || [ "$op" = "M" ] || op=M
+		[ "$op" = "N" ] || [ "$op" = "D" ] || [ "$op" = "M" ] || op=M
 		eval "queue$op[\${#queue$op[@]}]=\"\$fname\""
 	done
 	# XXX: Do we even need to do the --add and --remove update-caches?



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-06-08  5:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-08  5:59 [PATCH] fix cg-commit new file handling Eugene Surovegin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox