git-fast-export bundle doc
Please improve git-fast-export.txt. It says
This program dumps the given revisions in a form suitable to be piped into git-fast-import.
<revlist> isn't mentioned in the SYNOPSIS.
And there is no hyperlink to the git-fast-import man page, nor in SEE ALSO.)
You can use it as a human readable bundle replacement (see git-bundle(1))
But I tried it and there are apparently a few steps not mentioned that are needed after git-fast-import before you can actually see the files again on the other side of the sneakernet.
I used --all, which is in EXAMPLES but not OPTIONS.
Else nothing happens and no error is caught:
$ git fast-export $
Also the git-bundle man page should SEE ALSO git-fast-export and maybe even git-fast-import, which itself makes no mention of git-fast-export.
PATCH 1/1 fast-export: print usage when no options specified
---
I found that behaviour surprising as well when I saw it the first time. git rev-list outputs some usage info in that case, git log just logs HEAD. Given that unconditionally exporting HEAD with no arguments is probably not something most users want, here is a patch to make the behaviour like what git rev-list already has.
builtin-fast-export.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
builtin-fast-export.c +3 -0
@@ -497,6 +497,9 @@ int cmd_fast_export(int argc, const char **argv, const char *prefix) OPT_END() }; +if (argc ==1 ) +usage_with_options (fast_export_usage, options); +/* we handle encodings */ git_config (git_default_config,NULL );
Signature · 1 line
1.6.1
Re: [PATCH] fast-export: print usage when no options specified
Hi,
Quoted 8 lines · Miklos Vajna
Signed-off-by Miklos Vajna <[email protected]>---
I found that behaviour surprising as well when I saw it the first time. git rev-list outputs some usage info in that case, git log just logs HEAD. Given that unconditionally exporting HEAD with no arguments is probably not something most users want, here is a patch to make the behaviour like what git rev-list already has.
Maybe this should be part of the commit message?
-- snip --
Some people find it surprising that fast-export does not output a usage when called without parameters, as rev-list does.
This assumes that a user usually does not want to export HEAD by default. -- snap --
However, I have to say that I would find exporting HEAD a rather sensible default.
But I am not _that_ strongly opposed to the patch. Just would like to hear some opinions first.
Ciao,
Dscho
Re: [PATCH] fast-export: print usage when no options specified
Quoted 8 lines · Johannes Schindelin
Maybe this should be part of the commit message?
-- snip --
Some people find it surprising that fast-export does not output a usage when called without parameters, as rev-list does.This assumes that a user usually does not want to export HEAD by default. -- snap --
OK, if this is the only problem, I can resend it with this included. ;-)
Quoted 5 lines
However, I have to say that I would find exporting HEAD a rather sensible default.
But I am not _that_ strongly opposed to the patch. Just would like to hear some opinions first.
According to man git, fast-export is not a plumbing, though I think most user won't type it manually multiple times, they'll write a script, that checks if there is something to convert, then run git fast-export | foo fast-import, so it's really like plumbing. That's why I found the rev-list-like behaviour more logical.
However, I think defaulting to HEAD is still better than the current situation, so if that's the consensus, I'm fine with that as well.