git/builtin
Tay Ray Chuan 9c00de5a31 ls-remote: fall-back to default remotes when no remote specified
Instead of breaking execution when no remote (as specified in the
variable dest) is specified when git-ls-remote is invoked, continue on
and let remote_get() handle it.

This way, we are able to use the default remotes (eg. "origin",
branch.<name>.remote), as git-fetch, git-push, and other users of
remote_get(), do.

If no suitable remote is found, exit with a message describing the
issue, instead of just the usage text, as we do previously.

Add several tests to check that git-ls-remote handles the
no-remote-specified situation.

Also add a test that "git ls-remote <pattern>" does not work; we are
unable to guess the remote in that situation, as are git-fetch and
git-push.

In that test, we are testing for messages coming from two separate
processes, but we should be OK, because the second message is triggered
by closing the fd which must happen after the first message is printed.
(analysis by Jeff King.)

Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-08 23:10:43 -07:00
..
add.c Merge branch 'cp/add-u-pathspec' 2010-03-10 15:32:02 -08:00
annotate.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
apply.c Merge branch 'bg/apply-fix-blank-at-eof' 2010-03-20 11:29:35 -07:00
archive.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
bisect--helper.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
blame.c Merge branch 'maint' 2010-03-13 21:31:42 -08:00
branch.c Merge branch 'lt/deepen-builtin-source' 2010-03-10 15:25:18 -08:00
bundle.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
cat-file.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
check-attr.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
check-ref-format.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
checkout-index.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
checkout.c checkout -m --conflict=diff3: add a label for ancestor 2010-03-20 20:36:11 -07:00
clean.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
clone.c Merge branch 'tc/transport-verbosity' 2010-03-15 00:58:42 -07:00
commit-tree.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
commit.c builtin/commit: remove unnecessary variable definition 2010-04-02 11:38:00 -07:00
config.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
count-objects.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
describe.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
diff-files.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
diff-index.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
diff-tree.c Merge branch 'pb/log-first-parent-p-m' 2010-03-24 16:25:39 -07:00
diff.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
fast-export.c Merge branch 'maint' 2010-03-28 17:42:58 -07:00
fetch-pack.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
fetch.c Merge branch 'maint' 2010-03-20 11:29:19 -07:00
fmt-merge-msg.c fmt-merge-msg: hide summary option 2010-03-24 19:45:31 -07:00
for-each-ref.c Merge branch 'lt/deepen-builtin-source' 2010-03-10 15:25:18 -08:00
fsck.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
gc.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
grep.c Merge branch 'rs/threaded-grep-context' 2010-04-03 12:28:39 -07:00
hash-object.c Merge branch 'lt/deepen-builtin-source' 2010-03-10 15:25:18 -08:00
help.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
index-pack.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
init-db.c Merge branch 'sd/init-template' 2010-03-10 15:32:43 -08:00
log.c Merge branch 'ef/cherry-abbrev' 2010-04-03 12:28:40 -07:00
ls-files.c ls: remove redundant logic 2010-03-21 16:23:44 -07:00
ls-remote.c ls-remote: fall-back to default remotes when no remote specified 2010-04-08 23:10:43 -07:00
ls-tree.c ls: remove redundant logic 2010-03-21 16:23:44 -07:00
mailinfo.c Teach mailinfo %< as an alternative scissors mark 2010-04-04 10:17:55 -07:00
mailsplit.c Merge branch 'sh/am-keep-cr' 2010-03-10 15:32:34 -08:00
merge-base.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
merge-file.c merge-file --diff3: add a label for ancestor 2010-03-20 20:36:11 -07:00
merge-index.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
merge-ours.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
merge-recursive.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
merge-tree.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
merge.c Merge branch 'cc/cherry-pick-ff' 2010-03-28 21:52:28 -07:00
mktag.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
mktree.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
mv.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
name-rev.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
notes.c Merge branch 'sb/notes-parse-opt' 2010-03-28 21:52:28 -07:00
pack-objects.c Merge branch 'lt/deepen-builtin-source' 2010-03-10 15:25:18 -08:00
pack-redundant.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
pack-refs.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
patch-id.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
prune-packed.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
prune.c Merge branch 'lt/deepen-builtin-source' 2010-03-10 15:25:18 -08:00
push.c Merge branch 'tc/transport-verbosity' 2010-03-15 00:58:42 -07:00
read-tree.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
receive-pack.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
reflog.c Merge branch 'lt/deepen-builtin-source' 2010-03-10 15:25:18 -08:00
remote.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
replace.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
rerere.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
reset.c Sync with 1.7.0.4 2010-03-31 15:14:27 -07:00
rev-list.c Merge branch 'ef/maint-empty-commit-log' 2010-04-06 14:50:46 -07:00
rev-parse.c Merge branch 'lt/deepen-builtin-source' 2010-03-10 15:25:18 -08:00
revert.c Merge branch 'jn/merge-diff3-label' 2010-04-03 12:28:41 -07:00
rm.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
send-pack.c Merge branch 'ld/push-porcelain' 2010-03-15 00:58:24 -07:00
shortlog.c Merge branch 'lt/deepen-builtin-source' 2010-03-10 15:25:18 -08:00
show-branch.c Merge branch 'lt/deepen-builtin-source' 2010-03-10 15:25:18 -08:00
show-ref.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
stripspace.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
symbolic-ref.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
tag.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
tar-tree.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
unpack-file.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
unpack-objects.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
update-index.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
update-ref.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
update-server-info.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
upload-archive.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
var.c Merge branch 'lt/deepen-builtin-source' 2010-03-10 15:25:18 -08:00
verify-pack.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
verify-tag.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
write-tree.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00