summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2009-11-10Let 'git http-fetch -h' show usage outside any git repositoryJonathan Nieder
Delay search for a git directory until option parsing has finished. None of the functions used in option parsing look for or read any files other than stdin, so this is safe. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-10Merge branch 'jn/maint-http-fetch-mingw' into jn/help-everywhereJunio C Hamano
* jn/maint-http-fetch-mingw: http-fetch: add missing initialization of argv0_path merge: do not setup worktree twice check-ref-format: update usage string Conflicts: builtin-check-ref-format.c
2009-11-10Show usage string for 'git stripspace -h'Jonathan Nieder
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-10Show usage string for 'git unpack-file -h'Jonathan Nieder
"unpack-file -h" could be asking to save the contents of a blob named "-h". Strictly speaking, such a pathological ref name is possible, but the user would have to had said something like "tags/-h" to name such a pathological ref already. When used in scripts, unpack-file is typically not passed a user-supplied tag name directly. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-10Show usage string for 'git show-index -h'Jonathan Nieder
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-10Show usage string for 'git rev-parse -h'Jonathan Nieder
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-10Show usage string for 'git merge-one-file -h'Jonathan Nieder
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-10Show usage string for 'git mailsplit -h'Jonathan Nieder
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-10Show usage string for 'git imap-send -h'Jonathan Nieder
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-10Show usage string for 'git get-tar-commit-id -h'Jonathan Nieder
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-10Show usage string for 'git fast-import -h'Jonathan Nieder
Let "git fast-import -h" (with no other arguments) print usage before exiting, even when run outside any repository. Cc: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-10Show usage string for 'git check-ref-format -h'Jonathan Nieder
This only changes the behavior of "git check-ref-format -h" without any other options and arguments. This change cannot be breaking backward compatibility, since any valid refname must contain a /. Most existing scripts use arguments such as "heads/$foo". If some script checks the refname "-h" alone, git check-ref-format will still exit with nonzero status, and the only detrimental side-effect will be a usage string sent to stderr. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-10http-fetch: add missing initialization of argv0_pathJonathan Nieder
According to c6dfb39 (remote-curl: add missing initialization of argv0_path, 2009-10-13), programs with "main" must call this to work correctly on MinGW. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-10merge: do not setup worktree twiceJonathan Nieder
Builtins do not need to run setup_worktree() for themselves, since the builtin machinery runs it for them. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-10check-ref-format: update usage stringJonathan Nieder
'git check-ref-format' has learned --branch and --print options since the usage string was last updated. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-10Show usage string for 'git show-ref -h'Jonathan Nieder
This only changes the behavior of "git show-ref -h" without any other options and arguments. "show-ref -h" currently is short for "show-ref --head", which shows all the refs/* and HEAD, as opposed to "show-ref" that shows all the refs/* and not HEAD. Does anybody use "show-ref -h"? It was in Linus's original, most likely only because "it might be handy", not because "the command should not show the HEAD by default for such and such reasons". So I think it is okay if "show-ref -h" (but not "show-ref --head") gives help and exits. If a current script uses "git show-ref -h" without any other arguments, it would have to be adapted by changing "-h" to "--head". Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-10Show usage string for 'git merge-ours -h'Jonathan Nieder
This change is strictly about 'git merge-ours -h' without any other options and arguments. This change cannot break compatibility since merge drivers are always passed '--', among other arguments. Any usage string for this command is a lie, since it ignored its arguments until now. Still, it makes sense to let the user know the expected usage when asked. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-10Show usage string for 'git commit-tree -h'Jonathan Nieder
Treat an "-h" option as a request for help, rather than a "Not a valid object name" error. "commit-tree -h" could be asking to create a new commit from a treeish named "-h". Strictly speaking, such a pathological ref name is possible, but the user would have to had said something like "tags/-h" to name such a pathological already. commit-tree is usually used in scripts with raw object ids, anyway. For consistency, the "-h" option uses its new meaning even if followed by other arguments. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-10Show usage string for 'git cherry -h'Jonathan Nieder
Treat an "-h" option as a request for help, rather than an "Unknown commit -h" error. "cherry -h" could be asking to compare histories that leads to our HEAD and a commit that can be named as "-h". Strictly speaking, that may be a valid refname, but the user would have to say something like "tags/-h" to name such a pathological ref already, so it is not such a big deal. The "-h" option keeps its meaning even if preceded by other options or followed by other arguments. This keeps the command-line syntax closer to what parse_options would give and supports shell aliases like 'alias cherry="git cherry -v"' a little better. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-10Show usage string for 'git grep -h'Jonathan Nieder
Clarification: the following description only talks about "git grep -h" without any other options and arguments. Such a change cannot be breaking backward compatibility. "grep -h" cannot be asking for suppressing filenames, as there is no match pattern specified. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-10Retire fetch--tool helper to contrib/examplesJonathan Nieder
When git-fetch was builtin-ized, the previous script was moved to contrib/examples. Now, it is the sole remaining user for 'git fetch--tool'. The fetch--tool code is still worth keeping around so people can try out the old git-fetch.sh, for example when investigating regressions from the builtinifaction. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-09Merge branch 'maint'Junio C Hamano
* maint: Add intermediate build products to .gitignore
2009-11-09Add intermediate build products to .gitignoreJonathan Nieder
Temporaries such as configure.ac+ and Documentation/*.xml+ sometimes remain after an interrupted build. Tell git not to track them. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-07Merge branch 'jc/commit-s-subject-is-not-a-footer'Junio C Hamano
* jc/commit-s-subject-is-not-a-footer: builtin-commit.c: fix logic to omit empty line before existing footers
2009-11-07builtin-commit.c: fix logic to omit empty line before existing footersJunio C Hamano
"commit -s" used to add an empty line before adding S-o-b line only when the last line of the existing log message is not another S-o-b line, but c1e01b0 (commit: More generous accepting of RFC-2822 footer lines., 2009-10-28) introduced logic to omit this empty line when the message ends with a run of "footer" lines, to cover S-o-b's friends, e.g. Acked-by. However, the logic was overzealous and missed one corner case. A message that consists of a single line that begins with Token + colon, it can be mistaken as a S-o-b's friend. We do want an empty line in such a case. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-06pack-objects: move thread autodetection closer to relevant codeNicolas Pitre
Let's keep thread stuff close together if possible. And in this case, this even reduces the #ifdef noise, and allows for skipping the autodetection altogether if delta search is not needed (like with a pure clone). Signed-off-by: Nicolas Pitre <nico@fluxnic.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-05Merge branch 'maint'Junio C Hamano
* maint: Fix documentation grammar typo Allow curl helper to work without a local repository Require a struct remote in transport_get()
2009-11-05Fix documentation grammar typoGisle Aas
Introduced in 492cf3f (More precise description of 'git describe --abbrev', 2009-10-29) Signed-off-by: Gisle Aas <gisle@aas.no> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-04Allow curl helper to work without a local repositoryDaniel Barkalow
It's okay to use the curl helper without a local repository, so long as you don't use "fetch". There aren't any git programs that would try to use it, and it doesn't make sense to try it (since there's nowhere to write the results), but we may as well be clear. Signed-off-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-04Require a struct remote in transport_get()Daniel Barkalow
cmd_ls_remote() was calling transport_get() with a NULL remote and a non-NULL url in the case where it was run outside a git repository. This involved a bunch of ill-tested special cases. Instead, simply get the struct remote for the URL with remote_get(), which works fine outside a git repository, and can also take global options into account. This fixes a tiny and obscure bug where "git ls-remote" without a repo didn't support global url.*.insteadOf, even though "git clone" and "git ls-remote" in any repo did. Also, enforce that all callers provide a struct remote to transport_get(). Signed-off-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-02Merge branch 'jn/show-normalized-refs'Junio C Hamano
* jn/show-normalized-refs: t1402: Make test executable
2009-11-02t1402: Make test executableStephen Boyd
Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-02Merge branch 'bg/clone-doc' into maintJunio C Hamano
* bg/clone-doc: git-clone.txt: Fix grammar and formatting
2009-11-02Merge branch 'maint'Junio C Hamano
* maint: Makefile: add compat/bswap.h to LIB_H
2009-11-02Makefile: add compat/bswap.h to LIB_HDmitry V. Levin
Starting with commit 51ea55190b6e72c77c96754c1bf2f149a4714848, git-compat-util.h includes compat/bswap.h Signed-off-by: Dmitry V. Levin <ldv@altlinux.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-31Revert "Don't create the $GIT_DIR/branches directory on init"Junio C Hamano
This reverts commit 0cc5691a8b05a7eabdeef520c94b1bb3bcac7874. There is not enough justification for doing this. We do not update things in .git/branches and .git/remotes anymore, but still do read information from there and will keep doing so. Besides, this breaks quite a lot of tests in t55?? series.
2009-10-31fixup tr/stash-format mergeJunio C Hamano
2009-10-31Merge branch 'js/diff-verbose-submodule'Junio C Hamano
* js/diff-verbose-submodule: add tests for git diff --submodule Add the --submodule option to the diff option family
2009-10-31Merge branch 'jc/checkout-auto-track'Junio C Hamano
* jc/checkout-auto-track: git checkout --no-guess DWIM "git checkout frotz" to "git checkout -b frotz origin/frotz" check_filename(): make verify_filename() callable without dying
2009-10-31Merge branch 'jn/show-normalized-refs'Junio C Hamano
* jn/show-normalized-refs: check-ref-format: simplify --print implementation git check-ref-format --print Add tests for git check-ref-format Conflicts: Documentation/git-check-ref-format.txt
2009-10-31Merge branch 'jc/maint-1.6.3-graft-trailing-space'Junio C Hamano
* jc/maint-1.6.3-graft-trailing-space: info/grafts: allow trailing whitespaces at the end of line
2009-10-31Merge branch 'ak/bisect-reset-to-switch'Junio C Hamano
* ak/bisect-reset-to-switch: bisect reset: Allow resetting to any commit, not just a branch
2009-10-31Merge branch 'tr/maint-roff-quote'Junio C Hamano
* tr/maint-roff-quote: Quote ' as \(aq in manpages
2009-10-31Merge branch 'ja/fetch-doc'Junio C Hamano
* ja/fetch-doc: Documentation/merge-options.txt: order options in alphabetical groups Documentation/git-pull.txt: Add subtitles above included option files Documentation/fetch-options.txt: order options alphabetically
2009-10-31Merge branch 'cb/doc-fetch-pull-merge'Junio C Hamano
* cb/doc-fetch-pull-merge: modernize fetch/merge/pull examples
2009-10-31Merge branch 'maint'Junio C Hamano
* maint: clone: detect extra arguments clone: fix help on options push: fix typo in usage More precise description of 'git describe --abbrev'
2009-10-30clone: detect extra argumentsJonathan Nieder
If git clone is given more than two non-option arguments, it silently throws away all but the first one. Complain instead. Discovered by comparing the new builtin clone to the old git-clone.sh. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-30clone: fix help on optionsJunio C Hamano
Fix incorrect description of --recursive, and stop listing the historical synonym --naked that is not advertised anywhere. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-30push: fix typo in usageJeff King
Missing ")". Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-30t915{0,1}: use $TEST_DIRECTORYJeff King
Because --root can put our trash directories elsewhere, using ".." may not always work. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>