Code

git.git
15 years agoMerge branch 'maint'
Junio C Hamano [Mon, 21 Jul 2008 00:16:29 +0000 (17:16 -0700)]
Merge branch 'maint'

* maint:
  fix usage string for git grep
  refresh-index: fix bitmask assignment

Conflicts:
builtin-grep.c

15 years agogit-svn: fix git svn info to work without arguments
Dmitry Potapov [Sun, 20 Jul 2008 20:14:07 +0000 (00:14 +0400)]
git-svn: fix git svn info to work without arguments

commit 2fe403e7452bd6e1e8232445cf5434ce8f1af973 broke "git-svn info ."
due to replacing '.' with '' in canonicalize_path for the top directory,
while find_file_type_and_diff_status was not corrected.

Bug reports:

http://thread.gmane.org/gmane.comp.version-control.git/87822/
http://bugs.debian.org/490400

Signed-off-by: Dmitry Potapov <dpotapov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agobuiltin-push.c: Cleanup - use OPT_BIT() and remove some variables
Michele Ballabio [Sun, 20 Jul 2008 12:02:20 +0000 (14:02 +0200)]
builtin-push.c: Cleanup - use OPT_BIT() and remove some variables

Signed-off-by: Michele Ballabio <barra_cuda@katamail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agobuiltin-merge.c: Fix option parsing
Michele Ballabio [Sun, 20 Jul 2008 12:34:47 +0000 (14:34 +0200)]
builtin-merge.c: Fix option parsing

Now "git merge -m" needs a message, and errors out with the usage
text if none is given.
This way, t7600-merge.sh is fixed.

Signed-off-by: Michele Ballabio <barra_cuda@katamail.com>
Acked-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agofix usage string for git grep
Jonathan Nieder [Sun, 20 Jul 2008 19:13:08 +0000 (14:13 -0500)]
fix usage string for git grep

Without this patch, git-grep gives confusing usage information:

$ git grep --confused
usage: git grep <option>* <rev>* [-e] <pattern> [<path>...]
$ git grep HEAD pattern
fatal: ambiguous argument 'pattern': unknown revision or path no
t in the working tree.
Use '--' to separate paths from revisions

So put <pattern> before the <rev>s, in accordance with actual correct
usage.  While we're changing the usage string, we might as well include
the "--" separating revisions and paths, too.

Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoTeach 'git merge' that some merge strategies no longer exist
Miklos Vajna [Sun, 20 Jul 2008 12:12:48 +0000 (14:12 +0200)]
Teach 'git merge' that some merge strategies no longer exist

'recur' co-existed with 'recursive' when rewriting it in C, but it no
longer available.  'stupid' was also recently removed.

"git merge -s confused origin" still includes them in the list of
available merge strategies.

[jc: this is a squash of two micropatches]

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agocvsserver: Add testsuite for packed refs
Lars Noschinski [Thu, 17 Jul 2008 17:00:28 +0000 (19:00 +0200)]
cvsserver: Add testsuite for packed refs

Check that req_update shows refs, even if all refs are packed.

Signed-off-by: Lars Noschinski <lars@public.noschinski.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agorefresh-index: fix bitmask assignment
Junio C Hamano [Sun, 20 Jul 2008 06:25:00 +0000 (23:25 -0700)]
refresh-index: fix bitmask assignment

5fdeacb (Teach update-index about --ignore-submodules, 2008-05-14) added a
new refresh option flag but did not assign a unique bit for it correctly,
and broke "update-index --ignore-missing".

This fixes it.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoGetting closer to 1.6.0-rc0
Junio C Hamano [Sat, 19 Jul 2008 22:52:12 +0000 (15:52 -0700)]
Getting closer to 1.6.0-rc0

Update the links to "stale" versions of documentation to link to 1.5.6.4

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoMerge branch 'maint'
Junio C Hamano [Sat, 19 Jul 2008 18:28:06 +0000 (11:28 -0700)]
Merge branch 'maint'

* maint:
  GIT 1.5.6.4
  builtin-rm: fix index lock file path
  http-fetch: do not SEGV after fetching a bad pack idx file
  rev-list: honor --quiet option
  api-run-command.txt: typofix

15 years agoSupport gitlinks in fast-import.
Alexander Gavrilov [Sat, 19 Jul 2008 12:21:24 +0000 (16:21 +0400)]
Support gitlinks in fast-import.

Currently fast-import/export cannot be used for
repositories with submodules. This patch extends
the relevant programs to make them correctly
process gitlinks.

Links can be represented by two forms of the
Modify command:

M 160000 SHA1 some/path

which sets the link target explicitly, or

M 160000 :mark some/path

where the mark refers to a commit. The latter
form can be used by importing tools to build
all submodules simultaneously in one physical
repository, and then simply fetch them apart.

Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years ago.mailmap update
Junio C Hamano [Sat, 19 Jul 2008 06:24:26 +0000 (23:24 -0700)]
.mailmap update

A few people sent in patches under slightly different spelling recently.
Hopefully this catches most of them if not all (with help from Dscho).

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoDocumentation/git-merge.txt: Partial rewrite of How Merge Works
Petr Baudis [Sat, 19 Jul 2008 18:17:22 +0000 (20:17 +0200)]
Documentation/git-merge.txt: Partial rewrite of How Merge Works

The git-merge documentation's "HOW MERGE WORKS" section is confusingly
composed and actually omits the most interesting part, the merging of
the arguments into HEAD itself, surprisingly not actually mentioning
the fast-forward merge anywhere.

This patch replaces the "[NOTE]" screenful of highly technical details
by a single sentence summing up the interesting information, and instead
explains how are the arguments compared with HEAD and the three possible
inclusion states that are named "Already up-to-date", "Fast-forward"
and "True merge". It also makes it clear that the rest of the section
talks only about the true merge situation, and slightly expands the
talk on solving conflicts.

Junio initiated the removal of the Note screenful altogether and
offered many stylistical fixes.

Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoarchive: remove unused headers
René Scharfe [Fri, 18 Jul 2008 14:30:47 +0000 (16:30 +0200)]
archive: remove unused headers

Remove obsolete #includes.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoarchive: make zip compression level independent from core git
René Scharfe [Fri, 18 Jul 2008 14:30:32 +0000 (16:30 +0200)]
archive: make zip compression level independent from core git

zlib_compression_level is the compression level used for git's object store.
It's 1 by default, which is the fastest setting.  This variable is also used
as the default compression level for ZIP archives created by git archive.

For archives, however, zlib's own default of 6 is more appropriate, as it's
favouring small size over speed -- archive creation is not that performance
critical most of the time.

This patch makes git archive independent from git's internal compression
level setting.  It affects invocations of git archive without explicitly
specified compression level option, only.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoDocumentation: How to ignore local changes in tracked files
Petr Baudis [Fri, 18 Jul 2008 14:11:07 +0000 (16:11 +0200)]
Documentation: How to ignore local changes in tracked files

This patch explains more carefully that `.gitignore` concerns only
untracked files and refers the reader to

git update-index --assume-unchanged

in the need of ignoring uncommitted changes in already tracked files.
The description of this option is lifted to a more "porcelainish"
level and explains the caveats of this usecase.

Whether feasible or not, I believe adding this functionality to
the porcelain is out of the scope of this patch. (And I personally
think that referring to the plumbing in the case of such a special
usage is fine.)

This is currently probably one of the top FAQs at #git and the
--assume-unchanged switch is not widely known; gitignore(5) is the first
place where people are likely to look for it.

Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoDocumentation/git-submodule.txt: Further clarify the description
Petr Baudis [Fri, 18 Jul 2008 13:40:41 +0000 (15:40 +0200)]
Documentation/git-submodule.txt: Further clarify the description

This patch rewrites the general description yet again, first clarifying
the high-level concept, mentioning the difference to remotes and using
the subtree merge strategy, then getting to the details about tree
entries and .gitmodules file.

The patch also makes few smallar grammar fixups within the rest of the
description and clarifies how does 'init' relate to 'update --init'.

Cc: Heikki Orsila <shdl@zakalwe.fi>
Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoAdd ANSI control code emulation for the Windows console
Peter Harris [Fri, 18 Jul 2008 07:34:44 +0000 (09:34 +0200)]
Add ANSI control code emulation for the Windows console

This adds only the minimum necessary to keep git pull/merge's diffstat from
wrapping. Notably absent is support for the K (erase) operation, and support
for POSIX write.

Signed-off-by: Peter Harris <git@peter.is-a-geek.org>
Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agobuiltin-clone: rewrite guess_dir_name()
Johannes Sixt [Sat, 19 Jul 2008 09:32:45 +0000 (11:32 +0200)]
builtin-clone: rewrite guess_dir_name()

The function has to do three small and independent tasks, but all of them
were crammed into a single loop. This rewrites the function entirely by
unrolling these tasks.

We also now use is_dir_sep(c) instead of c == '/' to increase portability.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoTeach lookup_prog not to select directories
Eric Raible [Fri, 18 Jul 2008 07:34:42 +0000 (09:34 +0200)]
Teach lookup_prog not to select directories

Without this simple fix "git gui" in the git source directory
finds the git-gui directory instead of the tcl script in /usr/bin.

Signed-off-by: Eric Raible <raible@gmail.com>
Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agotestsuite for cvs co -c
Fabian Emmes [Thu, 17 Jul 2008 17:00:30 +0000 (19:00 +0200)]
testsuite for cvs co -c

Check that all branches are displayed.

Signed-off-by: Fabian Emmes <fabian.emmes@rwth-aachen.de>
Signed-off-by: Lars Noschinski <lars@public.noschinski.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agocvsserver: Add cvs co -c support
Lars Noschinski [Thu, 17 Jul 2008 17:00:29 +0000 (19:00 +0200)]
cvsserver: Add cvs co -c support

Implement cvs checkout's -c option by returning a list of all "modules".
This is more useful than displaying a perl warning if -c is given.

Signed-off-by: Lars Noschinski <lars@public.noschinski.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agocvsserver: Add support for packed refs
Lars Noschinski [Thu, 17 Jul 2008 17:00:27 +0000 (19:00 +0200)]
cvsserver: Add support for packed refs

req_update still parses /refs/heads manually. Replace this by
a call to show-ref.

Signed-off-by: Lars Noschinski <lars@public.noschinski.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoTestsuite: Unset CVS_SERVER
Fabian Emmes [Thu, 17 Jul 2008 17:00:26 +0000 (19:00 +0200)]
Testsuite: Unset CVS_SERVER

The CVS_SERVER environment variable can cause some of the cvsimport tests
to fail. So unset this variable at the beginning of the test script.

Signed-off-by: Fabian Emmes <fabian.emmes@rwth-aachen.de>
Signed-off-by: Lars Noschinski <lars@public.noschinski.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoLink git-shell only to a subset of libgit.a
Stephan Beyer [Fri, 18 Jul 2008 01:04:30 +0000 (03:04 +0200)]
Link git-shell only to a subset of libgit.a

Commit 5b8e6f85 introduced stubs for three functions that make no sense
for git-shell. But those stubs defined libgit.a functions a second time
so that a linker can complain.

Now git-shell is only linked to a subset of libgit.a.

Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agot9001 (send-email): Do not use hardcoded /bin/sh in test
Junio C Hamano [Fri, 18 Jul 2008 06:18:43 +0000 (23:18 -0700)]
t9001 (send-email): Do not use hardcoded /bin/sh in test

Scriptlets used form inside this test began with hardcoded "#!/bin/sh".
By setting SHELL_PATH the user is already telling us that what the vendor
has in /bin/sh isn't POSIX enough, and we really should try to honor that
request.

Originally noticed by SungHyun Nam who later tested this patch and
verified that it fixes the issue on Solaris 9.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoGIT 1.5.6.4 v1.5.6.4
Junio C Hamano [Sat, 19 Jul 2008 17:58:01 +0000 (10:58 -0700)]
GIT 1.5.6.4

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agobuiltin-rm: fix index lock file path
Olivier Marin [Sat, 19 Jul 2008 16:24:46 +0000 (18:24 +0200)]
builtin-rm: fix index lock file path

When hold_locked_index() is called with a relative git_dir and you are
outside the work tree, the lock file become relative to the current
directory. So when later setup_work_tree() change the current directory
it breaks lock file path and commit_locked_index() fails.

This patch move index locking code after setup_work_tree() call to make
lock file relative to the working tree as it should be and add a test
case.

Noticed by Nick Andrew.

Signed-off-by: Olivier Marin <dkr@freesurf.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoMerge branch 'sp/maint-index-pack' into maint
Junio C Hamano [Fri, 18 Jul 2008 22:39:51 +0000 (15:39 -0700)]
Merge branch 'sp/maint-index-pack' into maint

* sp/maint-index-pack:
  index-pack: Honor core.deltaBaseCacheLimit when resolving deltas
  index-pack: Track the object_entry that creates each base_data
  index-pack: Chain the struct base_data on the stack for traversal
  index-pack: Refactor base arguments of resolve_delta into a struct

15 years agohttp-fetch: do not SEGV after fetching a bad pack idx file
Junio C Hamano [Fri, 18 Jul 2008 07:11:40 +0000 (00:11 -0700)]
http-fetch: do not SEGV after fetching a bad pack idx file

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agorev-list: honor --quiet option
Junio C Hamano [Fri, 18 Jul 2008 05:39:09 +0000 (22:39 -0700)]
rev-list: honor --quiet option

Nick Andrew noticed that rev-list lets --quiet option to be parsed by
underlying diff_options parser but did not pick up the result.  This
resulted in --quiet option to become effectively a no-op.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agobuiltin-remote.c: fix earlier "skip_prefix()" conversion
Junio C Hamano [Fri, 18 Jul 2008 04:30:33 +0000 (21:30 -0700)]
builtin-remote.c: fix earlier "skip_prefix()" conversion

The original code relied on an insane definition of skip_prefix() that
returned an empty string for a NULL input and returned the original if the
given "prefix" is not a prefix at all (it would have been justifiable if
it were called "come_up_with_a_short_name_to_report_ref()" or something,
though).  In any case, when we replaced it with a more saner definition of
the function whose behaviour is true to its name, its callers needed to be
adjusted but the conversion missed one call site.

This introduces a helper function "abbrev_ref()" whose purpose is to get a
full refname and its possible prefix and to strip the prefix part if it
matches, or refname itself in full if it doesn't.  This makes the callers
easier to read again.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoapi-run-command.txt: typofix
Stephan Beyer [Thu, 17 Jul 2008 23:53:55 +0000 (01:53 +0200)]
api-run-command.txt: typofix

Replace "run_command_v_opt_dir" by "run_command_v_opt_cd".

Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoDocumentation/RelNotes-1.6.0.txt: Expand on the incompatible packfiles
Petr Baudis [Thu, 17 Jul 2008 17:01:30 +0000 (19:01 +0200)]
Documentation/RelNotes-1.6.0.txt: Expand on the incompatible packfiles

Note that v1.4.4.5 supports pack index v2, and describe how to keep
your repositories backwards-compatible, shall you need to.

Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agomailinfo: off-by-one fix for [PATCH (foobar)] removal from Subject: line
Junio C Hamano [Thu, 17 Jul 2008 05:42:04 +0000 (22:42 -0700)]
mailinfo: off-by-one fix for [PATCH (foobar)] removal from Subject: line

A patch title "[PATCH] 1" was sanitized by the original code by stripping
the "[PATCH]" from the front, but after the conversion to use strbuf this
behaviour was broken due to a counting error.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoread-cache.c: typofix
Junio C Hamano [Thu, 17 Jul 2008 01:48:58 +0000 (18:48 -0700)]
read-cache.c: typofix

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoUpdate draft release notes for 1.6.0
Junio C Hamano [Thu, 17 Jul 2008 01:34:19 +0000 (18:34 -0700)]
Update draft release notes for 1.6.0

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoMerge branch 'mv/dashless'
Junio C Hamano [Thu, 17 Jul 2008 00:49:59 +0000 (17:49 -0700)]
Merge branch 'mv/dashless'

* mv/dashless:
  make remove-dashes: apply to scripts and programs as well, not just to builtins
  git-bisect: use dash-less form on git bisect log
  t1007-hash-object.sh: use quotes for the test description
  t0001-init.sh: change confusing directory name

15 years agoMerge branch 'ls/mailinfo'
Junio C Hamano [Thu, 17 Jul 2008 00:49:53 +0000 (17:49 -0700)]
Merge branch 'ls/mailinfo'

* ls/mailinfo:
  git-mailinfo: use strbuf's instead of fixed buffers
  Add some useful functions for strbuf manipulation.
  Make some strbuf_*() struct strbuf arguments const.

Conflicts:
builtin-mailinfo.c

15 years agoDocumentation/git-submodule.txt: Add Description section
Petr Baudis [Wed, 16 Jul 2008 18:44:12 +0000 (20:44 +0200)]
Documentation/git-submodule.txt: Add Description section

Figuring out how submodules work conceptually is quite a bumpy
ride for a newcomer; the user manual helps (if one knows to actually
look into it), but the reference documentation should provide good
quick intro as well. This patch attempts to do that, with suggestions
from Heikki Orsila.

Cc: Heikki Orsila <shdl@zakalwe.fi>
Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoMerge branch 'sb/dashless'
Junio C Hamano [Thu, 17 Jul 2008 00:22:50 +0000 (17:22 -0700)]
Merge branch 'sb/dashless'

* sb/dashless:
  Make usage strings dash-less
  t/: Use "test_must_fail git" instead of "! git"
  t/test-lib.sh: exit with small negagive int is ok with test_must_fail

Conflicts:
builtin-blame.c
builtin-mailinfo.c
builtin-mailsplit.c
builtin-shortlog.c
git-am.sh
t/t4150-am.sh
t/t4200-rerere.sh

15 years agoMerge branch 'rs/archive'
Junio C Hamano [Thu, 17 Jul 2008 00:12:18 +0000 (17:12 -0700)]
Merge branch 'rs/archive'

* rs/archive:
  archive: remove extra arguments parsing code
  archive: unify file attribute handling
  archive: centralize archive entry writing
  archive: add baselen member to struct archiver_args
  add context pointer to read_tree_recursive()
  archive: remove args member from struct archiver

15 years agoMerge branch 'ag/blame'
Junio C Hamano [Thu, 17 Jul 2008 00:12:11 +0000 (17:12 -0700)]
Merge branch 'ag/blame'

* ag/blame:
  Do not try to detect move/copy for entries below threshold.
  Avoid rescanning unchanged entries in search for copies.

15 years agoMerge branch 'rs/rebase-checkout-not-so-quiet'
Junio C Hamano [Thu, 17 Jul 2008 00:12:09 +0000 (17:12 -0700)]
Merge branch 'rs/rebase-checkout-not-so-quiet'

* rs/rebase-checkout-not-so-quiet:
  git-rebase: report checkout failure

Conflicts:
git-rebase.sh

15 years agoMerge branch 'sp/maint-index-pack'
Junio C Hamano [Thu, 17 Jul 2008 00:11:18 +0000 (17:11 -0700)]
Merge branch 'sp/maint-index-pack'

* sp/maint-index-pack:
  index-pack: Honor core.deltaBaseCacheLimit when resolving deltas
  index-pack: Track the object_entry that creates each base_data
  index-pack: Chain the struct base_data on the stack for traversal
  index-pack: Refactor base arguments of resolve_delta into a struct

15 years agoMerge branch 'maint'
Junio C Hamano [Thu, 17 Jul 2008 00:10:28 +0000 (17:10 -0700)]
Merge branch 'maint'

* maint:
  Start preparing 1.5.6.4 release notes
  git fetch-pack: do not complain about "no common commits" in an empty repo
  rebase-i: keep old parents when preserving merges
  t7600-merge: Use test_expect_failure to test option parsing
  Fix buffer overflow in prepare_attr_stack
  Fix buffer overflow in git diff
  Fix buffer overflow in git-grep
  git-cvsserver: fix call to nonexistant cleanupWorkDir()
  Documentation/git-cherry-pick.txt et al.: Fix misleading -n description

Conflicts:
RelNotes

15 years agoStart preparing 1.5.6.4 release notes
Junio C Hamano [Wed, 16 Jul 2008 22:55:51 +0000 (15:55 -0700)]
Start preparing 1.5.6.4 release notes

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agogit fetch-pack: do not complain about "no common commits" in an empty repo
Johannes Schindelin [Wed, 2 Jul 2008 17:06:56 +0000 (18:06 +0100)]
git fetch-pack: do not complain about "no common commits" in an empty repo

If the repo is empty, it is obvious that there are no common commits
when fetching from _anywhere_.

So there is no use in saying it in that case, and it can even be
annoying.  Therefore suppress the message unilaterally if the repository
is empty prior to the fetch.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoMerge branch 'js/maint-pretty-mailmap' into maint
Junio C Hamano [Wed, 16 Jul 2008 22:27:03 +0000 (15:27 -0700)]
Merge branch 'js/maint-pretty-mailmap' into maint

* js/maint-pretty-mailmap:
  Add pretty format %aN which gives the author name, respecting .mailmap

15 years agoMerge branch 'sp/maint-bash-completion-optim' into maint
Junio C Hamano [Wed, 16 Jul 2008 22:25:24 +0000 (15:25 -0700)]
Merge branch 'sp/maint-bash-completion-optim' into maint

* sp/maint-bash-completion-optim:
  bash completion: Resolve git show ref:path<tab> losing ref: portion
  bash completion: Append space after file names have been completed
  bash completion: Don't offer "a.." as a completion for "a."
  bash completion: Improve responsiveness of git-log completion

15 years agoMerge branch 'sp/maint-pack-memuse' into maint
Junio C Hamano [Wed, 16 Jul 2008 22:24:07 +0000 (15:24 -0700)]
Merge branch 'sp/maint-pack-memuse' into maint

* sp/maint-pack-memuse:
  Correct pack memory leak causing git gc to try to exceed ulimit

15 years agoMerge branch 'ls/maint-mailinfo-patch-label' into maint
Junio C Hamano [Wed, 16 Jul 2008 22:23:19 +0000 (15:23 -0700)]
Merge branch 'ls/maint-mailinfo-patch-label' into maint

* ls/maint-mailinfo-patch-label:
  git-mailinfo: Fix getting the subject from the in-body [PATCH] line

15 years agoMerge branch 'js/maint-daemon-syslog' into maint
Junio C Hamano [Wed, 16 Jul 2008 22:22:05 +0000 (15:22 -0700)]
Merge branch 'js/maint-daemon-syslog' into maint

* js/maint-daemon-syslog:
  git daemon: avoid calling syslog() from a signal handler

15 years agorebase-i: keep old parents when preserving merges
Stephan Beyer [Wed, 16 Jul 2008 01:51:49 +0000 (03:51 +0200)]
rebase-i: keep old parents when preserving merges

When "rebase -i -p" tries to preserve merges of unrelated branches, it
lost some parents:

 - When you have more than two parents, the commit in the new history
   ends up with fewer than expected number of parents and this breakage
   goes unnoticed;

 - When you are rebasing a merge with two parents and one is lost, the
   command tries to cherry-pick the original merge commit, and the command
   fails.

Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agot7600-merge: Use test_expect_failure to test option parsing
Johannes Sixt [Wed, 16 Jul 2008 08:33:52 +0000 (10:33 +0200)]
t7600-merge: Use test_expect_failure to test option parsing

It used plain 'if git merge ...', which hides a segfault. The test does not pass.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoFix buffer overflow in prepare_attr_stack
Dmitry Potapov [Wed, 16 Jul 2008 15:39:55 +0000 (19:39 +0400)]
Fix buffer overflow in prepare_attr_stack

If PATH_MAX on your system is smaller than a path stored in the git repo,
it may cause the buffer overflow in prepare_attr_stack.

Signed-off-by: Dmitry Potapov <dpotapov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoFix buffer overflow in git diff
Dmitry Potapov [Wed, 16 Jul 2008 14:54:02 +0000 (18:54 +0400)]
Fix buffer overflow in git diff

If PATH_MAX on your system is smaller than a path stored, it may cause
buffer overflow and stack corruption in diff_addremove() and diff_change()
functions when running git-diff

Signed-off-by: Dmitry Potapov <dpotapov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoFix buffer overflow in git-grep
Dmitry Potapov [Wed, 16 Jul 2008 15:33:29 +0000 (19:33 +0400)]
Fix buffer overflow in git-grep

If PATH_MAX on your system is smaller than any path stored in the git
repository, that can cause memory corruption inside of the grep_tree
function used by git-grep.

Signed-off-by: Dmitry Potapov <dpotapov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agot/Makefile: use specified shell when running aggregation script
SungHyun Nam [Wed, 16 Jul 2008 01:31:28 +0000 (10:31 +0900)]
t/Makefile: use specified shell when running aggregation script

Signed-off-by: SungHyun Nam <goweol@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agogit-cvsserver: fix call to nonexistant cleanupWorkDir()
Lars Noschinski [Wed, 16 Jul 2008 11:35:46 +0000 (13:35 +0200)]
git-cvsserver: fix call to nonexistant cleanupWorkDir()

git-cvsserver.perl contained a single call to a nonexistant function
cleanupWorkDir(). This was obviously a typo for cleanupWorkTree().

Signed-off-by: Lars Noschinski <lars@public.noschinski.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoparse-options.c: make check_typos() static
Nanako Shiraishi [Wed, 16 Jul 2008 10:42:18 +0000 (19:42 +0900)]
parse-options.c: make check_typos() static

This function is not used by any other file.

Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agobuiltin-describe.c: make a global variable "pattern" static
Nanako Shiraishi [Wed, 16 Jul 2008 10:42:14 +0000 (19:42 +0900)]
builtin-describe.c: make a global variable "pattern" static

This variable is not used by any other file.

Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agocache-tree.c: make cache_tree_find() static
Nanako Shiraishi [Wed, 16 Jul 2008 10:42:10 +0000 (19:42 +0900)]
cache-tree.c: make cache_tree_find() static

This function is not used by any other file.

Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoDocumentation/git-cherry-pick.txt et al.: Fix misleading -n description
Petr Baudis [Wed, 16 Jul 2008 12:35:22 +0000 (14:35 +0200)]
Documentation/git-cherry-pick.txt et al.: Fix misleading -n description

The manual page of git-cherry-pick and git-revert asserts that -n works
primarily on the working tree, while in fact the primary object it operates
on is the index, and the changes only "accidentally" propagate to the
working tree. This e.g. leads innocent #git IRC folks to believe that you
can use -n to prepare changes for git-add -i staging.

Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agot/aggregate-results: whitespace fix
Junio C Hamano [Wed, 16 Jul 2008 15:42:52 +0000 (08:42 -0700)]
t/aggregate-results: whitespace fix

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agot/lib-git-svn: fix SVN_HTTPD tests to work with "trash directory"
Eric Wong [Mon, 14 Jul 2008 09:13:56 +0000 (02:13 -0700)]
t/lib-git-svn: fix SVN_HTTPD tests to work with "trash directory"

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoMerge branch 'mv/merge-in-c'
Junio C Hamano [Wed, 16 Jul 2008 02:09:46 +0000 (19:09 -0700)]
Merge branch 'mv/merge-in-c'

* mv/merge-in-c:
  reduce_heads(): protect from duplicate input
  reduce_heads(): thinkofix
  Add a new test for git-merge-resolve
  t6021: add a new test for git-merge-resolve
  Teach merge.log to "git-merge" again
  Build in merge
  Fix t7601-merge-pull-config.sh on AIX
  git-commit-tree: make it usable from other builtins
  Add new test case to ensure git-merge prepends the custom merge message
  Add new test case to ensure git-merge reduces octopus parents when possible
  Introduce reduce_heads()
  Introduce get_merge_bases_many()
  Add new test to ensure git-merge handles more than 25 refs.
  Introduce get_octopus_merge_bases() in commit.c
  git-fmt-merge-msg: make it usable from other builtins
  Move read_cache_unmerged() to read-cache.c
  Add new test to ensure git-merge handles pull.twohead and pull.octopus
  Move parse-options's skip_prefix() to git-compat-util.h
  Move commit_list_count() to commit.c
  Move split_cmdline() to alias.c

Conflicts:
Makefile
parse-options.c

15 years agoMerge branch 'ag/rewrite_one'
Junio C Hamano [Wed, 16 Jul 2008 01:59:48 +0000 (18:59 -0700)]
Merge branch 'ag/rewrite_one'

* ag/rewrite_one:
  Fix quadratic performance in rewrite_one.

15 years agoMerge branch 'sp/win'
Junio C Hamano [Wed, 16 Jul 2008 01:59:45 +0000 (18:59 -0700)]
Merge branch 'sp/win'

* sp/win:
  We need to check for msys as well as Windows in add--interactive.
  Convert CR/LF to LF in tag signatures
  Fixed text file auto-detection: treat EOF character 032 at the end of file as printable

15 years agoMerge branch 'js/more-win'
Junio C Hamano [Wed, 16 Jul 2008 01:59:28 +0000 (18:59 -0700)]
Merge branch 'js/more-win'

* js/more-win:
  help (Windows): Display HTML in default browser using Windows' shell API
  help.c: Add support for htmldir relative to git_exec_path()
  Move code interpreting path relative to exec-dir to new function system_path()

15 years agoMerge branch 'js/maint-pretty-mailmap'
Junio C Hamano [Wed, 16 Jul 2008 01:59:04 +0000 (18:59 -0700)]
Merge branch 'js/maint-pretty-mailmap'

* js/maint-pretty-mailmap:
  Add pretty format %aN which gives the author name, respecting .mailmap

15 years agoRename ".dotest/" to ".git/rebase" and ".dotest-merge" to "rebase-merge"
Johannes Schindelin [Wed, 16 Jul 2008 01:33:44 +0000 (03:33 +0200)]
Rename ".dotest/" to ".git/rebase" and ".dotest-merge" to "rebase-merge"

Since the files generated and used during a rebase are never to be
tracked, they should live in $GIT_DIR.  While at it, avoid the rather
meaningless term "dotest" to "rebase", and unhide ".dotest-merge".

This was wished for on the mailing list, but so far unimplemented.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoDo not try to detect move/copy for entries below threshold.
Alexander Gavrilov [Tue, 15 Jul 2008 22:00:58 +0000 (02:00 +0400)]
Do not try to detect move/copy for entries below threshold.

Splits for such entries are rejected anyway, so there is no
point even trying to compute them.

Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoAvoid rescanning unchanged entries in search for copies.
Alexander Gavrilov [Tue, 15 Jul 2008 22:05:20 +0000 (02:05 +0400)]
Avoid rescanning unchanged entries in search for copies.

Repeatedly comparing the same entry against the same set
of blobs in search for copies is quite pointless. This
huge waste of effort can be avoided using a flag in
the blame_entry structure.

Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoUpdate draft release notes to 1.6.0
Junio C Hamano [Tue, 15 Jul 2008 12:55:55 +0000 (05:55 -0700)]
Update draft release notes to 1.6.0

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoshortlog: support --pretty=format: option
Johannes Schindelin [Mon, 14 Jul 2008 18:08:52 +0000 (19:08 +0100)]
shortlog: support --pretty=format: option

With this patch, the user can override the default setting, to print
the commit messages using a user format instead of the onelines of the
commits.  Example:

$ git shortlog --pretty='format:%s (%h)' <commit>..

Note that shortlog will only respect a user format setting, as the other
formats do not make much sense.

Wished for by Andrew Morton.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoMake git-add -i accept ranges like 7-
Ciaran McCreesh [Mon, 14 Jul 2008 18:29:37 +0000 (19:29 +0100)]
Make git-add -i accept ranges like 7-

git-add -i ranges expect number-number. But for the supremely lazy, typing in
that second number when selecting "from patch 7 to the end" is wasted effort.
So treat an empty second number in a range as "until the last item".

Signed-off-by: Ciaran McCreesh <ciaran.mccreesh@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agot9600: allow testing with cvsps 2.2, including beta versions
Pavel Roskin [Tue, 15 Jul 2008 00:20:19 +0000 (20:20 -0400)]
t9600: allow testing with cvsps 2.2, including beta versions

We've supported cvsps 2.1 so far.  Newer 2.2b1 (beta) seems to work with
us, too.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoarchive: remove extra arguments parsing code
René Scharfe [Mon, 14 Jul 2008 19:22:05 +0000 (21:22 +0200)]
archive: remove extra arguments parsing code

Replace the code that calls backend specific argument parsers by a
simple flag mechanism.  This reduces code size and complexity.

We can add back such a mechanism (based on incremental parse_opt(),
perhaps) when we need it.  The compression level parameter, though,
is going to be shared by future compressing backends like tgz.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoarchive: unify file attribute handling
René Scharfe [Mon, 14 Jul 2008 19:22:29 +0000 (21:22 +0200)]
archive: unify file attribute handling

Now that all file attribute handling for git archive has moved to archive.c,
we can unexport sha1_file_to_archive() and is_archive_path_ignored() even
disappears.

Add setup_archive_check(), modelled after similar functions used in the code
of other commands that support multiple file attributes.

Also remove convert_to_archive(), as it's only remaining function with
attribute handling gone was to call format_subst() if commit was not NULL,
which is now checked in sha1_file_to_archive().

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoarchive: centralize archive entry writing
René Scharfe [Mon, 14 Jul 2008 19:22:24 +0000 (21:22 +0200)]
archive: centralize archive entry writing

Add the exported function write_archive_entries() to archive.c, which uses
the new ability of read_tree_recursive() to pass a context pointer to its
callback in order to centralize previously duplicated code.

The new callback function write_archive_entry() does the work that every
archiver backend needs to do: loading file contents, entering subdirectories,
handling file attributes, constructing the full path of the entry.  All that
done, it calls the backend specific write_archive_entry_fn_t function.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoarchive: add baselen member to struct archiver_args
René Scharfe [Tue, 15 Jul 2008 07:49:38 +0000 (09:49 +0200)]
archive: add baselen member to struct archiver_args

Calculate the length of base and save it in a new member of struct
archiver_args.  This way we don't have to compute it in each of the
format backends.

Note: parse_archive_args() guarantees that ->base won't ever be NULL.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoadd context pointer to read_tree_recursive()
René Scharfe [Mon, 14 Jul 2008 19:22:12 +0000 (21:22 +0200)]
add context pointer to read_tree_recursive()

Add a pointer parameter to read_tree_recursive(), which is passed to the
callback function.  This allows callers of read_tree_recursive() to
share data with the callback without resorting to global variables.  All
current callers pass NULL.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoarchive: remove args member from struct archiver
René Scharfe [Tue, 15 Jul 2008 07:49:40 +0000 (09:49 +0200)]
archive: remove args member from struct archiver

Pass struct archiver and struct archiver_args explicitly to parse_archive_args
and remove the latter from the former.  This allows us to get rid of struct
archiver_desc and simplifies the code a bit.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoindex-pack: Honor core.deltaBaseCacheLimit when resolving deltas
Shawn O. Pearce [Tue, 15 Jul 2008 04:45:34 +0000 (04:45 +0000)]
index-pack: Honor core.deltaBaseCacheLimit when resolving deltas

If we are trying to resolve deltas for a long delta chain composed
of multi-megabyte objects we can easily run into requiring 500M+
of memory to hold each object in the chain on the call stack while
we recurse into the dependent objects and resolve them.

We now use a simple delta cache that discards objects near the
bottom of the call stack first, as they are the most least recently
used objects in this current delta chain.  If we recurse out of a
chain we may find the base object is no longer available, as it was
free'd to keep memory under the deltaBaseCacheLimit.  In such cases
we must unpack the base object again, which will require recursing
back to the root of the top of the delta chain as we released that
root first.

The astute reader will probably realize that we can still exceed
the delta base cache limit, but this happens only if the most
recent base plus the delta plus the inflated dependent sum up to
more than the base cache limit.  Due to the way patch_delta is
currently implemented we cannot operate in less memory anyway.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoindex-pack: Track the object_entry that creates each base_data
Shawn O. Pearce [Mon, 14 Jul 2008 02:07:46 +0000 (22:07 -0400)]
index-pack: Track the object_entry that creates each base_data

If we free the data stored within a base_data we need the struct
object_entry to get the data back again for use with another dependent
delta.  Storing the object_entry* in base_data makes it simple to call
get_data_from_pack() to recover the compressed information.

This however means that we must add the missing base object to the end of
our packfile prior to calling resolve_delta() on each of the dependent
deltas.  Adding the base first ensures we can read the base back from the
pack we are indexing, as if it had been included by the remote side.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoindex-pack: Chain the struct base_data on the stack for traversal
Shawn O. Pearce [Mon, 14 Jul 2008 02:07:45 +0000 (22:07 -0400)]
index-pack: Chain the struct base_data on the stack for traversal

We need to release earlier inflated base objects when memory gets
low, which means we need to be able to walk up or down the stack
to locate the objects we want to release, and free their data.

The new link/unlink routines allow inserting and removing the struct
base_data during recursion inside resolve_delta, and the global
base_cache gives us the head of the chain (bottom of the stack)
so we can traverse it.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoindex-pack: Refactor base arguments of resolve_delta into a struct
Shawn O. Pearce [Mon, 14 Jul 2008 02:07:44 +0000 (22:07 -0400)]
index-pack: Refactor base arguments of resolve_delta into a struct

We need to discard base objects which are not recently used if our
memory gets low, such as when we are unpacking a long delta chain
of a very large object.

To support tracking the available base objects we combine the
pointer and size into a struct.  Future changes would allow the
data pointer to be free'd and marked NULL if memory gets low.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoMerge git://repo.or.cz/git-gui
Junio C Hamano [Tue, 15 Jul 2008 07:08:02 +0000 (00:08 -0700)]
Merge git://repo.or.cz/git-gui

* git://repo.or.cz/git-gui:
  git-gui: MERGE_RR lives in .git/ directly with newer Git versions
  git-gui: Exit shortcut in MacOSX repaired

15 years agoMerge branch 'js/merge-rr'
Junio C Hamano [Tue, 15 Jul 2008 06:48:48 +0000 (23:48 -0700)]
Merge branch 'js/merge-rr'

* js/merge-rr:
  Move MERGE_RR from .git/rr-cache/ into .git/

Conflicts:
builtin-rerere.c

15 years agoMerge branch 'sb/rerere-lib'
Junio C Hamano [Tue, 15 Jul 2008 06:47:48 +0000 (23:47 -0700)]
Merge branch 'sb/rerere-lib'

* sb/rerere-lib:
  rerere: Separate libgit and builtin functions

15 years agoMerge branch 'ls/maint-mailinfo-patch-label'
Junio C Hamano [Tue, 15 Jul 2008 06:47:23 +0000 (23:47 -0700)]
Merge branch 'ls/maint-mailinfo-patch-label'

* ls/maint-mailinfo-patch-label:
  git-mailinfo: Fix getting the subject from the in-body [PATCH] line

15 years agoMerge branch 'om/rerere-careful'
Junio C Hamano [Tue, 15 Jul 2008 06:47:14 +0000 (23:47 -0700)]
Merge branch 'om/rerere-careful'

* om/rerere-careful:
  builtin-rerere: more carefully find conflict markers

15 years agoMerge branch 'jc/branch-merged'
Junio C Hamano [Tue, 15 Jul 2008 06:47:01 +0000 (23:47 -0700)]
Merge branch 'jc/branch-merged'

* jc/branch-merged:
  branch --merged/--no-merged: allow specifying arbitrary commit
  branch --contains: default to HEAD
  parse-options: add PARSE_OPT_LASTARG_DEFAULT flag

Conflicts:
Documentation/git-branch.txt

15 years agoMerge branch 'jc/rebase-orig-head'
Junio C Hamano [Tue, 15 Jul 2008 06:45:49 +0000 (23:45 -0700)]
Merge branch 'jc/rebase-orig-head'

* jc/rebase-orig-head:
  Documentation: mention ORIG_HEAD in am, merge, and rebase
  Teach "am" and "rebase" to mark the original position with ORIG_HEAD

15 years agobash completion: Remove dashed command completion support
Shawn O. Pearce [Tue, 15 Jul 2008 05:58:06 +0000 (05:58 +0000)]
bash completion: Remove dashed command completion support

Since only 'git' and 'gitk' are in the user's $PATH now we do not
expect users to need completion support for git-fetch, and expect
they will instead rely upon the completion support for 'git fetch'.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoMerge branch 'sp/maint-bash-completion-optim'
Junio C Hamano [Tue, 15 Jul 2008 06:36:08 +0000 (23:36 -0700)]
Merge branch 'sp/maint-bash-completion-optim'

* sp/maint-bash-completion-optim:
  bash completion: Resolve git show ref:path<tab> losing ref: portion
  bash completion: Append space after file names have been completed

15 years agorestore legacy behavior for read_sha1_file()
Nicolas Pitre [Tue, 15 Jul 2008 01:46:48 +0000 (21:46 -0400)]
restore legacy behavior for read_sha1_file()

Since commit 8eca0b47ff1598a6d163df9358c0e0c9bd92d4c8, it is possible
for read_sha1_file() to return NULL even with existing objects when they
are corrupted.  Previously a corrupted object would have terminated the
program immediately, effectively making read_sha1_file() return NULL
only when specified object is not found.

Let's restore this behavior for all users of read_sha1_file() and
provide a separate function with the ability to not terminate when
bad objects are encountered.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agobash: Add long option completion for 'git send-email'
Teemu Likonen [Mon, 14 Jul 2008 08:21:02 +0000 (11:21 +0300)]
bash: Add long option completion for 'git send-email'

Add the following long options to be completed with 'git send-email':

    --bcc --cc --cc-cmd --chain-reply-to --compose --dry-run
    --envelope-sender --from --identity --in-reply-to
    --no-chain-reply-to --no-signed-off-by-cc --no-suppress-from
    --no-thread --quiet --signed-off-by-cc --smtp-pass --smtp-server
    --smtp-server-port --smtp-ssl --smtp-user --subject --suppress-cc
    --suppress-from --thread --to

Short ones like --to and --cc are not usable for actual completion
because of the shortness itself and because there are longer ones which
start with same letters (--thread, --compose). It's still useful to have
these shorter options _listed_ when user presses TAB key after typing
two dashes. It gives user an idea what options are available (and --to
and --cc are probably the most commonly used).

Signed-off-by: Teemu Likonen <tlikonen@iki.fi>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agogit-submodule - register submodule URL if adding in place
Mark Levedahl [Thu, 10 Jul 2008 01:05:41 +0000 (21:05 -0400)]
git-submodule - register submodule URL if adding in place

When adding a new submodule in place, meaning the user created the
submodule as a git repo in the superproject's tree first, we don't go
through "git submodule init" to register the module.  Thus, the
submodule's origin repository URL is not stored in .git/config, and no
subsequent submodule operation will ever do so.  In this case, assume the
URL the user supplies to "submodule add" is the one that should be
registered, and do so.

Signed-off-by: Mark Levedahl <mlevedahl@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>