Git development
 help / color / mirror / Atom feed
* Bug? file at the same time being deleted and not registered
@ 2010-05-23 21:09 Tomas Pospisek
  2010-05-23 23:44 ` Jeff King
  0 siblings, 1 reply; 9+ messages in thread
From: Tomas Pospisek @ 2010-05-23 21:09 UTC (permalink / raw)
  To: git

[-- Attachment #1: Type: TEXT/PLAIN, Size: 2680 bytes --]

(I'm not subscribed, so please in case do Cc: me)

Short version:
==============

  $ # we're on a mhddfs backed filesystem here, that doesn't support hardlinks
  $ mkdir bar
  $ cd bar/
  $ git init
  Initialized empty Git repository in /mnt/mhddfs/tmp/bar/.git/

  $ touch a_file
  $ git add a_file
  $ git commit a_file -m bla
  [master (root-commit) ca0ce50] bla
   0 files changed, 0 insertions(+), 0 deletions(-)
   create mode 100644 a_file

  $ git status
  # On branch master
  # Changes to be committed:
  #   (use "git reset HEAD <file>..." to unstage)
  #
  #       deleted:    a_file
  #
  # Untracked files:
  #   (use "git add <file>..." to include in what will be committed)
  #
  #       a_file

So we have a file that was committed, that git thinks it's scheduled to be
deleted and at the same time is untracked. Doesn't make any sense, does 
it?

This happens only on the mhddfs backed filesystem. The same procedure 
works well in /tmp or on plain ext3.

Here's the strace of the commit step (from a identical try):

    http://pastebin.com/htUmWYGh

Jan 'jast' Krüger from the git IRC channel spotted in that strace the fact 
that the 'link' call is failing.

In that case IMHO git should complain and let the user know, that 
something went wrong and it can't proceed meaningfully.


Long version:
=============

  $ mkdir bar
  $ cd bar/
  $ ls -la
  total 8
  drwxr-xr-x 2 foo foo 4096 2010-05-23 22:51 .
  drwxr-xr-x 2 tpo tpo 4096 2010-05-13 19:27 ..

  $ git init
  Initialized empty Git repository in /mnt/mhddfs/tmp/bar/.git/

  $ git status
  # On branch master
  #
  # Initial commit
  #
  nothing to commit (create/copy files and use "git add" to track)

  $ touch a_file
  $ git status
  # On branch master
  #
  # Initial commit
  #
  # Untracked files:
  #   (use "git add <file>..." to include in what will be committed)
  #
  #       a_file
  nothing added to commit but untracked files present (use "git add" to
  track)

  $ git add a_file
  $ git status
  # On branch master
  #
  # Initial commit
  #
  # Changes to be committed:
  #   (use "git rm --cached <file>..." to unstage)
  #
  #       new file:   a_file
  #

  $ git commit a_file -m bla
  [master (root-commit) ca0ce50] bla
   0 files changed, 0 insertions(+), 0 deletions(-)
   create mode 100644 a_file

  $ git status
  # On branch master
  # Changes to be committed:
  #   (use "git reset HEAD <file>..." to unstage)
  #
  #       deleted:    a_file
  #
  # Untracked files:
  #   (use "git add <file>..." to include in what will be committed)
  #
  #       a_file

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2010-05-24 14:47 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-23 21:09 Bug? file at the same time being deleted and not registered Tomas Pospisek
2010-05-23 23:44 ` Jeff King
2010-05-24  8:02   ` Tomas Pospisek
2010-05-24  8:24     ` Jeff King
2010-05-24  8:29       ` Tomas Pospisek
2010-05-24  8:49         ` Jeff King
2010-05-24  9:26           ` Tomas Pospisek
2010-05-24 10:32           ` Tomas Pospisek
2010-05-24 14:46             ` Tomas Pospisek

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