Stream: committers/git-help
Topic: Help with pull
Grahame Grieve (Mar 04 2019 at 19:47):
Here's an error I've got from git, cloning https://github.com/Healthedata1/IG-Template2:
error: Untracked working tree file 'c:\temp\json.json' would be overwritten by merge.
what on earth is going on here? can a git project overwrite files outside the project? How can I trust git?
Grahame Grieve (Mar 11 2019 at 10:32):
@Josh Mandel ping
Josh Mandel (Mar 11 2019 at 15:08):
This doesn't make sense to me -- the working tree is ... the working tree.
Josh Mandel (Mar 11 2019 at 15:13):
haha, I see
Josh Mandel (Mar 11 2019 at 15:13):
Anything look funny here?
Josh Mandel (Mar 11 2019 at 15:14):
There's a file in the repo whose name is c:\temp\json.json
. https://github.com/Healthedata1/IG-Template2/blob/36322999a97edf7c08280fe530bdc9ee37c3d321/c:%5Ctemp%5Cjson.json
Eric Haas (Mar 11 2019 at 15:23):
that shows up all the time I delete and it comes right back, I think @Rob Hausam said the same happens for him
Eric Haas (Mar 11 2019 at 15:24):
on my Mac Airbook
Eric Haas (Mar 11 2019 at 15:29):
I deleted and added to my .gitignore
Lloyd McKenzie (Mar 11 2019 at 15:41):
Looks like it's created by org.hl7.fhir.r5.test.JsonDirectTests (and the r4 version too). I presume these are getting fired as part of the IGPublisher for some reason? @Grahame Grieve, can we use Java's temp-file architecture to use that rather than a hard-coded C:\ path instead?
Rob Hausam (Mar 11 2019 at 16:50):
yes, I've seen and mentioned that file annoyingly showing up for a long time :)
it would be nice to clean that up
Grahame Grieve (Mar 11 2019 at 23:13):
surely this is a security risk in git itself?
Grahame Grieve (Mar 11 2019 at 23:16):
I see one reference to json.json, but that can't be the file in question - it's part of the main build
Josh Mandel (Mar 13 2019 at 21:37):
It's not a security risk because it's not going to overwrite files outside of your working tree, right?
Josh Mandel (Mar 13 2019 at 21:37):
It's trying to create a file in your working tree whose name is c:\temp\whatever
; most likely that's an invalid filename on Windows and it'll fail?
Josh Mandel (Mar 13 2019 at 21:38):
(have you tried this?)
Grahame Grieve (Mar 13 2019 at 22:48):
yes and it does try to overwrite the file c:\temp\json.json - it only complains because that file already exists
Josh Mandel (Mar 13 2019 at 23:00):
Wow. That's... pretty terrible. I'll see if I can reproduce and try to figure out if this is a known issue.
Eric Haas (Mar 14 2019 at 01:39):
I thought that it was only a mac thing?
Josh Mandel (Mar 14 2019 at 17:00):
I couldn't reproduce this on windows; I saw an (expected) error: invalid path
.
Josh Mandel (Mar 14 2019 at 17:00):
What version of git are you running here @Grahame Grieve ? (git --version
)
Grahame Grieve (Mar 14 2019 at 20:26):
git version 2.18.0.windows.1
Grahame Grieve (Mar 14 2019 at 20:29):
that file has gone...
Josh Mandel (Mar 14 2019 at 21:44):
oh I know that file is gone from the original repo. I made my own standalone repository as a test for this kind of thing.
Grahame Grieve (Mar 14 2019 at 21:45):
I can't easily produce it - can I use yours?
Josh Mandel (Mar 14 2019 at 21:46):
https://github.com/jmandel/local-path-test
Grahame Grieve (Mar 14 2019 at 21:52):
cloing that - if the file does not exist, I get "Invalid path 'xxx'". but if the file exists, I get error: Untracked working tree file 'xxxx' would be overwritten by merge.
Josh Mandel (Mar 14 2019 at 21:53):
And is it in fact over written?
Grahame Grieve (Mar 14 2019 at 21:57):
no. I don't think so. I think it's just a mis-leading error message
Josh Mandel (Mar 14 2019 at 21:57):
Okay. Well that's a better kind of bug than I had been afraid of.
Grahame Grieve (Mar 14 2019 at 22:01):
indeed
Grahame Grieve (Mar 14 2019 at 22:01):
should we make a bug report about the error message?
Josh Mandel (Mar 14 2019 at 22:03):
Yes. Shall I figure this out?
Grahame Grieve (Mar 14 2019 at 22:06):
that'd be great
Josh Mandel (Mar 14 2019 at 22:27):
Cc'd you on a report to git@vger.kernel.org.
Josh Mandel (Mar 14 2019 at 22:30):
Ha, I got back
Message may contain a virus Your message wasn't delivered to git@vger.kernel.org because it may contain a virus. Learn how to check for and prevent viruses. The response from the remote server was: 550 5.7.1 Content-Policy reject msg: The message contains HTML subpart, therefore we consider it SPAM or Outlook Virus. TEXT/PLAIN is accepted.! BF:<U 0.500007>; S1727246AbfCNW0s
Josh Mandel (Mar 14 2019 at 22:30):
Will try again with plain text...
Josh Mandel (Mar 14 2019 at 22:33):
There: https://public-inbox.org/git/CANSMLKELiaTR81zscG6Or9psL2ZLizAtYEqT72WGHdY92sAFQA@mail.gmail.com/T/#u
Grahame Grieve (Mar 14 2019 at 22:53):
hah
Bryn Rhodes (Mar 15 2019 at 01:01):
vger.kernel.org, that's my favorite domain name ever!
Last updated: Apr 12 2022 at 19:14 UTC