Git development
 help / color / mirror / Atom feed
From: Nico -telmich- Schottelius <nico-linux-git@schottelius.org>
To: Git ML <git@vger.kernel.org>
Subject: strange cg-add problem
Date: Tue, 22 Nov 2005 13:30:58 +0100	[thread overview]
Message-ID: <20051122123058.GB19989@schottelius.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 2526 bytes --]

Hello!

I try to backup a MySQLDump and put it into git so we have easy access
to diffs and can have a real history.

The problem I have is that it works perfectly, when running manually,
but when running in the script git refuses to use the file:

----------------------------------------------------------------------
srwali01:/home/server/backup/db# ~/db-dump.sh 
/home/server/backup/db//2005-11-22/13:26 does not exist or is not a regular file
cg-add: warning: not all files could be added
cg-commit: Nothing to commit
----------------------------------------------------------------------
(The script can be found at [0].)

When I do that on the command line, this happens:

----------------------------------------------------------------------
srwali01:/home/server/backup/db# cg-add /home/server/backup/db//2005-11-22/13:26
Adding file /home/server/backup/db//2005-11-22/13:26
Ignoring path /home/server/backup/db//2005-11-22/13:26
srwali01:/home/server/backup/db# cg-commit -m "Backup vom 2005-11-22 um 13:26"
cg-commit: Nothing to commit
----------------------------------------------------------------------

When I add it with a relative path it works:
----------------------------------------------------------------------
Adding file 2005-11-22/13:26
srwali01:/home/server/backup/db# cg-commit -m "Backup vom 2005-11-22 um 13:26"
A 2005-11-22/13:26
Committed as 3086174c1c84ce598137062867c07a4b7c619c39.
----------------------------------------------------------------------

When I change it in the script to be relativeo
[( cd "$DDIR"; cg-add "$SUBDIR/$FILENAME"; cg-commit -m "Backup vom $SUBDIR um $FILENAME") ]
than the same happens:

----------------------------------------------------------------------
srwali01:~# ./db-dump.sh 
2005-11-22/13:31 does not exist or is not a regular file
cg-add: warning: not all files could be added
cg-commit: Nothing to commit
----------------------------------------------------------------------

Any hint why it behaves differently in script and command line?

Btw, does someone know, why mysqldump does just one insert and a very very long line
and not many inserts with only one value? The bevahiour of it seems to have changed,
as mysqldump did that in earlier releases [sorry bit offtopic].

Greetings,

Nico


[0]: http://linux.schottelius.org/scripts/#db-dump+git.sh

-- 
Latest project: cinit-0.2.1 (http://linux.schottelius.org/cinit/)
Open Source nutures open minds and free, creative developers.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 827 bytes --]

             reply	other threads:[~2005-11-22 12:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-22 12:30 Nico -telmich- Schottelius [this message]
2005-11-22 16:55 ` strange cg-add problem Junio C Hamano
2005-11-27 13:08   ` Petr Baudis

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=20051122123058.GB19989@schottelius.org \
    --to=nico-linux-git@schottelius.org \
    --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