Re: sparse checkout - weird behavior

2017-01-26 Thread Paul Hammant
Well I feel a bit silly. Thanks for responding.

On Wed, Jan 25, 2017 at 11:59 PM, Jeff King <p...@peff.net> wrote:
> On Wed, Jan 25, 2017 at 10:21:19PM -0500, Paul Hammant wrote:
>
>> Related bug (maybe the same). Reproduction:
>>
>>   $ git clone g...@github.com:jekyll/jekyll.git --no-checkout
>>   Cloning into 'jekyll'...
>>   remote: Counting objects: 41331, done.
>>   remote: Compressing objects: 100% (5/5), done.
>>   remote: Total 41331 (delta 0), reused 0 (delta 0), pack-reused 41326
>>   Receiving objects: 100% (41331/41331), 11.91 MiB | 9.15 MiB/s, done.
>>   Resolving deltas: 100% (26530/26530), done.
>>   $ cd jekyll
>>   $ git config core.sparsecheckout true
>>   $ echo 'CONDUCT.markdown' > .git/info/sparse-checkout
>>   $ echo 'Gemfile' >> .git/info/sparse-checkout
>>   $ echo 'Rakefile' >> .git/info/sparse-checkout
>>   $ echo 'appveyor.yml' >> .git/info/sparse-checkout
>>   $ git checkout --
>>   Your branch is up-to-date with 'origin/master'.
>>   $ ls
>>   CONDUCT.markdown Gemfile Rakefile appveyor.yml lib
>>
>> I was not expecting to see 'lib' in the resulting file list
>
> Yep, I think this is the same problem. Inside lib, you get only
> "lib/theme_template/Gemfile", because it matches your unanchored
> pattern. Using "/Gemfile" in the sparse-checkout file fixes it.
>
> -Peff


Re: sparse checkout - weird behavior

2017-01-25 Thread Paul Hammant
Related bug (maybe the same). Reproduction:

  $ git clone g...@github.com:jekyll/jekyll.git --no-checkout
  Cloning into 'jekyll'...
  remote: Counting objects: 41331, done.
  remote: Compressing objects: 100% (5/5), done.
  remote: Total 41331 (delta 0), reused 0 (delta 0), pack-reused 41326
  Receiving objects: 100% (41331/41331), 11.91 MiB | 9.15 MiB/s, done.
  Resolving deltas: 100% (26530/26530), done.
  $ cd jekyll
  $ git config core.sparsecheckout true
  $ echo 'CONDUCT.markdown' > .git/info/sparse-checkout
  $ echo 'Gemfile' >> .git/info/sparse-checkout
  $ echo 'Rakefile' >> .git/info/sparse-checkout
  $ echo 'appveyor.yml' >> .git/info/sparse-checkout
  $ git checkout --
  Your branch is up-to-date with 'origin/master'.
  $ ls
  CONDUCT.markdown Gemfile Rakefile appveyor.yml lib

I was not expecting to see 'lib' in the resulting file list

I didn't say so before - I'm on a Mac, with a homebrew installed Git 2.11.0

- Paul


sparse checkout - weird behavior

2017-01-25 Thread Paul Hammant
Here's a simple reproducible bug - something unexpected in sparse-checkout mode:

  $ git clone g...@github.com:jekyll/jekyll.git --no-checkout
  Cloning into 'jekyll'...
  remote: Counting objects: 41331, done.
  remote: Compressing objects: 100% (5/5), done.
  remote: Total 41331 (delta 0), reused 0 (delta 0), pack-reused 41326
  Receiving objects: 100% (41331/41331), 11.91 MiB | 7.98 MiB/s, done.
  Resolving deltas: 100% (26530/26530), done.
  $ cd jekyll
  $ ls
  $ git config core.sparsecheckout true
  $ echo 'docs*' > .git/info/sparse-checkout
  $ git read-tree -mu HEAD
  $ ls
  docs rake

I didn't expect to see 'rake' amongst the results.

If I take out the asterisk on the echo line, only 'docs' is checked
out after the read-tree operation. Even if asterisk isn't allowed, I'd
not expect it to fail in that way. Sparse checkout documentation is a
little . .. . sparse it has to be said (sorry).

As it happens, I have some more complicated cases where
sparse-checkout is doing the wrong thing in the working copy - and
I'll work towards reproduction of that/those after this. Best to start
with a simple reproducible case in case there's a simple fix for more
that one similar bug.

Regards,

- Paul


[bug] git-check-ignore and file names with unicode chars in name - sys-out filename is corrupted

2016-08-08 Thread Paul Hammant
Reproduction:

  $ echo "*.ignoreme" >> .gitignore
  # (and commit)
  $ touch "fooo-€.ignoreme"
  $ find . -print | grep fooo | xargs git check-ignore
  "./fooo-\342\202\254.ignoreme"

You could view that git-check-ignore isn't corrupting anything, it is
just outputting another form for the file name (octal escaped), but it
doesn't need to change it at all, and its causing downstream problems
in bash scripting.

Of course this may get munged by gmail or a list manager. In the text
above, you should see unicode char "euro sign" to the right of a dash,
and the left of .ignoreme

Git version is 2.9.2

-ph
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html