GitHub user robertkowalski opened a pull request:

    https://github.com/apache/couchdb/pull/183

    Fix missing file in Makefile.am

    In #181 I have missed to add the test-file to `Makefile.am`. This commit 
adds the missing file.
    
    I will never remember that, so I created a precommit-githook for me now:
    
    A known issue is that you can have the needed change unstaged, but the test 
will not fail, but for me it is okay currently.
    
    ```bash
    files=$(git diff-index --name-status --cached HEAD | grep -v ^D | cut -c3-)
    
    # initial commit - files is null
    if [ -z "$files" ]
    then
      files=$(git diff --cached --root --name-status | grep -v ^D | cut -c3-)
    fi
    
    if [ -n "$files" ]
    then
      echo "running Makefile.am-check..."
      for f in $files
      do
        # return error if not in Makefile.am
        if [ -z "$(grep ${f:4} src/Makefile.am)" ]
        then
        echo ${f:4}
          if [ "${f:4}" != 'Makefile.am' ]
          then
            echo "Error: file not added to Makefile.am"
            exit 1
          fi
        fi
      done
      exit 0
    fi
    ```
    
    PTAL @kxepal 

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/robertkowalski/couchdb fix-make-am

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/couchdb/pull/183.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #183
    
----
commit 8b69742d04c5e4b58f3c0d1f354666d70d137133
Author: Robert Kowalski <[email protected]>
Date:   2014-03-15T15:00:22Z

    Fix missing file in Makefile.am

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to