Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
explicitly configure a URL at install, we should be able to
detect this URL as baked in from the configuration
-- gct has accidentally set the +x bit on a lot of files >.>.
-- Make gct do the right thing with no arguments
- Rerere support doesn't actually work
- Utility scripts gct should support multiple filenames
- "Version 3.0.0 doesn't exist; did you mean 3.0?"
-#!/bin/sh
+#!/bin/bash
+set -e
+if [ -z "$1" ]
+then
+ echo "Usage: gct FILE"
+ exit 1
+fi
+OWNER=$(stat -c "%u:%g" "$1")
+set -x
git checkout --theirs "$1"
-chmod 0777 "$1"
+chown "$OWNER" "$1"
git add "$1"