

Fugitive, blogging for hackers - p4bl0
http://gitorious.org/fugitive

======
pimeys
The name is misleading. It reminds me of this git vim plugin:
<http://www.vim.org/scripts/script.php?script_id=2975>

~~~
p4bl0
Yep, there's a link to fugitive.vim on fugitive's gitorious page for this
reason.

------
dfc
Why not use ikiwiki? Much more mature, more features, git/svn/hg/bzr support
and its written by joey.

<http://ikiwiki.info>

~~~
p4bl0
Because ikiwiki has editing via a web ui (less is more), because fugitive does
not "support" git but embraces it and integrates within its workflow[1], and
because it's written by me ;-).

Edit: [1] by that I mean that once you have used fugitive to setup your
repository, you don't need fugitive anymore, you just use git as usual.

~~~
dfc
NB: When I said it was written by joey I did not mean to imply anything
negative about you or your code.

All I meant was that it was yet another great piece of software written by
joey:

* etckeeper (/etc under git)

* git-annex (dark git magic that i am only starting to fully appreciate)

* moreutils (growing collection of the Unix tools that nobody thought to write long ago, when Unix was young)

* tons of trivial debian infrastructure like debian-installer, tasksel, debhelper:)

<http://kitenet.net/~joey/code/>

~~~
p4bl0
Woaw I didn't knew the same guy did all this! I'm a huge fan of moreutils, in
particular the sponge command which I use almost daily. Thanks for the link.

PS: I never assumed that you were implying something negative about my code.

------
leif
build.sh is broken on my machine (os x, with coreutils installed through
homebrew), requires this fix:

    
    
        diff --git a/build.sh b/build.sh
        index 854aeb6..4e1c80f 100755
        --- a/build.sh
        +++ b/build.sh
        @@ -2,11 +2,12 @@
         
         include_file() {
           f=`echo -n $2 | sed 's/\//\\\\\//g'`
        -  tmp=`mktemp`
        +  tmp=`mktemp helloXXXXXX`
           cat "$2" | gzip | base64 > "$tmp"
           cat "$1" | sed "/#INCLUDE:$f#/ {
             r $tmp
        -    d }"
        +    d
        +    }"
           rm "$tmp"
         }

~~~
p4bl0
It's really sad that even those small utils are not perfectly compatible from
one platform to another. The `mktemp` from GNU coreutils don't require the
model :-(.

Luckily the changes you suggest seems to also work with the GNU coreutils, so
I'll apply them everywhere (there's a lot of call to mktemp and another
similar sed call in the hooks). Thanks :-).

Edit: It's done, I credited you as the author of the commit (see here:
[http://gitorious.org/fugitive/fugitive/commit/00626055595612...](http://gitorious.org/fugitive/fugitive/commit/006260555956124bf11997e59dca4ee9e1351841)).

~~~
leif
Yeah, you really have to read the posix specs carefully to catch all these
bizarre inconsistencies (or, if you're like me, wait until you find a system
something breaks on and then fix it). It's a shame.

Thanks :)

I'd have sent you a merge request but I don't have a gitorious account.

------
guruz
The integration with git hooks is an awesome idea.

~~~
guruz
Hm, I want to do --install-remote on my server but I am getting:

There's already a git repository here, aborting install.

Why? I already have my site in a git repo, I want to install fugitive onto it
instead of a new one? :)

~~~
p4bl0
If your git repos already exists, use `--install-hooks` and `--install-
config`. Since it's the remote repository, you may also need to `git config
receive.denyCurrentBranch "ignore"` depending on your configuration. :-)

~~~
guruz
Ah, thanks. Had to do some more stuff, e.g. copy default_files to _templates.
Also the fugitive-install macro wasn't set. Still have problems with some CSS
I think..

will look into it later.

~~~
p4bl0
The fugitive.css and print.css files should be in the "_public" directory (or
whatever the value of `git config fugitive.public-dir` is).

You know what it would be easier to have fugitive only warn and ask for
confirmation if there's already a git repos. Doing that right now.

EDIT: Done. You can update fugitive source using `git pull` and then rebuild
the install script with `./build.sh`.

~~~
guruz
Cool :)

Have you thought of supporting what Wordpress calls "pages"?

That way it could be used for more generic CMS tasks, having one template file
for both pages and articles.

~~~
p4bl0
Yep, and it would be easy to add, but I never needed it. I don't think that's
coming into fugitive itself but a few users with different needs already
forked the project to adapt the hooks, not to do that though, but you could
fork it to and make it manage pages (which would be like articles except that
they won't go into the previous/next chain, and not in the archives or the rss
feed either).

If you need some help to do it I'll be glad to help.

~~~
guruz
I'm a bit repelled by the fact that it's .sh .. oh well.

