All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yaroslav Halchenko <yoh@onerussian.com>
To: git@vger.kernel.org
Subject: git submodule add  spits unrelated to actual problem error msg about .gitignore
Date: Wed, 14 Sep 2016 10:03:18 -0400	[thread overview]
Message-ID: <20160914140318.GB9833@onerussian.com> (raw)
In-Reply-To: <20160909221942.GS9830@onerussian.com>

I have spent some time chasing the wild goose (well - the .gitignore
file) after getting:

    $> git-submodule add --name fcx-1 ./fcx-1/ ./fcx-1/
    The following path is ignored by one of your .gitignore files:
    fcx-1
    Use -f if you really want to add it.

long story short -- the culprit is this piece of code in git-submodule:

    if test -z "$force" && ! git add --dry-run --ignore-missing "$sm_path" > /dev/null 2>&1
    then
        eval_gettextln "The following path is ignored by one of your .gitignore files:
\$sm_path
Use -f if you really want to add it." >&2
        exit 1
    fi


so if anything goes wrong in git add, it just reports  this error
message.

FTR -- actual problem in my case was:

    $> git add --dry-run --ignore-missing fcx-1
    fatal: Unable to create '/mnt/datasets/datalad/crawl/crcns/.git/index.lock': File exists.

    Another git process seems to be running in this repository, e.g.
    an editor opened by 'git commit'. Please make sure all processes
    are terminated then try again. If it still fails, a git process
    may have crashed in this repository earlier:
    remove the file manually to continue.

;-)

Cheers!
P.S. Please CC me in replies
-- 
Yaroslav O. Halchenko
Center for Open Neuroscience     http://centerforopenneuroscience.org
Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755
Phone: +1 (603) 646-9834                       Fax: +1 (603) 646-1419
WWW:   http://www.linkedin.com/in/yarik        

  parent reply	other threads:[~2016-09-14 14:03 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-09 22:19 git clone http:// fails some times with "Request for d53.. aborted" Yaroslav Halchenko
2016-09-10  0:21 ` Eric Wong
2016-09-13  0:25 ` [RFC 0/3] http: avoid repeatedly adding curl easy to curlm Eric Wong
2016-09-13  0:25   ` [RFC 1/3] http: warn on curl_multi_add_handle failures Eric Wong
2016-09-13  0:25   ` [RFC 2/3] http: consolidate #ifdefs for curl_multi_remove_handle Eric Wong
2016-09-13  0:25   ` [RFC 3/3] http: always remove curl easy from curlm session on release Eric Wong
2016-09-13 20:32   ` [RFC 0/3] http: avoid repeatedly adding curl easy to curlm Junio C Hamano
2016-09-21 21:46     ` [PATCH 4/3] http: check curl_multi_remove_handle error code Eric Wong
2016-09-21 22:22       ` Jeff King
2016-09-21 22:29         ` Eric Wong
2016-09-21 22:31           ` Jeff King
2016-09-14 11:59   ` [RFC 0/3] http: avoid repeatedly adding curl easy to curlm Yaroslav Halchenko
2016-09-14 14:03 ` Yaroslav Halchenko [this message]
2016-09-14 19:32   ` git submodule add spits unrelated to actual problem error msg about .gitignore Stefan Beller
2016-09-14 20:23     ` Yaroslav Halchenko

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=20160914140318.GB9833@onerussian.com \
    --to=yoh@onerussian.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.