Commit graph

1490 commits

Author SHA1 Message Date
Junio C Hamano 267123b429 Merge branch 'maint'
* maint:
  format-patch: generate MIME header as needed even when there is format.header
2008-03-15 00:09:33 -07:00
Junio C Hamano 6bf4f1b4c9 format-patch: generate MIME header as needed even when there is format.header
Earlier, the callchain from pretty_print_commit() down to pp_title_line()
had an unwarranted assumption that the presense of "after_subject"
parameter, means the caller has already output MIME headers for
attachments.  The parameter's primary purpose is to give extra header
lines the caller wants to place after pp_title_line() generates the
"Subject: " line.

This assumption does not hold when the user used the format.header
configuration variable to pass extra headers, and caused a message with
non-ASCII character to lack proper MIME headers (e.g.  8-bit CTE header).
The earlier logic also failed to suppress duplicated MIME headers when
"format-patch -s --attach" is asked for and the signer's name demanded
8-bit clean transport.

This patch fixes the logic by introducing a separate need_8bit_cte
parameter passed down the callchain.  This can have one of these values:

 -1 : we've already done MIME crap and we do not want to add extra header
      to say this is 8bit in pp_title_line();

  0 : we haven't done MIME and we have not seen anything that is 8bit yet;

  1 : we haven't done MIME and we have seen something that is 8bit;
      pp_title_line() must add MIME header.

It adds two tests by Jeff King who independently diagnosed this issue.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-15 00:06:06 -07:00
Jeff King aab0abf7ef t6000lib: re-fix tr portability
It seems that some implementations of tr don't like a
replacement string of '-----...'; they try to find the
double-dash option "---...".

Instead of this pipeline of tr and sed invocations, just use a
single perl invocation.

Signed-off-by: Jeff King <peff@peff.net>
2008-03-14 17:53:22 -07:00
Junio C Hamano 16007f3916 Merge branch 'maint'
* maint:
  merge-file: handle empty files gracefully
  merge-recursive: handle file mode changes
  Minor wording changes in the keyboard descriptions in git-add --interactive.
  git fetch: Take '-n' to mean '--no-tags'
  quiltimport: fix misquoting of parsed -p<num> parameter
  git-quiltimport: better parser to grok "enhanced" series files.
2008-03-14 00:16:42 -07:00
Clemens Buchacher 1affea4f62 merge-recursive: handle file mode changes
File mode changes should be handled similarly to changes of content.
That is, if the file mode changed in only one branch, keep the changed
version, and if both branch changed to different mode, mark it as a
conflict.

Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-13 23:41:16 -07:00
Jeff King 462f8caf24 t7505: use SHELL_PATH in hook
The hook doesn't run properly under Solaris /bin/sh. Let's
use the SHELL_PATH the user told us about already instead.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-13 00:57:53 -07:00
Jeff King 32aedd5496 t9112: add missing #!/bin/sh header
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-13 00:57:53 -07:00
Jeff King cde2ed25ad t6000lib: tr portability fix
Some versions of tr complain if the number of characters in
both sets isn't the same. So here we must manually expand
the dashes in set2.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-13 00:57:53 -07:00
Jeff King 53a5b443b4 t4020: don't use grep -a
Solaris /usr/bin/grep doesn't understand "-a". In this case
we can just include the expected output with the test, which
is a better test anyway.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-13 00:57:53 -07:00
Jeff King 82ebb0b6ec add test_cmp function for test scripts
Many scripts compare actual and expected output using
"diff -u". This is nicer than "cmp" because the output shows
how the two differ. However, not all versions of diff
understand -u, leading to unnecessary test failure.

This adds a test_cmp function to the test scripts and
switches all "diff -u" invocations to use it. The function
uses the contents of "$GIT_TEST_CMP" to compare its
arguments; the default is "diff -u".

On systems with a less-capable diff, you can do:

  GIT_TEST_CMP=cmp make test

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-13 00:57:52 -07:00
Jeff King b4ce54fc61 remove use of "tail -n 1" and "tail -1"
The "-n" syntax is not supported by System V versions of
tail (which prefer "tail -1"). Unfortunately "tail -1" is
not actually POSIX.  We had some of both forms in our
scripts.

Since neither form works everywhere, this patch replaces
both with the equivalent sed invocation:

  sed -ne '$p'

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-13 00:57:52 -07:00
Jeff King aadbe44f88 grep portability fix: don't use "-e" or "-q"
System V versions of grep (such as Solaris /usr/bin/grep)
don't understand either of these options. git's usage of
"grep -e pattern" fell into one of two categories:

 1. equivalent to "grep pattern". -e is only useful here if
    the pattern begins with a "-", but all of the patterns
    are hardcoded and do not begin with a dash.

 2. stripping comments and blank lines with

      grep -v -e "^$" -e "^#"

    We can fortunately do this in the affirmative as

      grep '^[^#]'

Uses of "-q" can be replaced with redirection to /dev/null.
In many tests, however, "grep -q" is used as "if this string
is in the expected output, we are OK". In this case, it is
fine to just remove the "-q" entirely; it simply makes the
"verbose" mode of the test slightly more verbose.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-13 00:57:52 -07:00
Jeff King e85fe4d85b more tr portability test script fixes
Dealing with NULs is not always safe with tr. On Solaris,
incoming NULs are silently deleted by both the System V and
UCB versions of tr. When converting to NULs, the System V
version works fine, but the UCB version silently ignores the
request to convert the character.

This patch changes all instances of tr using NULs to use
"perl -pe 'y///'" instead.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-13 00:57:52 -07:00
Jeff King e8e29c7b55 t0050: perl portability fix
Older versions of perl (such as 5.005) don't understand -CO, nor
do they understand the "U" pack specifier. Instead of using perl,
let's just printf the binary bytes we are interested in.

Signed-off-by: Jeff King <peff@peff.net>
Tested-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-13 00:57:40 -07:00
Johannes Schindelin 25ee9731c1 gc: call "prune --expire 2.weeks.ago" by default
The only reason we did not call "prune" in git-gc was that it is an
inherently dangerous operation: if there is a commit going on, you will
prune loose objects that were just created, and are, in fact, needed by the
commit object just about to be created.

Since it is dangerous, we told users so.  That led to many users not even
daring to run it when it was actually safe. Besides, they are users, and
should not have to remember such details as when to call git-gc with
--prune, or to call git-prune directly.

Of course, the consequence was that "git gc --auto" gets triggered much
more often than we would like, since unreferenced loose objects (such as
left-overs from a rebase or a reset --hard) were never pruned.

Alas, git-prune recently learnt the option --expire <minimum-age>, which
makes it a much safer operation.  This allows us to call prune from git-gc,
with a grace period of 2 weeks for the unreferenced loose objects (this
value was determined in a discussion on the git list as a safe one).

If you want to override this grace period, just set the config variable
gc.pruneExpire to a different value; an example would be

	[gc]
		pruneExpire = 6.months.ago

or even "never", if you feel really paranoid.

Note that this new behaviour makes "--prune" be a no-op.

While adding a test to t5304-prune.sh (since it really tests the implicit
call to "prune"), also the original test for "prune --expire" was moved
there from t1410-reflog.sh, where it did not belong.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2008-03-12 23:47:01 -07:00
Jeff King 40a7ce64e1 tr portability fixes
Specifying character ranges in tr differs between System V
and POSIX. In System V, brackets are required (e.g.,
'[A-Z]'), whereas in POSIX they are not.

We can mostly get around this by just using the bracket form
for both sets, as in:

  tr '[A-Z] '[a-z]'

in which case POSIX interpets this as "'[' becomes '['",
which is OK.

However, this doesn't work with multiple sequences, like:

  # rot13
  tr '[A-Z][a-z]' '[N-Z][A-M][n-z][a-m]'

where the POSIX version does not behave the same as the
System V version. In this case, we must simply enumerate the
sequence.

This patch fixes problematic uses of tr in git scripts and
test scripts in one of three ways:

  - if a single sequence, make sure it uses brackets
  - if multiple sequences, enumerate
  - if extra brackets (e.g., tr '[A]' 'a'), eliminate
    brackets

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-12 21:10:00 -07:00
Ping Yin 2da2ddc664 git-submodule summary: test
Signed-off-by: Ping Yin <pkufranky@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-11 23:20:06 -07:00
Junio C Hamano ae90e16a3a Merge branch 'js/remote'
* js/remote:
  "remote update": print remote name being fetched from
  builtin remote rm: remove symbolic refs, too
  remote: fix "update [group...]"
  remote show: Clean up connection correctly if object fetch wasn't done
  builtin-remote: prune remotes correctly that were added with --mirror
  Make git-remote a builtin
  Test "git remote show" and "git remote prune"
  parseopt: add flag to stop on first non option
  path-list: add functions to work with unsorted lists

Conflicts:

	parse-options.c
2008-03-11 22:33:51 -07:00
Junio C Hamano b85997d14d Merge branch 'lt/unpack-trees'
* lt/unpack-trees:
  unpack_trees(): fix diff-index regression.
  traverse_trees_recursive(): propagate merge errors up
  unpack_trees(): minor memory leak fix in unused destination index
  Make 'unpack_trees()' have a separate source and destination index
  Make 'unpack_trees()' take the index to work on as an argument
  Add 'const' where appropriate to index handling functions
  Fix tree-walking compare_entry() in the presense of --prefix
  Move 'unpack_trees()' over to 'traverse_trees()' interface
  Make 'traverse_trees()' traverse conflicting DF entries in parallel
  Add return value to 'traverse_tree()' callback
  Make 'traverse_tree()' use linked structure rather than 'const char *base'
  Add 'df_name_compare()' helper function
2008-03-11 22:13:44 -07:00
Junio C Hamano b81a7b5887 Merge branch 'maint'
* maint:
  git-svn: fix find-rev error message when missing arg
  t0021: tr portability fix for Solaris
  launch_editor(): allow spaces in the filename
  git rebase --abort: always restore the right commit
2008-03-11 21:40:47 -07:00
Jeff King 7339eb0823 t0021: tr portability fix for Solaris
Solaris' /usr/bin/tr doesn't seem to like multiple character
ranges in brackets (it simply prints "Bad string").

Instead, let's just enumerate the transformation we want.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-11 21:14:59 -07:00
Johannes Schindelin fc99469a2b launch_editor(): allow spaces in the filename
The construct

	sh -c "$0 \"$@\"" <editor> <file>

does not pick up quotes in <editor>, so you cannot give path to the
editor that has a shell IFS whitespace in it, and also give it initial
set of parameters and flags.  Replace $0 with <editor> to fix this issue.

This fixes

	git config core.editor '"c:/Program Files/What/Ever.exe"'

In other words, you can specify an editor with spaces in its path using a
config containing something like this:

	[core]
		editor = \"c:/Program Files/Darn/Spaces.exe\"

NOTE: we cannot just replace the $0 with \"$0\", because we still want
this to work:

	[core]
		editor = emacs -nw

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-11 19:57:56 -07:00
Mike Hommey 4201bb5f7e git rebase --abort: always restore the right commit
Previously, --abort would end by git resetting to ORIG_HEAD, but some
commands, such as git reset --hard (which happened in git rebase --skip,
but could just as well be typed by the user), would have already modified
ORIG_HEAD.

Just use the orig-head we store in $dotest instead.

[jc: cherry-picked from 48411d and 4947cf9 on 'master']

Signed-off-by: Mike Hommey <mh@glandium.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-11 19:30:33 -07:00
Junio C Hamano 92aeb994d3 Merge branch 'kb/maint-filter-branch-disappear' into maint
* kb/maint-filter-branch-disappear:
  filter-branch: handle "disappearing tree" case correctly in subdir filter
2008-03-11 00:38:29 -07:00
Linus Torvalds 34110cd4e3 Make 'unpack_trees()' have a separate source and destination index
We will always unpack into our own internal index, but we will take the
source from wherever specified, and we will optionally write the result
to a specified index (optionally, because not everybody even _wants_ any
result: the index diffing really wants to just walk the tree and index
in parallel).

This ends up removing a fair number more lines than it adds, for the
simple reason that we can now skip all the crud that tried to be
oh-so-careful about maintaining our position in the index as we were
traversing and modifying it.  Since we don't actually modify the source
index any more, we can just update the 'o->pos' pointer without worrying
about whether an index entry got removed or replaced or added to.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-09 01:03:38 -08:00
Johannes Schindelin 3b9dcff5df builtin remote rm: remove symbolic refs, too
"git remote add" can add a symbolic ref "HEAD", and "rm" should delete
it, too.

Noticed by Teemu Likonen.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-08 21:30:22 -08:00
Jeff King 50753d00d6 Add a test for read-tree -u --reset with a D/F conflict
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-08 21:30:05 -08:00
Junio C Hamano 1cbcefb107 Merge branch 'ph/parseopt'
* ph/parseopt:
  parse-options: new option type to treat an option-like parameter as an argument.
  parse-opt: bring PARSE_OPT_HIDDEN and NONEG to git-rev-parse --parseopt
2008-03-08 21:29:59 -08:00
Junio C Hamano 175f559551 Merge branch 'dp/clean-fix'
* dp/clean-fix:
  git-clean: add tests for relative path
  git-clean: correct printing relative path
  Make private quote_path() in wt-status.c available as quote_path_relative()
  Revert part of d089eba (setup: sanitize absolute and funny paths in get_pathspec())
  Revert part of 1abf095 (git-add: adjust to the get_pathspec() changes)
  Revert part of 744dacd (builtin-mv: minimum fix to avoid losing files)
  get_pathspec(): die when an out-of-tree path is given
2008-03-08 21:29:56 -08:00
Junio C Hamano 5b278ebe87 Merge branch 'sp/fetch-optim'
* sp/fetch-optim:
  Teach git-fetch to exploit server side automatic tag following
  Teach fetch-pack/upload-pack about --include-tag
  git-pack-objects: Automatically pack annotated tags if object was packed
  Teach git-fetch to grab a tag at the same time as a commit
  Make git-fetch follow tags we already have objects for sooner
  Teach upload-pack to log the received need lines to an fd
  Free the path_lists used to find non-local tags in git-fetch
  Allow builtin-fetch's find_non_local_tags to append onto a list
  Ensure tail pointer gets setup correctly when we fetch HEAD only
  Remove unnecessary delaying of free_refs(ref_map) in builtin-fetch
  Remove unused variable in builtin-fetch find_non_local_tags
2008-03-08 20:11:35 -08:00
Junio C Hamano dabc42c713 Merge branch 'jc/am'
* jc/am:
  am: --rebasing
  am: remove support for -d .dotest
  am: read from the right mailbox when started from a subdirectory
2008-03-08 20:10:05 -08:00
Junio C Hamano 832d586a0c Merge branch 'kb/maint-filter-branch-disappear'
* kb/maint-filter-branch-disappear:
  filter-branch: handle "disappearing tree" case correctly in subdir filter
2008-03-08 20:09:13 -08:00
Junio C Hamano ad416ed433 Merge branch 'maint' to sync with 1.5.4.4
* maint:
  GIT 1.5.4.4
  ident.c: reword error message when the user name cannot be determined
  Fix dcommit, rebase when rewriteRoot is in use
  Really make the LF after reset in fast-import optional
2008-03-08 20:07:57 -08:00
Junio C Hamano 5b044ac387 filter-branch: handle "disappearing tree" case correctly in subdir filter
The subdirectory filter had a bug to notice that the commit in question
did not have anything in the path-limited part of the tree.  $commit:$path
does not name an empty tree when $path does not appear in $commit.

This should fix it.  The additional test in t7003 is originally from Kevin
Ballard but with fixups.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-08 13:25:57 -08:00
Adeodato Simó 655e8515f2 Really make the LF after reset in fast-import optional
cmd_from() ends with a call to read_next_command(), which is needed
when using cmd_from() from commands where from is not the last element.

With reset, however, "from" is the last command, after which the flow
returns to the main loop, which calls read_next_command() again.

Because of this, always set unread_command_buf in cmd_reset_branch(),
even if cmd_from() was successful.

Add a test case for this in t9300-fast-import.sh.

Signed-off-by: Adeodato Simó <dato@net.com.org.es>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-08 10:46:10 -08:00
Junio C Hamano 274d9d3294 Merge branch 'js/maint-cvsexport' into maint
* js/maint-cvsexport:
  cvsexportcommit: be graceful when "cvs status" reorders the arguments

Conflicts:

	t/t9200-git-cvsexportcommit.sh
2008-03-08 02:13:52 -08:00
Junio C Hamano 60e3cad92e Merge branch 'maint'
* maint:
  unquote_c_style: fix off-by-one.
  test-lib: fix TERM to dumb for test repeatability
  config.txt: refer to --upload-pack and --receive-pack instead of --exec
  git-gui: Gracefully fall back to po2msg.sh if msgfmt --tcl fails
2008-03-07 22:43:46 -08:00
Junio C Hamano d33046c1ed Merge branch 'js/reflog-delete'
* js/reflog-delete:
  t3903-stash.sh: Add tests for new stash commands drop and pop
  git-reflog.txt: Document new commands --updateref and --rewrite
  t3903-stash.sh: Add missing '&&' to body of testcase
  git-stash: add new 'pop' subcommand
  git-stash: add new 'drop' subcommand
  git-reflog: add option --updateref to write the last reflog sha1 into the ref
  refs.c: make close_ref() and commit_ref() non-static
  git-reflog: add option --rewrite to update reflog entries while expiring
  reflog-delete: parse standard reflog options
  builtin-reflog.c: fix typo that accesses an unset variable
  Teach "git reflog" a subcommand to delete single entries
2008-03-07 22:34:26 -08:00
Junio C Hamano 5b7570cfb4 git-clean: add tests for relative path
This adds tests for recent change by Dmitry to fix the report "git
clean" gives on removed paths, and also makes sure the command detects
paths that is outside working tree.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-07 21:56:56 -08:00
Junio C Hamano c2116a1783 test-lib: fix TERM to dumb for test repeatability
Dscho noticed that Term::ReadLine (used by send-email) colorized its
output for his TERM settings, inside t9001 tests.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-07 13:29:07 -08:00
Martin Koegler 38a5739dfa t5300: add test for "index-pack --strict"
This adds test for indexing packs with --strict option, basically the same
as c0e809e (t5300: add test for "unpack-objects --strict") has done for
unpack-objects.

Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-07 00:36:56 -08:00
Junio C Hamano 3296766eb5 get_pathspec(): die when an out-of-tree path is given
An earlier commit d089ebaa (setup: sanitize absolute and funny paths) made
get_pathspec() aware of absolute paths, but with a botched interface that
forced the callers to count the resulting pathspecs in order to detect
an error of giving a path that is outside the work tree.

This fixes it, by dying inside the function.

We had ls-tree test that relied on a misfeature in the original
implementation of its pathspec handling.  Leading slashes were silently
removed from them.  However we allow giving absolute pathnames (people
want to cut and paste from elsewhere) that are inside work tree these
days, so a pathspec that begin with slash _should_ be treated as a full
path.  The test is adjusted to match the updated rule for get_pathspec().

Earlier I mistook three tests given by Robin that they should succeed, but
these are attempts to add path outside work tree, which should fail
loudly.  These tests also have been fixed.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-07 00:14:42 -08:00
Johannes Schindelin 84521ed6f2 remote: fix "update [group...]"
The rewrite in C inadvertently broke updating with remote groups: when you
pass parameters to "git remote update", it used to look up "remotes.<group>"
for every parameter, and interpret the value as a list of remotes to update.

Also, no parameter, or a single parameter "default" should update all
remotes that have not been marked with "skipDefaultUpdate".

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-05 12:17:39 -08:00
Charles Bailey 05e934bb9f Add a very basic test script for git mergetool
Signed-off-by: Charles Bailey <charles@hashpling.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-05 12:07:04 -08:00
Junio C Hamano f2898cfadc unpack-objects: fix --strict handling
Earlier attempt (which was reverted) called added_object() (by the way,
the function should be renamed to resolve_dependents() --- it is called
when we have a complete object data, and is responsible to resolve pending
deltified objects that use this object as their delta base object) without
updating obj_list[nr].sha1 with the correct value.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-05 10:53:11 -08:00
Junio C Hamano c0e809e5c0 t5300: add test for "unpack-objects --strict"
This adds test for unpacking deltified objects with --strict option.

 - unpacking full trees with --strict should pass;

 - unpacking only trees with --strict should be rejected due to
   missing blobs;

 - unpacking only trees with --strict into an existing
   repository with necessary blobs should succeed.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-05 10:53:11 -08:00
Junio C Hamano bb034f839a am: read from the right mailbox when started from a subdirectory
An earlier commit c149184 (allow git-am to run in a subdirectory) taught
git-am to start from a subdirectory by going up to the root of the work
tree byitself, but it did not adjust the path to read the mbox from when
it did so.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-05 10:52:56 -08:00
Shawn O. Pearce 41fa7d2eae Teach git-fetch to exploit server side automatic tag following
If the remote peer upload-pack process supports the include-tag
protocol extension then we can avoid running a second fetch cycle
on the client side by letting the server send us the annotated tags
along with the objects it is packing for us.  In the following graph
we can now fetch both "tag1" and "tag2" on the same connection that
we fetched "master" from the remote when we only have L available
on the local side:

         T - tag1          S - tag2
        /                 /
   L - o ------ o ------ B
    \                     \
     \                     \
      origin/master         master

The objects for "tag1" are implicitly downloaded without our direct
knowledge.  The existing "quickfetch" optimization within git-fetch
discovers that tag1 is complete after the first connection and does
not open a second connection.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-04 23:28:15 -08:00
Shawn O. Pearce f0a24aa56e git-pack-objects: Automatically pack annotated tags if object was packed
The new option "--include-tag" allows the caller to request that
any annotated tag be included into the packfile if the object the tag
references was also included as part of the packfile.

This option can be useful on the server side of a native git transport,
where the server knows what commits it is including into a packfile to
update the client.  If new annotated tags have been introduced then we
can also include them in the packfile, saving the client from needing
to request them through a second connection.

This change only introduces the backend option and provides a test.
Protocol extensions to make this useful in fetch-pack/upload-pack
are still necessary to activate the logic during transport.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-04 23:28:14 -08:00
Junio C Hamano 27b4070e40 Merge branch 'maint'
* maint:
  Fix 'git remote show' regression on empty repository in 1.5.4
  Fix incorrect wording in git-merge.txt.
  git-merge.sh: better handling of combined --squash,--no-ff,--no-commit options
  Fix random crashes in http_cleanup()
2008-03-04 00:34:39 -08:00
Mike Hommey 4947cf9cc3 t3407-rebase-abort.sh: Enhance existing tests, and add test for rebase --merge
Removing .dotest should actually not be needed, so just test the directory
don't exist after --abort, but exists after starting the rebase.

Also, execute the same tests with rebase --merge, which uses a different code
path.

Signed-off-by: Mike Hommey <mh@glandium.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-03 22:13:57 -08:00
Alex Riesen a798b2c0f6 Fix test for cleanup failure in t7300 on Windows
Keep the file open to: the OS does not allow removal of open files.
The saner systems just have a saner permission model and chmod 0
is enough for the test.

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-03 21:52:04 -08:00
Junio C Hamano 4d4c3e1c12 t6120 (describe): check --long properly
Existing test checked --long only for exactly tagged commit.  We should
make sure it works sensibly for commits that are not tagged.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-03 18:29:51 -08:00
Shawn O. Pearce 3291fe4072 Add git-describe test for "verify annotated tag names on output"
Back in 212945d4 ("Teach git-describe to verify annotated tag names
before output") I taught git-describe to output the name shown in the
"tag" header of an annotated tag, rather than the name it is actually
stored under in this repository's ref namespace.

This test case verifies this is working correctly by renaming the ref
for an annotated tag to a different name that what is recorded in the
tag body, and verifying that tag is returned.  We also verify there is
a message shown on stderr to inform the user that the tag is possibly
stored under the wrong name locally.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-03 18:26:40 -08:00
Shawn O. Pearce d1b28f512c Test for packed tags in git-describe output
In c374b91c ("git-describe: use tags found in packed-refs correctly")
Junio fixed an issue where git-describe did not parse a tag object it
obtained from a packed-refs file, as the peel information was read in
from packed-refs and not the tag object itself.

This new test case verifies the fix listed above is functioning, and
does not have a regression in the future.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-03 18:26:29 -08:00
Shawn O. Pearce be7bae0d48 Don't allow git-describe failures to go unnoticed in t6120
If git-describe fails we never execute the test_expect_success,
so we never actually test for failure.  This is horribly wrong.
We need to always run the test case, but the test case is only
supposed to succeed if the prior git-describe returned 0.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-03 18:26:23 -08:00
Gerrit Pape e6d1f76ccf git-merge.sh: better handling of combined --squash,--no-ff,--no-commit options
git-merge used to use either the --squash,--no-squash, --no-ff,--ff,
--no-commit,--commit option, whichever came last in the command line.
This lead to some un-intuitive behavior, having

 git merge --no-commit --no-ff <branch>

actually commit the merge.  Now git-merge respects --no-commit together
with --no-ff, as well as other combinations of the options.  However,
this broke a selftest in t/t7600-merge.sh which expected to have --no-ff
completely override the --squash option, so that

 git merge --squash --no-ff <branch>

fast-forwards, and makes a merge commit; combining --squash with --no-ff
doesn't really make sense though, and is now refused by git-merge.  The
test is adapted to test --no-ff without the preceding --squash, and
another test is added to make sure the --squash --no-ff combination is
refused.

The unexpected behavior was reported by John Goerzen through
 http://bing.sdebian.org/468568

Signed-off-by: Gerrit Pape <pape@smarden.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-03 13:38:30 -08:00
Brandon Casey b683c08082 t3903-stash.sh: Add tests for new stash commands drop and pop
Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-03 01:20:59 -08:00
Brandon Casey 059f13045a t3903-stash.sh: Add missing '&&' to body of testcase
Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-03 01:20:59 -08:00
Junio C Hamano f830d45b9f Merge commit '74359821' into js/reflog-delete
* commit '74359821': (128 commits)
  tests: introduce test_must_fail
  Fix builtin checkout crashing when given an invalid path
  templates/Makefile: don't depend on local umask setting
  Correct name of diff_flush() in API documentation
  Start preparing for 1.5.4.4
  format-patch: remove a leftover debugging message
  completion: support format-patch's --cover-letter option
  Eliminate confusing "won't bisect on seeked tree" failure
  builtin-reflog.c: don't install new reflog on write failure
  send-email: fix In-Reply-To regression
  git-svn: Don't prompt for client cert password everytime.
  git.el: Do not display empty directories.
  Fix 'git cvsexportcommit -w $cvsdir ...' when used with relative $GIT_DIR
  Add testcase for 'git cvsexportcommit -w $cvsdir ...' with relative $GIT_DIR
  Prompt to continue when editing during rebase --interactive
  Documentation/git svn log: add a note about timezones.
  git-p4: Support usage of perforce client spec
  git-p4: git-p4 submit cleanups.
  git-p4: Removed git-p4 submit --direct.
  git-p4: Clean up git-p4 submit's log message handling.
  ...
2008-03-03 01:20:19 -08:00
Shawn O. Pearce cf7f929a10 Teach git-fetch to grab a tag at the same time as a commit
If the situation is the following on the remote and L is the common
base between both sides:

          T - tag1    S - tag2
         /           /
    L - A - O - O - B
     \               \
      origin/master   master

and we have decided to fetch "master" to acquire the range L..B we
can also nab tag S at the same time during the first connection,
as we can clearly see from the refs advertised by upload-pack that
S^{} = B and master = B.

Unfortunately we still cannot nab T at the same time as we are not
able to see that T^{} will also be in the range implied by L..B.
Such computations must be performed on the remote side (not yet
supported) or on the client side as post-processing (the current
behavior).

This optimization is an extension of the previous one in that it
helps on projects which tend to publish both a new commit and a
new tag, then lay idle for a while before publishing anything else.
Most followers are able to download both the new commit and the new
tag in one connection, rather than two.  git.git tends to follow
such patterns with its roughly once-daily updates from Junio.

A protocol extension and additional server side logic would be
necessary to also ensure T is grabbed on the first connection.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-03 00:05:45 -08:00
Junio C Hamano 6b48990354 Merge branch 'maint'
* maint:
  Update draft release notes for 1.5.4.4
  revert: actually check for a dirty index
  tests: introduce test_must_fail
  git-submodule: Fix typo 'url' which should be '$url'
  receive-pack: Initialize PATH to include exec-dir.

Conflicts:

	builtin-revert.c
2008-03-02 23:59:50 -08:00
Jeff King 0f2d4476c1 revert: actually check for a dirty index
The previous code mistakenly used wt_status_prepare to check whether the
index had anything commitable in it; however, that function is just an
init function, and will never report a dirty index.

The correct way with wt_status_* would be to call wt_status_print with the
output pointing to /dev/null or similar. However, that does extra work by
both examining the working tree and spewing status information to nowhere.

Instead, let's just implement the useful subset of wt_status_print as an
"is_index_dirty" function.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-02 23:33:59 -08:00
Junio C Hamano 90d0ed96b7 tests: introduce test_must_fail
When we expect a git command to notice and signal errors, we
carelessly wrote in our tests:

    test_expect_success 'reject bogus request' '
        do something &&
        do something else &&
        ! git command
    '

but a non-zero exit could come from the "git command" segfaulting.

A new helper function "tset_must_fail" is introduced and it is
meant to be used to make sure the command gracefully fails (iow,
dying and exiting with non zero status is counted as a failure
to "gracefully fail").  The above example should be written as:

    test_expect_success 'reject bogus request' '
        do something &&
        do something else &&
        test_must_fail git command
    '

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-02 23:15:06 -08:00
Johannes Schindelin 859c4fbef5 format-patch: wrap cover-letter's shortlog sensibly
Earlier, overly-long onelines would not be wrapped at all, and indented
with 6 spaces.

Instead, we now wrap around at 72 characters, with a first-line indent
of 2 spaces, and the rest with 4 spaces.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-02 15:27:27 -08:00
Johannes Schindelin 5d02294c77 format-patch: use the diff options for the cover letter, too
Earlier, when you called "git format-patch --cover-letter -M", the
diffstat in the cover letter would not inherit the "-M".  Now it does.

While at it, add a few "|| break" statements in the test's loops;
otherwise, breakages inside the loops would not be caught.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-02 15:27:08 -08:00
Junio C Hamano d82b21b57a Merge branch 'cb/http-test'
* cb/http-test:
  http-push: add regression tests
  http-push: push <remote> :<branch> deletes remote branch
2008-03-02 15:11:23 -08:00
Junio C Hamano c42f63671c Merge branch 'sb/describe-long'
* sb/describe-long:
  git-describe: --long shows the object name even for a tagged commit
2008-03-02 15:02:56 -08:00
Pierre Habouzit 580d5bffde parse-options: new option type to treat an option-like parameter as an argument.
This is meant to be used to keep --not and --all during revision parsing.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-02 14:07:47 -08:00
Johannes Schindelin e371a4c648 Fix make_absolute_path() for parameters without a slash
When passing "xyz" to make_absolute_path(), make_absolute_path()
erroneously tried to chdir("xyz"), and then append "/xyz".  Instead,
skip the chdir() completely when no slash was found.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-02 01:58:31 -08:00
Junio C Hamano 2b459b483c diff: make sure work tree side is shown as 0{40} when different
Ping Yin noticed that "git diff-index --raw" shows 0{40} when work tree
has submodule difference, but "git diff --raw" didn't correctly do so.

There was a mistake in the diffcore_skip_stat_unmatch() that was meant to
clean up the stat-only difference for running diff between the index and
work tree and diff between the tree and the work tree, to cause it re-read
from the submodule repository HEAD.  When ce_stat_match() says work tree
is different, we should always say 0{40} on the work tree side.

This patch fixes the issue, and adds tests.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-02 01:08:34 -08:00
Mike Hommey 48411d2233 git rebase --abort: always restore the right commit
Previously, --abort would end by git resetting to ORIG_HEAD, but some
commands, such as git reset --hard (which happened in git rebase --skip,
but could just as well be typed by the user), would have already modified
ORIG_HEAD.

Just use the orig-head we store in $dotest instead.

Signed-off-by: Mike Hommey <mh@glandium.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-01 23:52:00 -08:00
Johannes Schindelin 4ebc914c88 builtin-remote: prune remotes correctly that were added with --mirror
This adds special handling for mirror remotes.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-01 01:51:44 -08:00
Johannes Schindelin 211c89682e Make git-remote a builtin
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-01 01:51:44 -08:00
Johannes Schindelin 4704640b61 Test "git remote show" and "git remote prune"
While at it, also fix a few instances where a cd was done outside of a
subshell.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-01 01:51:44 -08:00
Mike Hommey 3ebfe63a82 Add test for git rebase --abort
We expect git rebase --abort to come back to the original (pre-rebase)
head, independently from when it's run during a rebase.

Signed-off-by: Mike Hommey <mh@glandium.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-01 01:15:32 -08:00
Junio C Hamano c3b088d9da t6024: move "git reset" to prepare for a test inside the test itself
Noticed by Mike Hommey.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-01 01:10:12 -08:00
Santi Béjar c6fef0bbea clone: support cloning full bundles
The "humanish" part of a bundle is made removing the ".bundle" suffix.

Signed-off-by: Santi Béjar <sbejar@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-29 16:27:25 -08:00
Junio C Hamano 7435982102 tests: introduce test_must_fail
When we expect a git command to notice and signal errors, we
carelessly wrote in our tests:

    test_expect_success 'reject bogus request' '
        do something &&
        do something else &&
        ! git command
    '

but a non-zero exit could come from the "git command" segfaulting.

A new helper function "tset_must_fail" is introduced and it is
meant to be used to make sure the command gracefully fails (iow,
dying and exiting with non zero status is counted as a failure
to "gracefully fail").  The above example should be written as:

    test_expect_success 'reject bogus request' '
        do something &&
        do something else &&
        test_must_fail git command
    '

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-29 00:00:29 -08:00
Jeff King 7cf7f54a65 use build-time SHELL_PATH in test scripts
The top-level Makefile now creates a GIT-BUILD-OPTIONS file
which stores any options selected by the make process that
may be of use to further parts of the build process.
Specifically, we store the SHELL_PATH so that it can be used
by tests to construct shell scripts on the fly.

The format of the GIT-BUILD-OPTIONS file is Bourne shell,
and it is sourced by test-lib.sh; all tests can rely on just
having $SHELL_PATH correctly set in the environment.

The GIT-BUILD-OPTIONS file is written every time the
toplevel 'make' is invoked. Since the only users right now
are the test scripts, there's no drawback to updating its
timestamp. If something build-related depends on this, we
can do a trick similar to the one used by GIT-CFLAGS.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-29 00:00:29 -08:00
Daniel Barkalow 75336878c7 Write index file on any checkout of files
We need to rewrite the index file when we check out files, even if we
haven't modified the blob info by reading from another tree, so that
we get the stat cache to include the fact that we just modified the
file so it doesn't need to be refreshed.

While we're at it, move everything that needs to be done to check out
some paths from a tree (or the current index) into checkout_paths().

Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-29 00:00:29 -08:00
Miklos Vajna 419e38337a Improve t6029 to check the real "subtree" case
t6029 already checks if subtree available and works like recursive. This
patch adds code to test test the extra functionality the subtree merge
strategy provides.

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-29 00:00:29 -08:00
Clemens Buchacher faa4bc35a0 http-push: add regression tests
http-push tests require a web server with WebDAV support.

This commit introduces a HTTPD test library, which can be configured using
the following environment variables.

GIT_TEST_HTTPD		enable HTTPD tests
LIB_HTTPD_PATH		web server path
LIB_HTTPD_MODULE_PATH	web server modules path
LIB_HTTPD_PORT		listening port
LIB_HTTPD_DAV		enable DAV
LIB_HTTPD_SVN		enable SVN
LIB_HTTPD_SSL		enable SSL

Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-27 15:38:40 -08:00
Junio C Hamano 6d21667206 Merge branch 'maint'
* maint:
  Eliminate confusing "won't bisect on seeked tree" failure
  builtin-reflog.c: don't install new reflog on write failure
  send-email: fix In-Reply-To regression
  Fix 'git cvsexportcommit -w $cvsdir ...' when used with relative $GIT_DIR
  Add testcase for 'git cvsexportcommit -w $cvsdir ...' with relative $GIT_DIR
  Prompt to continue when editing during rebase --interactive
  Documentation/git svn log: add a note about timezones.
  Don't use GIT_CONFIG in t5505-remote

Conflicts:

	t/t9001-send-email.sh
	t/t9200-git-cvsexportcommit.sh
2008-02-27 14:07:51 -08:00
Carl Worth 0f497e75f0 Eliminate confusing "won't bisect on seeked tree" failure
This error message is very confusing---it doesn't tell the user
anything about how to fix the situation. And the actual fix
for the situation ("git bisect reset") does a checkout of a
potentially random branch, (compared to what the user wants to
be on for the bisect she is starting).

The simplest way to eliminate the confusion is to just make
"git bisect start" do the cleanup itself. There's no significant
loss of safety here since we already have a general safety in
the form of the reflog.

Note: We preserve the warning for any cogito users. We do this
by switching from .git/head-name to .git/BISECT_START for the
extra state, (which is a more descriptive name anyway).

Signed-off-by: Carl Worth <cworth@cworth.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-27 13:26:30 -08:00
Jay Soffian 6ecbc851fb send-email: fix In-Reply-To regression
Fix a regression introduced by

1ca3d6e (send-email: squelch warning due to comparing undefined $_ to "")

where if the user was prompted for an initial In-Reply-To and didn't
provide one, messages would be sent out with an invalid In-Reply-To of
"<>"

Also add test cases for the regression and the fix. A small modification
was needed to allow send-email to take its replies from stdin if the
environment variable GIT_SEND_EMAIL_NOTTY is set.

Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-27 13:26:14 -08:00
Junio C Hamano 60b188a984 Merge branch 'js/branch-track'
* js/branch-track:
  doc: documentation update for the branch track changes
  branch: optionally setup branch.*.merge from upstream local branches

Conflicts:

	Documentation/config.txt
	Documentation/git-branch.txt
	Documentation/git-checkout.txt
	builtin-branch.c
	cache.h
	t/t7201-co.sh
2008-02-27 13:02:57 -08:00
Junio C Hamano 5a4d707a6d Merge branch 'db/checkout'
* db/checkout: (21 commits)
  checkout: error out when index is unmerged even with -m
  checkout: show progress when checkout takes long time while switching branches
  Add merge-subtree back
  checkout: updates to tracking report
  builtin-checkout.c: Remove unused prefix arguments in switch_branches path
  checkout: work from a subdirectory
  checkout: tone down the "forked status" diagnostic messages
  Clean up reporting differences on branch switch
  builtin-checkout.c: fix possible usage segfault
  checkout: notice when the switched branch is behind or forked
  Build in checkout
  Move code to clean up after a branch change to branch.c
  Library function to check for unmerged index entries
  Use diff -u instead of diff in t7201
  Move create_branch into a library file
  Build-in merge-recursive
  Add "skip_unmerged" option to unpack_trees.
  Discard "deleted" cache entries after using them to update the working tree
  Send unpack-trees debugging output to stderr
  Add flag to make unpack_trees() not print errors.
  ...

Conflicts:

	Makefile
2008-02-27 12:53:26 -08:00
Junio C Hamano 992221d05e Merge branch 'db/cover-letter'
* db/cover-letter:
  Improve collection of information for format-patch --cover-letter
  Add API access to shortlog
  t4014: Replace sed's non-standard 'Q' by standard 'q'
  Support a --cc=<email> option in format-patch
  Combine To: and Cc: headers
  Fix format.headers not ending with a newline
  Add tests for extra headers in format-patch
  Add a --cover-letter option to format-patch
  Export some email and pretty-printing functions
  Improve message-id generation flow control for format-patch
  Add more tests for format-patch

Conflicts:

	builtin-log.c
	builtin-shortlog.c
	pretty.c
2008-02-27 12:06:41 -08:00
Junio C Hamano cb99be7c7d Merge branch 'js/merge'
* js/merge:
  xdl_merge(): introduce XDL_MERGE_ZEALOUS_ALNUM
  xdl_merge(): make XDL_MERGE_ZEALOUS output simpler
2008-02-27 11:57:19 -08:00
Junio C Hamano 722f53ca2f Merge branch 'cw/bisect'
* cw/bisect:
  Eliminate confusing "won't bisect on seeked tree" failure
2008-02-27 11:56:08 -08:00
Junio C Hamano b82b096b8c Merge branch 'gp/hash-stdin'
* gp/hash-stdin:
  hash-object: cleanup handling of command line options
2008-02-27 11:55:22 -08:00
Junio C Hamano 2f8e2e3eef Merge branch 'db/push-single-with-HEAD'
* db/push-single-with-HEAD:
  Resolve value supplied for no-colon push refspecs
2008-02-27 11:54:28 -08:00
Junio C Hamano 5372715ed2 Merge branch 'db/host-alias'
* db/host-alias:
  url rewriting: take longest and first match
  Add support for url aliases in config files
  Use ALLOC_GROW in remote.{c,h}
2008-02-27 11:54:13 -08:00
Johan Herland 12f0a5ea7d Fix 'git cvsexportcommit -w $cvsdir ...' when used with relative $GIT_DIR
When using the '-w $cvsdir' option to cvsexportcommit, it will chdir into
$cvsdir before executing several other git commands. If $GIT_DIR is set to
a relative path (e.g. '.'), the git commands executed by cvsexportcommit
will naturally fail.

Therefore, ensure that $GIT_DIR is absolute before the chdir to $cvsdir.

Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-27 11:35:09 -08:00
Johan Herland 9057f0a62c Add testcase for 'git cvsexportcommit -w $cvsdir ...' with relative $GIT_DIR
The testcase verifies that 'git cvsexportcommit' functions correctly when
the '-w' option is used, and GIT_DIR is set to a relative path (e.g. '.').

Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-27 11:35:05 -08:00
Daniel Barkalow 2ac8af1619 Don't use GIT_CONFIG in t5505-remote
For some reason, t5505-remote was setting GIT_CONFIG to .git/config
and exporting it. This should have been no-op, as test framework did
the same for a long time anyway.

Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-27 00:22:39 -08:00
Junio C Hamano 2db511fdbd Merge branch 'maint'
* maint:
  Documentation/git-am.txt: Pass -r in the example invocation of rm -f .dotest
  timezone_names[]: fixed the tz offset for New Zealand.
  filter-branch documentation: non-zero exit status in command abort the filter
  rev-parse: fix potential bus error with --parseopt option spec handling
  Use a single implementation and API for copy_file()
  Documentation/git-filter-branch: add a new msg-filter example
  Correct fast-export file mode strings to match fast-import standard
2008-02-26 00:14:22 -08:00
Jay Soffian e103343644 rev-parse: fix potential bus error with --parseopt option spec handling
A non-empty line containing no spaces should be treated by --parseopt as
an option group header, but was causing a bus error. Also added a test
script for rev-parse --parseopt.

Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-25 21:40:12 -08:00
Santi Béjar 518120e348 git-describe: --long shows the object name even for a tagged commit
This is useful when you want to see parts of the commit object name
in "describe" output, even when the commit in question happens to be
a tagged version.  Instead of just emitting the tag name, it will
describe such a commit as v1.2-0-deadbeef (0th commit since tag v1.2
that points at object deadbeef....).

Signed-off-by: Santi Béjar <sbejar@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-25 18:59:20 -08:00