FHIR Chat · Help with pull · committers/git-help

Stream: committers/git-help

Topic: Help with pull


view this post on Zulip 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?

view this post on Zulip Grahame Grieve (Mar 11 2019 at 10:32):

@Josh Mandel ping

view this post on Zulip Josh Mandel (Mar 11 2019 at 15:08):

This doesn't make sense to me -- the working tree is ... the working tree.

view this post on Zulip Josh Mandel (Mar 11 2019 at 15:13):

haha, I see

view this post on Zulip Josh Mandel (Mar 11 2019 at 15:13):

Anything look funny here?

pasted image

view this post on Zulip 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

view this post on Zulip 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

view this post on Zulip Eric Haas (Mar 11 2019 at 15:24):

on my Mac Airbook

view this post on Zulip Eric Haas (Mar 11 2019 at 15:29):

I deleted and added to my .gitignore

view this post on Zulip 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?

view this post on Zulip 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

view this post on Zulip Grahame Grieve (Mar 11 2019 at 23:13):

surely this is a security risk in git itself?

view this post on Zulip 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

view this post on Zulip 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?

view this post on Zulip 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?

view this post on Zulip Josh Mandel (Mar 13 2019 at 21:38):

(have you tried this?)

view this post on Zulip 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

view this post on Zulip 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.

view this post on Zulip Eric Haas (Mar 14 2019 at 01:39):

I thought that it was only a mac thing?

view this post on Zulip Josh Mandel (Mar 14 2019 at 17:00):

I couldn't reproduce this on windows; I saw an (expected) error: invalid path.

view this post on Zulip Josh Mandel (Mar 14 2019 at 17:00):

What version of git are you running here @Grahame Grieve ? (git --version)

view this post on Zulip Grahame Grieve (Mar 14 2019 at 20:26):

git version 2.18.0.windows.1

view this post on Zulip Grahame Grieve (Mar 14 2019 at 20:29):

that file has gone...

view this post on Zulip 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.

view this post on Zulip Grahame Grieve (Mar 14 2019 at 21:45):

I can't easily produce it - can I use yours?

view this post on Zulip Josh Mandel (Mar 14 2019 at 21:46):

https://github.com/jmandel/local-path-test

view this post on Zulip 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.

view this post on Zulip Josh Mandel (Mar 14 2019 at 21:53):

And is it in fact over written?

view this post on Zulip Grahame Grieve (Mar 14 2019 at 21:57):

no. I don't think so. I think it's just a mis-leading error message

view this post on Zulip Josh Mandel (Mar 14 2019 at 21:57):

Okay. Well that's a better kind of bug than I had been afraid of.

view this post on Zulip Grahame Grieve (Mar 14 2019 at 22:01):

indeed

view this post on Zulip Grahame Grieve (Mar 14 2019 at 22:01):

should we make a bug report about the error message?

view this post on Zulip Josh Mandel (Mar 14 2019 at 22:03):

Yes. Shall I figure this out?

view this post on Zulip Grahame Grieve (Mar 14 2019 at 22:06):

that'd be great

view this post on Zulip Josh Mandel (Mar 14 2019 at 22:27):

Cc'd you on a report to git@vger.kernel.org.

view this post on Zulip 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

view this post on Zulip Josh Mandel (Mar 14 2019 at 22:30):

Will try again with plain text...

view this post on Zulip Josh Mandel (Mar 14 2019 at 22:33):

There: https://public-inbox.org/git/CANSMLKELiaTR81zscG6Or9psL2ZLizAtYEqT72WGHdY92sAFQA@mail.gmail.com/T/#u

view this post on Zulip Grahame Grieve (Mar 14 2019 at 22:53):

hah

view this post on Zulip 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