You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@asterixdb.apache.org by Chris Hillery <ch...@hillery.land> on 2015/08/30 11:47:05 UTC

IfThenElse.aql

So several of you have probably noticed this file showing up as locally
modified even in your pure local copies of master, and even "git reset
--hard" won't make it show up as unchanged. First, the fix - run this
command in the root directory of your asterixdb checkout:


echo 'asterix-app/src/test/resources/AQLTS/queries/IfThenElse.aql
text=unset' >> .git/info/attributes


And boom! "git status" will no longer show that file as being locally
modified.

You're done. If you care about some of the reasons why this happened, read
on.

The reason is that we have a top-level .gitattributes file which declares
"* text=auto", which tells git to normalize text files to LF in the working
directory when you clone the repository. However that file was committed
into git with CRLF line endings. I'm not sure precisely why this is only
showing up as a difficulty now, and it appears that the correct solution -
checking it back into the repository with LF endings - was committed as
part of Ian's repackaging change.

But that still leaves some of you with the annoyance in your local trees
when you back up to before the repackaging change to do branch merges. You
can't easily fix it by re-committing the file yourself, or by committing a
change to .gitattributes, because that requires adding an actual new git
commit either way, which can screw up your integration history.
Fortunately, you can also set attributes via .git/info/attributes, and
stuff in the .git directory isn't actually IN a git commit, so you can
modify that locally without affecting your commit history.

Once you're all done with merging and up to date with the latest master,
you can safely remove that line from .git/info/attributes, or leave it be;
it won't matter much either way.

Ceej
aka Chris Hillery

Re: IfThenElse.aql

Posted by Ian Maxon <im...@uci.edu>.
As a small post-script, I have also had the same thing happen with
asterix-app/data/csv/sample_01.csv . The fix is the same as
IfThenElse.aql.

- Ian

On Sat, Aug 29, 2015 at 11:47 PM, Chris Hillery <ch...@hillery.land> wrote:
> So several of you have probably noticed this file showing up as locally
> modified even in your pure local copies of master, and even "git reset
> --hard" won't make it show up as unchanged. First, the fix - run this
> command in the root directory of your asterixdb checkout:
>
>
> echo 'asterix-app/src/test/resources/AQLTS/queries/IfThenElse.aql
> text=unset' >> .git/info/attributes
>
>
> And boom! "git status" will no longer show that file as being locally
> modified.
>
> You're done. If you care about some of the reasons why this happened, read
> on.
>
> The reason is that we have a top-level .gitattributes file which declares
> "* text=auto", which tells git to normalize text files to LF in the working
> directory when you clone the repository. However that file was committed
> into git with CRLF line endings. I'm not sure precisely why this is only
> showing up as a difficulty now, and it appears that the correct solution -
> checking it back into the repository with LF endings - was committed as
> part of Ian's repackaging change.
>
> But that still leaves some of you with the annoyance in your local trees
> when you back up to before the repackaging change to do branch merges. You
> can't easily fix it by re-committing the file yourself, or by committing a
> change to .gitattributes, because that requires adding an actual new git
> commit either way, which can screw up your integration history.
> Fortunately, you can also set attributes via .git/info/attributes, and
> stuff in the .git directory isn't actually IN a git commit, so you can
> modify that locally without affecting your commit history.
>
> Once you're all done with merging and up to date with the latest master,
> you can safely remove that line from .git/info/attributes, or leave it be;
> it won't matter much either way.
>
> Ceej
> aka Chris Hillery