git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: GIt error

From
KKKonstantin Khomoutov <kostix+git@007spb.ru>
Date
Jun 17, 2013, 13:47 UTC
Message-ID
<20130617174707.0c44a25130ec28baca9f3e61@domain007.com>
In-Reply-To
<E7FBE41B36DC254CB796CE1D6D45B14A0FAE034D@048-CH1MPN1-032.048d.mgd.msft.net>

On Mon, 17 Jun 2013 13:28:30 +0000 <justin.sathyanathan@accenture.com> wrote:

> For Below issue , O/S is Windows7.
[...]
> 1.Iam getting error attached when cloning of repository is done:
What error?
Show 8 quoted lines
> 2.Also, when file is tried to be added,it gives error below:
> 
> $ git add *
> fatal: unable to stat
> 'src/development_architecture/integration_application_proj
> ect_template/provider_archetype/provider_archetype/src/main/resources/archetype-
> resources/__rootArtifactId__-data/src/main/java/com/accenture/afpj/sample/skelet
> on/visitor/data/VisitorRepositoryJpaImpl.java': Filename too long
[...]

This is a limitation of Git for Windows: the standard Windows API which works with unmangled filenames limits their length to 260 characters while your particular entry is 262 characters long.

AFAIK, there's no clean/easy way to make use of "extended" Windows API which requires mangling filenames by adding the "\\?\" to them.

You could read [1] for more details.
So it seems you have two options for now:
* Restructure the project.
* Use Git under Cygwin [2] which might not have this limitation
  (personally, I do not know whether it does).
P.S.
Please next time you ask consider doing two things:
* If you post your message to several groups, take care to mention this
  fact in each of them.
* Do not require anyone to do anything "ASAP" unless this claim is
  backed by your or your employer's wallet.
1. http://msdn.microsoft.com/en-us/library/aa365247#maxpath
2. http://cygwin.com/packages/git/
Previous: Fredrik GustafssonNext: Konstantin Khomoutov
Message 3 of 4 in “RE: GIt error”
  1. justin.sathyanathan@accenture.comJun 17, 2013
  2. Fredrik GustafssonJun 17, 2013
  3. Konstantin KhomoutovJun 17, 2013
  4. Konstantin KhomoutovJun 17, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.