File: day_49__direct_mode_guard_implementation.mdwn

package info (click to toggle)
git-annex 5.20141125%2Bdeb8u1
  • links: PTS
  • area: main
  • in suites: jessie
  • size: 37,832 kB
  • sloc: haskell: 42,603; sh: 1,080; ansic: 498; makefile: 316; perl: 125
file content (14 lines) | stat: -rw-r--r-- 645 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Long, long day coding up the direct mode guard today. About 90% of the fun
is dealing with `receive.denyCurrentBranch` not preventing pushes that
change the current branch, now that core.bare is set in direct mode.
My current solution to this involves using a special branch when using
direct mode, which nothing will ever push to (hopefully). A much nicer
solution would be to use a `update` hook to deny pushes of the current
branch -- but there are filesystems where repos cannot have git hooks.

The test suite is falling over, but the `directguard` branch otherwise
seems usable.

----

Today's work was sponsored by Carlo Matteo Capocasa.