Re: [PATCH w/signoff] pre-push.sample: Remove unwanted `IFS=' '`.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I call it unwanted because the default works fine with the actual
input and explicitly limiting whitespace this way breaks most command
substitution.  For instance, attempting to check only new commits with

    range="$local_sha $(
            git for-each-ref --format='^%(refname)' refs/remotes/$remote
    )"
    # ...
    commit=`git rev-list -n 1 --grep '\bbad string\b' $range`


fails, because the newlines are passed verbatim instead of being
treated as whitespace.

See http://stackoverflow.com/a/27392839/1290731 for the motivation.

Sorry for the capsing, and also for presuming ESP.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]