diff mbox

Symlink README.md as README to unbreak checkpatch.pl

Message ID 1468999625-3933-1-git-send-email-famz@redhat.com
State New
Headers show

Commit Message

Fam Zheng July 20, 2016, 7:27 a.m. UTC
Commit e5dfc5e8e71 renamed README to README.md but scripts/checkpatch.pl
still looks for the old name to sanity check that it's invoked from the
toplevel of tree.

Create a symbol link to README.md to fix that. I've verified that on
github README.md still takes precedence and page is rendered.

Reported-by: Daniel P. Berrange <berrange@redhat.com>
Signed-off-by: Fam Zheng <famz@redhat.com>
---
 README | 1 +
 1 file changed, 1 insertion(+)
 create mode 120000 README

Comments

Stefan Hajnoczi July 20, 2016, 9:16 a.m. UTC | #1
On Wed, Jul 20, 2016 at 03:27:05PM +0800, Fam Zheng wrote:
> Commit e5dfc5e8e71 renamed README to README.md but scripts/checkpatch.pl
> still looks for the old name to sanity check that it's invoked from the
> toplevel of tree.
> 
> Create a symbol link to README.md to fix that. I've verified that on
> github README.md still takes precedence and page is rendered.
> 
> Reported-by: Daniel P. Berrange <berrange@redhat.com>
> Signed-off-by: Fam Zheng <famz@redhat.com>
> ---
>  README | 1 +
>  1 file changed, 1 insertion(+)
>  create mode 120000 README
> 
> diff --git a/README b/README
> new file mode 120000

For anyone wondering what happens on Windows hosts:

On some Windows hosts this file will simply contain the path to
README.md.  This seems okay-ish.

Stefan
Peter Maydell July 20, 2016, 10:36 a.m. UTC | #2
On 20 July 2016 at 08:27, Fam Zheng <famz@redhat.com> wrote:
> Commit e5dfc5e8e71 renamed README to README.md but scripts/checkpatch.pl
> still looks for the old name to sanity check that it's invoked from the
> toplevel of tree.
>
> Create a symbol link to README.md to fix that. I've verified that on
> github README.md still takes precedence and page is rendered.

Have you checked that the symlink does sensible things if the git
tree is checked out under Windows?

thanks
-- PMM
Daniel P. Berrangé July 20, 2016, 10:42 a.m. UTC | #3
On Wed, Jul 20, 2016 at 11:36:36AM +0100, Peter Maydell wrote:
> On 20 July 2016 at 08:27, Fam Zheng <famz@redhat.com> wrote:
> > Commit e5dfc5e8e71 renamed README to README.md but scripts/checkpatch.pl
> > still looks for the old name to sanity check that it's invoked from the
> > toplevel of tree.
> >
> > Create a symbol link to README.md to fix that. I've verified that on
> > github README.md still takes precedence and page is rendered.
> 
> Have you checked that the symlink does sensible things if the git
> tree is checked out under Windows?

Should be fine

  https://www.kernel.org/pub/software/scm/git/docs/git-config.html

 "core.symlinks

    If false, symbolic links are checked out as small plain files that
    contain the link text. git-update-index(1) and git-add(1) will not
    change the recorded type to regular file. Useful on filesystems like
    FAT that do not support symbolic links.

    The default is true, except git-clone(1) or git-init(1) will probe
    and set core.symlinks false if appropriate when the repository is
    created."

IOW, git will just "do the right thing" and automatically default
core.symlinks to false on FAT.


Regards,
Daniel
Stefan Weil July 20, 2016, 10:48 a.m. UTC | #4
Am 20.07.2016 um 12:36 schrieb Peter Maydell:
> On 20 July 2016 at 08:27, Fam Zheng <famz@redhat.com> wrote:
>> Commit e5dfc5e8e71 renamed README to README.md but
>> scripts/checkpatch.pl still looks for the old name to sanity check
>> that it's invoked from the toplevel of tree. Create a symbol link to
>> README.md to fix that. I've verified that on github README.md still
>> takes precedence and page is rendered. 
> Have you checked that the symlink does sensible things if the git tree
> is checked out under Windows? thanks -- PMM


... and that the Windows installer will get a working README, not only a
symlink?
You could move README.md to README and link that to README.md
(as suggested by Paolo) - that would avoid such problems.

I suggest to revert the README rename for the coming new release.
It can be added again later, maybe with a few improvements like
those in my branch https://github.com/stweil/qemu/tree/readme.

For https://github.com/stweil/qemu/blob/readme/README.md,
I removed tab characters, used underlining which also looks
nice without markup formatting, used a uniform notification
for links (so that they actually work as links) and marked
code in the text.

Stefan
Eric Blake July 20, 2016, 12:31 p.m. UTC | #5
On 07/20/2016 04:48 AM, Stefan Weil wrote:
> Am 20.07.2016 um 12:36 schrieb Peter Maydell:
>> On 20 July 2016 at 08:27, Fam Zheng <famz@redhat.com> wrote:
>>> Commit e5dfc5e8e71 renamed README to README.md but
>>> scripts/checkpatch.pl still looks for the old name to sanity check
>>> that it's invoked from the toplevel of tree. Create a symbol link to
>>> README.md to fix that. I've verified that on github README.md still
>>> takes precedence and page is rendered. 
>> Have you checked that the symlink does sensible things if the git tree
>> is checked out under Windows? thanks -- PMM
> 
> 
> ... and that the Windows installer will get a working README, not only a
> symlink?
> You could move README.md to README and link that to README.md
> (as suggested by Paolo) - that would avoid such problems.

I would favor README as the real file, and README.md as the symlink. The
Windows installer would pick up the real file, and github, where
symlinks work, will render things just fine.  Making README the symlink
risks the Windows installer picking up a file whose contents are
"README.md", which is not what you want.

> 
> I suggest to revert the README rename for the coming new release.
> It can be added again later, maybe with a few improvements like
> those in my branch https://github.com/stweil/qemu/tree/readme.

It's just documentation, so we can still tweak it during hard freeze,
but I agree that a revert is the most conservative approach.

> 
> For https://github.com/stweil/qemu/blob/readme/README.md,
> I removed tab characters, used underlining which also looks
> nice without markup formatting, used a uniform notification
> for links (so that they actually work as links) and marked
> code in the text.
> 
> Stefan
> 
>
John Snow July 20, 2016, 6:07 p.m. UTC | #6
On 07/20/2016 08:31 AM, Eric Blake wrote:
> On 07/20/2016 04:48 AM, Stefan Weil wrote:
>> Am 20.07.2016 um 12:36 schrieb Peter Maydell:
>>> On 20 July 2016 at 08:27, Fam Zheng <famz@redhat.com> wrote:
>>>> Commit e5dfc5e8e71 renamed README to README.md but
>>>> scripts/checkpatch.pl still looks for the old name to sanity check
>>>> that it's invoked from the toplevel of tree. Create a symbol link to
>>>> README.md to fix that. I've verified that on github README.md still
>>>> takes precedence and page is rendered. 
>>> Have you checked that the symlink does sensible things if the git tree
>>> is checked out under Windows? thanks -- PMM
>>
>>
>> ... and that the Windows installer will get a working README, not only a
>> symlink?
>> You could move README.md to README and link that to README.md
>> (as suggested by Paolo) - that would avoid such problems.
> 
> I would favor README as the real file, and README.md as the symlink. The

Will Github DTRT?

> Windows installer would pick up the real file, and github, where
> symlinks work, will render things just fine.  Making README the symlink
> risks the Windows installer picking up a file whose contents are
> "README.md", which is not what you want.
> 
>>
>> I suggest to revert the README rename for the coming new release.
>> It can be added again later, maybe with a few improvements like
>> those in my branch https://github.com/stweil/qemu/tree/readme.
> 
> It's just documentation, so we can still tweak it during hard freeze,
> but I agree that a revert is the most conservative approach.
> 
>>
>> For https://github.com/stweil/qemu/blob/readme/README.md,
>> I removed tab characters, used underlining which also looks
>> nice without markup formatting, used a uniform notification
>> for links (so that they actually work as links) and marked
>> code in the text.
>>
>> Stefan
>>
>>
>
Stefan Weil July 20, 2016, 6:35 p.m. UTC | #7
On 07/20/16 20:07, John Snow wrote:
> On 07/20/2016 08:31 AM, Eric Blake wrote:
>> On 07/20/2016 04:48 AM, Stefan Weil wrote:
>>> Am 20.07.2016 um 12:36 schrieb Peter Maydell:
>>>> On 20 July 2016 at 08:27, Fam Zheng <famz@redhat.com> wrote:
>>>>> Commit e5dfc5e8e71 renamed README to README.md but
>>>>> scripts/checkpatch.pl still looks for the old name to sanity check
>>>>> that it's invoked from the toplevel of tree. Create a symbol link to
>>>>> README.md to fix that. I've verified that on github README.md still
>>>>> takes precedence and page is rendered. 
>>>> Have you checked that the symlink does sensible things if the git tree
>>>> is checked out under Windows? thanks -- PMM
>>>
>>>
>>> ... and that the Windows installer will get a working README, not only a
>>> symlink?
>>> You could move README.md to README and link that to README.md
>>> (as suggested by Paolo) - that would avoid such problems.
>>
>> I would favor README as the real file, and README.md as the symlink. The
> 
> Will Github DTRT?

Well, I don't know whether GitHub will always do the right thing,
but in this case it does, see my test here:

https://github.com/stweil/qemu/tree/readme

Stefan
diff mbox

Patch

diff --git a/README b/README
new file mode 120000
index 0000000..42061c0
--- /dev/null
+++ b/README
@@ -0,0 +1 @@ 
+README.md
\ No newline at end of file