Git development
 help / color / mirror / Atom feed
From: Eugene Surovegin <ebs@ebshome.net>
To: git@vger.kernel.org
Subject: [PATCH] fix cg-commit new file handling
Date: Tue, 7 Jun 2005 22:59:42 -0700	[thread overview]
Message-ID: <20050608055942.GA7151@gate.ebshome.net> (raw)

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?



                 reply	other threads:[~2005-06-08  5:55 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050608055942.GA7151@gate.ebshome.net \
    --to=ebs@ebshome.net \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox