chiark / gitweb /
Don't touch ref files manually
authorKarl Hasselström <kha@treskal.com>
Thu, 23 Aug 2007 16:45:26 +0000 (17:45 +0100)
committerCatalin Marinas <catalin.marinas@gmail.com>
Thu, 23 Aug 2007 20:29:34 +0000 (21:29 +0100)
commit262d31dcab5f51e7da41086c94f0eecaee060a74
tree2c3cb2759177c32fbc3f9dcb49ab209cbd37e402
parent7e97cc0590f29482af022340df84a43b98c657ce
Don't touch ref files manually

Messing with files manually doesn't work if the refs are packed. The
officially preferred way is to use git-update-ref, git-show-ref,
et.al. So do that.

As a consequence of this, we have some small behavior changes:

  * We used to not leave empty directories behind in the refs tree.
    But now that's all in the hands of git-update-ref, which does
    leave them behind. Tests that assumed the old behavior have been
    fixed.

  * We (that is, git-show-ref) no longer distinguish between a ref
    that doesn't exist and a ref that contains garbage. So the tests
    that assumed we'd fail when encountering a spurious ref with
    garbage in it have had to go through attitude readjustment.

Signed-off-by: Karl Hasselström <kha@treskal.com>
stgit/commands/branch.py
stgit/commands/common.py
stgit/git.py
stgit/stack.py
t/t0001-subdir-branches.sh
t/t1000-branch-create.sh
t/t1001-branch-rename.sh