1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-06-02 11:46:11 +02:00
Commit Graph

17171 Commits

Author SHA1 Message Date
Brandon Casey a83c88525e t7700: demonstrate misbehavior of 'repack -a' when local packs exist
The ability to "...fatten [the] local repository by packing everything that
is needed by the local ref into a single new pack, including things that are
borrowed from alternates"[1] is supposed to be provided by the '-a' or '-A'
options to repack when '-l' is not used, but there is a flaw.  For each
pack in the local repository without a .keep file, repack supplies a
--unpacked=<pack> argument to pack-objects.

The --unpacked option to pack-objects, with or without an argument, causes
pack-objects to ignore any object which is packed in a pack not mentioned
in an argument to --unpacked=.  So, if there are local packs, and
'repack -a' is called, then any objects which reside in packs accessible
through alternates will _not_ be packed.  If there are no local packs, then
no --unpacked argument will be supplied, and repack will behave as expected.

[1] http://mid.gmane.org/7v8wrwidi3.fsf@gitster.siamese.dyndns.org

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-17 23:44:33 -08:00
Keith Cascio 7a38329130 test more combinations of ignore-whitespace options to diff
There are three flags involved (-w -b and --ignore-space-at-eol) which
makes 8 combinations possible in total, but only 3 cases are tested (none,
-w alone and -b alone).

This adds the other 5 cases.

Signed-off-by: Keith Cascio <keith@cs.ucla.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-17 23:43:31 -08:00
Junio C Hamano 8b75d31c94 Merge branch 'ds/uintmax-config'
* ds/uintmax-config:
  autoconf: Enable threaded delta search when pthreads are supported
2009-01-17 23:08:53 -08:00
Junio C Hamano 094f75b433 Merge branch 'gb/gitweb-opml'
* gb/gitweb-opml:
  gitweb: suggest name for OPML view
  gitweb: don't use pathinfo for global actions
2009-01-17 23:07:19 -08:00
Junio C Hamano 8f31355692 Merge branch 'mv/apply-parse-opt'
* mv/apply-parse-opt:
  Resurrect "git apply --flags -" to read from the standard input
  parse-opt: migrate builtin-apply.
2009-01-17 23:06:53 -08:00
Junio C Hamano 90abc19b5a Merge branch 'tr/rebase-root'
* tr/rebase-root:
  rebase: update documentation for --root
  rebase -i: learn to rebase root commit
  rebase: learn to rebase root commit
  rebase -i: execute hook only after argument checking
2009-01-17 23:06:38 -08:00
Junio C Hamano 6fc2a19969 Merge branch 'gb/gitweb-patch'
* gb/gitweb-patch:
  gitweb: link to patch(es) view in commit(diff) and (short)log view
  gitweb: add patches view
  gitweb: change call pattern for git_commitdiff
  gitweb: add patch view

Conflicts:
	gitweb/gitweb.perl
2009-01-17 23:06:19 -08:00
Junio C Hamano 6af384ce73 Merge branch 'ap/clone-into-empty'
* ap/clone-into-empty:
  Allow cloning to an existing empty directory
  add is_dot_or_dotdot inline function
2009-01-17 23:05:54 -08:00
Junio C Hamano cd1dbd37d9 Merge branch 'jc/maint-format-patch'
* jc/maint-format-patch:
  format-patch: show patch text for the root commit
2009-01-17 23:05:50 -08:00
Junio C Hamano 33256e6b1b Merge branch 'tr/maint-no-index-fixes'
* tr/maint-no-index-fixes:
  diff --no-index -q: fix endless loop
  diff --no-index: test for pager after option parsing
  diff: accept -- when using --no-index
2009-01-17 23:05:38 -08:00
Junio C Hamano 5786f4fac7 Merge branch 'as/autocorrect-alias'
* as/autocorrect-alias:
  git.c: make autocorrected aliases work
2009-01-17 23:05:34 -08:00
Junio C Hamano 39d743864b Merge branch 'rs/fgrep'
* rs/fgrep:
  grep: don't call regexec() for fixed strings
  grep -w: forward to next possible position after rejected match
2009-01-17 23:05:28 -08:00
Junio C Hamano b4147b3af2 Merge branch 'rs/maint-shortlog-foldline'
* rs/maint-shortlog-foldline:
  shortlog: handle multi-line subjects like log --pretty=oneline et. al. do
2009-01-17 23:05:23 -08:00
Junio C Hamano 8f5707f9a9 Merge branch 'mh/maint-commit-color-status'
* mh/maint-commit-color-status:
  git-status -v: color diff output when color.ui is set
  git-commit: color status output when color.ui is set
2009-01-17 23:05:19 -08:00
Junio C Hamano 58f37f3c07 Merge branch 'maint'
* maint:
  Update draft release notes for 1.6.1.1
  builtin-fsck: fix off by one head count
  t5540: clarify that http-push does not handle packed-refs on the remote
  http-push: when making directories, have a trailing slash in the path name
  http-push: fix off-by-path_len
  Documentation: let asciidoc align related options
  githooks.txt: add missing word
  builtin-commit.c: do not remove COMMIT_EDITMSG
2009-01-17 23:04:40 -08:00
Junio C Hamano 9d3043cf33 Update draft release notes for 1.6.1.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-17 23:04:35 -08:00
Junio C Hamano 78f111e12d Merge branch 'maint-1.6.0' into maint
* maint-1.6.0:
  builtin-fsck: fix off by one head count
  Documentation: let asciidoc align related options
  githooks.txt: add missing word
  builtin-commit.c: do not remove COMMIT_EDITMSG
2009-01-17 22:39:49 -08:00
Christian Couder 3aed2fda6f builtin-fsck: fix off by one head count
According to the man page, if "git fsck" is passed one or more heads, it
should verify connectivity and validity of only objects reachable from the
heads it is passed.

However, since 5ac0a20 (Make builtin-fsck.c use parse_options.,
2007-10-15) the command behaved as if no heads were passed, when given
only one argument.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-17 22:37:41 -08:00
David Aguilar 5c38ea31f3 contrib: add 'git difftool' for launching common merge tools
'git difftool' is a git command that allows you to compare and edit files
between revisions using common merge tools.  'git difftool' does what
'git mergetool' does but its use is for non-merge situations such as
when preparing commits or comparing changes against the index.
It uses the same configuration variables as 'git mergetool' and
provides the same command-line interface as 'git diff'.

Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-17 21:40:57 -08:00
SZEDER Gábor 3d279863de bash: refactor 'git log --pretty=<format>' options
Both 'git log' and 'show' have the same '--pretty=<format>' option
with the same formats.  So refactor these formats into a common
variable.

While at it, also add 'format:' to the list.

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-17 18:23:27 -08:00
SZEDER Gábor 8108513422 bash: add missing format-patch command line options
Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-17 18:22:46 -08:00
SZEDER Gábor 7de931c3c2 bash: remove unnecessary checks for long options with argument
__gitcomp takes care of it since 5447aac7 (bash: fix long option with
argument double completion, 2008-03-05)

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-17 18:22:21 -08:00
Johannes Schindelin 8ee09acd8f t5540: clarify that http-push does not handle packed-refs on the remote
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-17 18:20:00 -08:00
Johannes Schindelin 466ddf90c2 http-push: when making directories, have a trailing slash in the path name
The function lock_remote() sends MKCOL requests to make leading
directories; However, if it does not put a forward slash '/' at the end of
the path, the server sends a 301 redirect.

By leaving the '/' in place, we can avoid this additional step.

Incidentally, at least one version of Curl (7.16.3) does not resend
credentials when it follows a 301 redirect, so this commit also fixes
a bug.

Original patch by Tay Ray Chuan <rctay89@gmail.com>.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-17 18:19:46 -08:00
Johannes Schindelin 20642801e4 http-push: fix off-by-path_len
When getting the result of remote_ls(), we were advancing the variable
"path" to the relative path inside the repository.

However, then we went on to malloc a bogus amount of memory: we were
subtracting the prefix length _again_, quite possibly getting something
negative, which xmalloc() interprets as really, really much.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-17 18:19:35 -08:00
Markus Heidelberg 6b89d068bd Documentation: let asciidoc align related options
Fixes the description of the -t option in git-mergetool, which
failed to hint that it takes an argument.

Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-17 18:17:29 -08:00
Markus Heidelberg bf474e2402 Documentation: let asciidoc align related options
Command line options can share the same paragraph of description, if
they are related or synonymous. In these cases they should be written
among each other, so that asciidoc can format them itself.

Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-17 18:01:46 -08:00
Stephan Beyer 9968696015 githooks.txt: add missing word
Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-17 17:57:41 -08:00
Stephan Beyer 2454ac7b9f builtin-commit.c: do not remove COMMIT_EDITMSG
git-commit tries to remove the file ./COMMIT_EDITMSG instead of
$GIT_DIR/COMMIT_EDITMSG after commit preparation (e.g. running
hooks, launching editor).
This behavior exists since f5bbc3225c "Port git commit to C".

Some test cases (e.g. t/t7502-commit.sh) rely on the existence of
$GIT_DIR/COMMIT_EDITMSG after committing and, I guess, many people
are used to it.  So it is best not to remove it.

This patch just removes the removal of COMMIT_EDITMSG.

Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-17 17:57:35 -08:00
Junio C Hamano 7bbd8d6c13 Merge branch 'maint'
* maint:
  t3404: Add test case for auto-amending only edited commits after "edit"
  t3404: Add test case for aborted --continue after "edit"
  t3501: check that commits are actually done
2009-01-15 18:52:35 -08:00
Junio C Hamano ebb7bbf769 Merge branch 'maint-1.6.0' into maint
* maint-1.6.0:
  t3404: Add test case for auto-amending only edited commits after "edit"
  t3404: Add test case for aborted --continue after "edit"
  t3501: check that commits are actually done
2009-01-15 14:33:54 -08:00
Stephan Beyer f8aa1b6902 t3404: Add test case for auto-amending only edited commits after "edit"
Add a test case for the bugfix introduced by commit c14c3c82d
"git-rebase--interactive: auto amend only edited commit".

Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-15 14:22:53 -08:00
Stephan Beyer dc7f55cbe9 t3404: Add test case for aborted --continue after "edit"
Add a test case for the bugfix introduced by commit 8beb1f33d
"git-rebase-interactive: do not squash commits on abort".

Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-15 14:22:42 -08:00
Stephan Beyer 944019c8b3 t3501: check that commits are actually done
The basic idea of t3501 is to check whether revert
and cherry-pick works on renamed files.
But as there is no pure cherry-pick/revert test, it is
good to also check if commits are actually done in that
scenario.

Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-15 14:22:12 -08:00
Ted Pavlic a42577d4c8 bash-completion: Add comments to remind about required arguments
Add a few simple comments above commands that take arguments. These
comments are meant to remind developers of potential problems that
can occur when the script is sourced on systems with "set -u." Any
function which requires arguments really ought to be called with
explicit arguments given.

Also adds a #!bash to the top of bash completions so that editing
software can always identify that the file is of sh type.

Signed-off-by: Ted Pavlic <ted@tedpavlic.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-15 09:35:46 -08:00
Ted Pavlic 50e126e185 bash-completion: Try bash completions before simple filetype
When a git completion is not found, a bash shell should try bash-type
completions first before going to standard filetype completions. This
patch adds "-o bashdefault" to the completion line. If that option is
not available, it uses the old method.

This behavior was inspired by Mercurial's bash completion script.

Signed-off-by: Ted Pavlic <ted@tedpavlic.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-15 09:34:54 -08:00
Ted Pavlic 25a31f8140 bash-completion: Support running when set -u is enabled
Under "set -u" semantics, it is an error to access undefined variables.
Some user environments may enable this setting in the interactive shell.

In any context where the completion functions access an undefined
variable, accessing a default empty string (aka "${1-}" instead of "$1")
is a reasonable way to code the function, as it silences the undefined
variable error while still supplying an empty string.

In this patch, functions that should always take an argument still use
$1. Functions that have optional arguments use ${1-}.

Signed-off-by: Ted Pavlic <ted@tedpavlic.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-15 09:33:26 -08:00
Junio C Hamano b32acd21d8 Merge branch 'maint'
* maint:
  Update draft release notes to 1.6.1.1
  Make t3411 executable
  fix handling of multiple untracked files for git mv -k
  add test cases for "git mv -k"
2009-01-14 22:58:46 -08:00
Junio C Hamano eb475bfa05 Update draft release notes to 1.6.1.1 2009-01-14 22:43:04 -08:00
Junio C Hamano 914186a5c3 Merge branch 'maint-1.6.0' into maint
* maint-1.6.0:
  fix handling of multiple untracked files for git mv -k
  add test cases for "git mv -k"
2009-01-14 22:34:05 -08:00
Miklos Vajna 8dca683346 Make t3411 executable
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-14 17:00:00 -08:00
Michael J Gruber be17262d13 fix handling of multiple untracked files for git mv -k
The "-k" option to "git mv" should allow specifying multiple untracked
files. Currently, multiple untracked files raise an assertion if they
appear consecutively as arguments. Fix this by decrementing the loop
index after removing one entry from the array of arguments.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-14 09:34:22 -08:00
Michael J Gruber 3772923f14 add test cases for "git mv -k"
Add test cases for ignoring nonexisting and untracked files using the -k
option to "git mv". There is one known breakage related to multiple
untracked files specfied as consecutive arguments.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-14 09:29:24 -08:00
Junio C Hamano 3cf3b838c7 Update 1.6.2 draft release notes
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-13 23:41:32 -08:00
Junio C Hamano e98c6a1686 Merge branch 'maint'
* maint:
  fast-import: Cleanup mode setting.
  Git.pm: call Error::Simple() properly
2009-01-13 23:12:51 -08:00
Junio C Hamano 4f8b8992ef Merge branch 'maint-1.6.0' into maint
* maint-1.6.0:
  fast-import: Cleanup mode setting.
  Git.pm: call Error::Simple() properly
2009-01-13 23:10:50 -08:00
Junio C Hamano 6a15416a89 Merge branch 'nd/grep-assume-unchanged'
* nd/grep-assume-unchanged:
  grep: grep cache entries if they are "assume unchanged"
  grep: support --no-ext-grep to test builtin grep
2009-01-13 23:10:02 -08:00
Junio C Hamano d451b503a6 Merge branch 'as/maint-shortlog-cleanup'
* as/maint-shortlog-cleanup:
  builtin-shortlog.c: use string_list_append(), and don't strdup unnecessarily
2009-01-13 23:10:00 -08:00
Junio C Hamano 350b1091a8 Merge branch 'jc/maint-ls-tree'
* jc/maint-ls-tree:
  Document git-ls-tree --full-tree
  ls-tree: add --full-tree option
2009-01-13 23:09:57 -08:00
Junio C Hamano 9735a44440 Merge branch 'js/bundle-tags'
* js/bundle-tags:
  bundle: allow rev-list options to exclude annotated tags
2009-01-13 23:09:50 -08:00