* git-fast-export bundle doc
@ 2009-01-03 0:52 jidanni
2009-01-03 3:59 ` [PATCH] fast-export: print usage when no options specified Miklos Vajna
0 siblings, 1 reply; 4+ messages in thread
From: jidanni @ 2009-01-03 0:52 UTC (permalink / raw)
To: git
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.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] fast-export: print usage when no options specified
2009-01-03 0:52 git-fast-export bundle doc jidanni
@ 2009-01-03 3:59 ` Miklos Vajna
2009-01-06 19:28 ` Johannes Schindelin
0 siblings, 1 reply; 4+ messages in thread
From: Miklos Vajna @ 2009-01-03 3:59 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Johannes Schindelin, jidanni, git
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
---
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(-)
diff --git a/builtin-fast-export.c b/builtin-fast-export.c
index 8386338..e9ee2c7 100644
--- a/builtin-fast-export.c
+++ b/builtin-fast-export.c
@@ -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);
--
1.6.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] fast-export: print usage when no options specified
2009-01-03 3:59 ` [PATCH] fast-export: print usage when no options specified Miklos Vajna
@ 2009-01-06 19:28 ` Johannes Schindelin
2009-01-06 20:11 ` Miklos Vajna
0 siblings, 1 reply; 4+ messages in thread
From: Johannes Schindelin @ 2009-01-06 19:28 UTC (permalink / raw)
To: Miklos Vajna; +Cc: Junio C Hamano, jidanni, git
Hi,
On Sat, 3 Jan 2009, Miklos Vajna wrote:
> Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
> ---
>
> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] fast-export: print usage when no options specified
2009-01-06 19:28 ` Johannes Schindelin
@ 2009-01-06 20:11 ` Miklos Vajna
0 siblings, 0 replies; 4+ messages in thread
From: Miklos Vajna @ 2009-01-06 20:11 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: Junio C Hamano, jidanni, git
[-- Attachment #1: Type: text/plain, Size: 1138 bytes --]
On Tue, Jan 06, 2009 at 08:28:59PM +0100, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> 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. ;-)
> 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.
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-01-06 20:12 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-03 0:52 git-fast-export bundle doc jidanni
2009-01-03 3:59 ` [PATCH] fast-export: print usage when no options specified Miklos Vajna
2009-01-06 19:28 ` Johannes Schindelin
2009-01-06 20:11 ` Miklos Vajna
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).