Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: rustyrussell/pettycoin
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 2d2e094e9716
Choose a base ref
...
head repository: rustyrussell/pettycoin
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 0461abde55fe
Choose a head ref
  • 2 commits
  • 3 files changed
  • 1 contributor

Commits on Nov 12, 2014

  1. tools/update-ccan.sh: add -f flag to operate on dirty tree.

    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Nov 12, 2014
    Copy the full SHA
    8d76c81 View commit details
  2. ccan: trivial update

    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Nov 12, 2014
    Copy the full SHA
    0461abd View commit details
Showing with 14 additions and 6 deletions.
  1. +1 −1 ccan/README
  2. +6 −4 ccan/ccan/io/io_plan.h
  3. +7 −1 tools/update-ccan.sh
2 changes: 1 addition & 1 deletion ccan/README
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
CCAN imported from http://ccodearchive.net.

CCAN version: init-1944-g5d34cc6
CCAN version: init-1952-ga77ce0e
10 changes: 6 additions & 4 deletions ccan/ccan/io/io_plan.h
Original file line number Diff line number Diff line change
@@ -35,22 +35,24 @@ enum io_direction {
* io_set_plan() when you've initialized it.
*
* Example:
* #include <ccan/io/io_plan.h>
*
* // Simple helper to read a single char.
* static int do_readchar(int fd, struct io_plan_arg *arg)
* {
* return read(fd, arg->u1.cp, 1) <= 0 ? -1 : 1;
* }
*
* struct io_plan *io_read_char_(struct io_conn *conn, char *in,
* static struct io_plan *io_read_char_(struct io_conn *conn, char *in,
* struct io_plan *(*next)(struct io_conn*,void*),
* void *arg)
* void *next_arg)
* {
* struct io_plan_arg *arg = io_get_plan_arg(conn, IO_IN);
* struct io_plan_arg *arg = io_plan_arg(conn, IO_IN);
*
* // Store information we need in the plan unions u1 and u2.
* arg->u1.cp = in;
*
* return io_set_plan(conn, IO_IN, do_readchar, next, arg);
* return io_set_plan(conn, IO_IN, do_readchar, next, next_arg);
* }
*/
struct io_plan_arg *io_plan_arg(struct io_conn *conn, enum io_direction dir);
8 changes: 7 additions & 1 deletion tools/update-ccan.sh
Original file line number Diff line number Diff line change
@@ -2,6 +2,13 @@

set -e

if [ x"$1" = x-f ]; then
UNCLEAN=""
shift
else
UNCLEAN=$(git status --porcelain | grep -v '^??' || true)
fi

CCANDIR=${1:-../ccan}
NEW_VERSION=${2:-$(git --git-dir=$CCANDIR/.git describe --always)}
OLD_VERSION=$(grep '^CCAN version: ' ccan/README | cut -d: -f2)
@@ -12,7 +19,6 @@ if [ $NEW_VERSION = $OLD_VERSION ]; then
fi

# Make sure we have a clean tree.
UNCLEAN=$(git status --porcelain | grep -v '^??' || true)
if [ -n "$UNCLEAN" ]; then
echo "Dirty tree" >&2
exit 1