gitweb.git
Merge branch 'js/valgrind'Junio C Hamano Thu, 5 Mar 2009 23:41:18 +0000 (15:41 -0800)

Merge branch 'js/valgrind'

* js/valgrind:
valgrind: do not require valgrind 3.4.0 or newer
test-lib: avoid assuming that templates/ are in the GIT_EXEC_PATH
Tests: let --valgrind imply --verbose and --tee
Add a script to coalesce the valgrind outputs
t/Makefile: provide a 'valgrind' target
test-lib.sh: optionally output to test-results/$TEST.out, too
Valgrind support: check for more than just programming errors
valgrind: ignore ldso and more libz errors
Add valgrind support in test scripts

MinGW: 64-bit file offsetsJohannes Schindelin Thu, 5 Mar 2009 16:05:12 +0000 (17:05 +0100)

MinGW: 64-bit file offsets

The type 'off_t' should be used everywhere so that the bit-depth of that
type can be adjusted in the standard C library, and you just need to
recompile your program to benefit from the extended precision.

Only that it was not done that way in the MS runtime library.

This patch reroutes off_t to off64_t and provides the other necessary
changes so that finally, clones larger than 2 gigabyte work on Windows
(provided you are on a file system that allows files larger than 2gb).

Initial patch by Sickboy <sb@dev-heaven.net>.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Acked-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation - More examples for git bisectJohn Tapsell Thu, 5 Mar 2009 12:36:14 +0000 (12:36 +0000)

Documentation - More examples for git bisect

Including passing parameters to the programs, and running more
complicated checks without requiring a seperate shell script.

Signed-off-by: John Tapsell <johnflux@gmail.com>
Acked-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Draft release notes: Carry forward the warning for... Junio C Hamano Thu, 5 Mar 2009 22:50:00 +0000 (14:50 -0800)

Draft release notes: Carry forward the warning for behaviour changes

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint'Junio C Hamano Thu, 5 Mar 2009 07:43:23 +0000 (23:43 -0800)

Merge branch 'maint'

* maint:
Make the 'lock file' exists error more informative

improve missing repository error messageJeff King Wed, 4 Mar 2009 08:32:29 +0000 (03:32 -0500)

improve missing repository error message

Certain remote commands, when asked to do something in a
particular directory that was not actually a git repository,
would say "unable to chdir or not a git archive". The
"chdir" bit is an unnecessary detail, and the term "git
archive" is much less common these days than "git repository".

So let's switch them all to:

fatal: '%s' does not appear to be a git repository

Signed-off-by: Jeff King <peff@peff.net>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Make the 'lock file' exists error more informativeJohn Tapsell Wed, 4 Mar 2009 15:00:44 +0000 (15:00 +0000)

Make the 'lock file' exists error more informative

It looks like someone did 90% of the work, then forgot to actually use
the function in one place.

Also the helper function did not use the correct variable.

Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-archive: add --output=<file> to send output to... Carlos Manuel Duclos Vergara Mon, 16 Feb 2009 17:20:25 +0000 (18:20 +0100)

git-archive: add --output=<file> to send output to a file

When archiving a repository there is no way to specify a file as output.
This patch adds a new option "--output" that redirects the output to a
file instead of stdout.

Signed-off-by: Carlos Manuel Duclos Vergara <carlos.duclos@nokia.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Improve error message for git-filter-branchJohn Tapsell Thu, 19 Feb 2009 07:36:35 +0000 (07:36 +0000)

Improve error message for git-filter-branch

Tell the user that a backup (original) already exists, and how to solve
this problem (with -f option)

Signed-off-by: John Tapsell <johnflux@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Google has renamed the imap folderJohn Tapsell Thu, 19 Feb 2009 07:36:11 +0000 (07:36 +0000)

Google has renamed the imap folder

Also add a comment that the web interface wraps the lines

Signed-off-by: John Tapsell <johnflux@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Modify description file to say what this file isJohn Tapsell Thu, 19 Feb 2009 07:36:00 +0000 (07:36 +0000)

Modify description file to say what this file is

A lot of people see this message for the first time on the gitweb
interface, where there is no clue as to what 'this file' means.

Signed-off-by: John Tapsell <johnflux@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

rev-list: estimate number of bisection step leftChristian Couder Sat, 21 Feb 2009 08:26:01 +0000 (09:26 +0100)

rev-list: estimate number of bisection step left

This patch teaches "git rev-list --bisect-vars" to output an estimate
of the number of bisection step left _after the current one_ along with
the other variables it already outputs.

This patch also makes "git-bisect.sh" display this number of steps left
_after the current one_, along with the estimate of the number of
revisions left to test (after the current one).

Here is a table to help analyse what should be the best estimate for
the number of bisect steps left.

N : linear case --> probabilities --> best
-------------------------------------------------------------
1 : G-B --> 0 --> 0
2 : G-U1-B --> 0 --> 0
3 : G-U1-U2-B --> 0(1/3) 1(2/3) --> 1
4 : G-U1-U2-U3-B --> 1 --> 1
5 : G-U1-U2-U3-U4-B --> 1(3/5) 2(2/5) --> 1
6 : G-U1-U2-U3-U4-U5-B --> 1(2/6) 2(4/6) --> 2
7 : G-U1-U2-U3-U4-U5-U6-B --> 1(1/7) 2(6/7) --> 2
8 : G-U1-U2-U3-U4-U5-U6-U7-B --> 2 --> 2
9 : G-U1-U2-U3-U4-U5-U6-U7-U8-B --> 2(7/9) 3(2/9) --> 2
10: G-U1-U2-U3-U4-U5-U6-U7-U8-U9-B --> 2(6/10)3(4/10)--> 2

In the column "N", there is the number of revisions that could _now_
be the first bad commit we are looking for.

The "linear case" column describes the linear history corresponding to
the number in column N. G means good, B means bad, and Ux means
unknown. Note that the first bad revision we are looking for can be
any Ux or B.

In the "probabilities" column, there are the different outcomes in
number of steps with the odds of each outcome in parenthesis
corresponding to the linear case.

The "best" column gives the most accurate estimate among the different
outcomes in the "probabilities" column.

We have the following:

best(2^n) == n - 1

and for any x between 0 included and 2^n excluded, the probability for
n - 1 steps left looks like:

P(2^n + x) == (2^n - x) / (2^n + x)

and P(2^n + x) < 0.5 means 2^n < 3x

So the algorithm used in this patch calculates 2^n and x, and then
choose between returning n - 1 and n.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Fix neglect of diff_setup()/diff_setup_done() symmetry.Keith Cascio Tue, 17 Feb 2009 02:59:00 +0000 (18:59 -0800)

Fix neglect of diff_setup()/diff_setup_done() symmetry.

Code that calls diff_setup(), including via init_revisions(), should later call
diff_setup_done(), possibly via setup_revisions(). Failure to do so could cause
errors, especially in the future when we add responsibilities to
diff_setup_done(). This instance causes no known errors with the present code.
But it resulted in an error with an experimental patch.

Signed-off-by: Keith Cascio <keith@cs.ucla.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Use DIFF_XDL_SET/DIFF_OPT_SET instead of raw bit-maskingKeith Cascio Tue, 17 Feb 2009 03:26:49 +0000 (19:26 -0800)

Use DIFF_XDL_SET/DIFF_OPT_SET instead of raw bit-masking

Signed-off-by: Keith Cascio <keith@cs.ucla.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Beginning of 1.6.3 development trackJunio C Hamano Wed, 4 Mar 2009 08:41:01 +0000 (00:41 -0800)

Beginning of 1.6.3 development track

Beginning of 1.6.2 maintenance trackJunio C Hamano Wed, 4 Mar 2009 08:37:50 +0000 (00:37 -0800)

Beginning of 1.6.2 maintenance track

Signed-off-by: Junio C Hamano <gitster@pobox.com>

GIT 1.6.2 v1.6.2Junio C Hamano Wed, 4 Mar 2009 07:02:16 +0000 (23:02 -0800)

GIT 1.6.2

Signed-off-by: Junio C Hamano <gitster@pobox.com>

git submodule: Fix adding of submodules at paths with... Michael J Gruber Tue, 3 Mar 2009 15:08:21 +0000 (16:08 +0100)

git submodule: Fix adding of submodules at paths with ./, .. and //

Make 'git submodule add' normalize the submodule path in the
same way as 'git ls-files' does, so that 'git submodule init' looks up
the information in .gitmodules with the same key under which 'git
submodule add' stores it.

This fixes 4 known breakages.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git submodule: Add test cases for git submodule addMichael J Gruber Tue, 3 Mar 2009 15:08:20 +0000 (16:08 +0100)

git submodule: Add test cases for git submodule add

Add simple test cases for adding and initialising submodules. The
init step is necessary in order to verify the added information.

The second test exposes a known breakage due to './' in the path: git
ls-files simplifies the path but git add does not, which leads to git
init looking for different lines in .gitmodules than git add adds.

The other tests add test cases for '//' and '..' in the path which
currently fail for the same reason.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation: Typo / spelling / formatting fixesMike Ralphson Tue, 3 Mar 2009 19:29:22 +0000 (19:29 +0000)

Documentation: Typo / spelling / formatting fixes

Signed-off-by: Mike Ralphson <mike@abacus.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation: Expand a couple of abbreviationsMike Ralphson Tue, 3 Mar 2009 19:29:21 +0000 (19:29 +0000)

Documentation: Expand a couple of abbreviations

These may not be obvious to non-native English speakers

Signed-off-by: Mike Ralphson <mike@abacus.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation: Typos / spelling fixes in RelNotesMike Ralphson Tue, 3 Mar 2009 19:29:20 +0000 (19:29 +0000)

Documentation: Typos / spelling fixes in RelNotes

Signed-off-by: Mike Ralphson <mike@abacus.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation/git-archive.txt: Note attributesRoy Lee Tue, 3 Mar 2009 16:49:29 +0000 (00:49 +0800)

Documentation/git-archive.txt: Note attributes

Signed-off-by: Roy Lee <roylee17@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

clone: run post-checkout hook when checking outJeff King Tue, 3 Mar 2009 05:37:51 +0000 (00:37 -0500)

clone: run post-checkout hook when checking out

The mental model for clone is that the branch is "checked
out" (and it even says this in Documentation/git-clone.txt:
"...creates and checks out an initial branch"). Therefore it
is reasonable for users to expect that any post-checkout
hook would be run.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

send-email: add --confirm option and configuration... Jay Soffian Tue, 3 Mar 2009 04:52:18 +0000 (23:52 -0500)

send-email: add --confirm option and configuration setting

send-email violates the principle of least surprise by automatically
cc'ing additional recipients without confirming this with the user.

This patch teaches send-email a --confirm option. It takes the
following values:

--confirm=always always confirm before sending
--confirm=never never confirm before sending
--confirm=cc confirm before sending when send-email has
automatically added addresses from the patch to
the Cc list
--confirm=compose confirm before sending the first message when
using --compose. (Needed to maintain backwards
compatibility with existing behavior.)
--confirm=auto 'cc' + 'compose'

If sendemail.confirm is unconfigured, the option defaults to 'compose'
if any suppress-Cc related options have been used, otherwise it defaults
to 'auto'.

Unfortunately, it is impossible to introduce this patch such that it
helps new users without potentially annoying some existing users. We
attempt to mitigate the latter by:

* Allowing the user to set 'git config sendemail.confirm never'
* Allowing the user to say 'all' after the first prompt to not be
prompted on remaining emails during the same invocation.
* Telling the user about the 'sendemail.confirm' setting if it is
unconfigured whenever we prompt due to Cc before sending.
* Only prompting if no --suppress related options have been passed, as
using such an option is likely to indicate an experienced send-email
user.

There is a slight fib in message informing the user of the
sendemail.confirm setting and this is intentional. Setting 'auto'
differs from leaving sendemail.confirm unset in two ways: 1) 'auto'
obviously squelches the informational message; 2) 'auto' prompts when
the Cc list has been expanded even in the presence of a --suppress
related option, where leaving sendemail.confirm unset does not. This is
intentional to keep the message simple, and to avoid adding another
sendemail.confirm value ('auto-except-suppress'?).

Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-pull: Allow --stat and --no-stat to be used with... Tor Arne Vestbø Sun, 1 Mar 2009 21:28:28 +0000 (22:28 +0100)

git-pull: Allow --stat and --no-stat to be used with --rebase

Forwards the --stat, --no-stat, and --summary options on to git-rebase.

Signed-off-by: Tor Arne Vestbø <torarnv@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-rebase: Add --stat and --no-stat for producing... Tor Arne Vestbø Sun, 1 Mar 2009 22:11:38 +0000 (23:11 +0100)

git-rebase: Add --stat and --no-stat for producing diffstat on rebase

The behavior of --verbose is unchanged, but uses a different state
variable internally, so that the meaning of verbose output may be
expanded without affecting the diffstat. This is also reflected in
the documentation.

The configuration option rebase.stat works the same was as merg.stat,
but the default is currently false.

Signed-off-by: Tor Arne Vestbø <torarnv@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

optimize compat/ memmem()René Scharfe Mon, 2 Mar 2009 23:19:30 +0000 (00:19 +0100)

optimize compat/ memmem()

When memmem() was imported from glibc 2.2 into compat/, an optimization
was dropped in the process, in order to make the code smaller and simpler.
It was OK because memmem() wasn't used in performance-critical code. Now
the situation has changed and we can benefit from this optimization.

The trick is to avoid calling memcmp() if the first character of the needle
already doesn't match. Checking one character directly is much cheaper
than the function call overhead. We keep the first character of the needle
in the variable named point and the rest in the one named tail.

The following commands were run in a Linux kernel repository and timed, the
best of five results is shown:

$ STRING='Ensure that the real time constraints are schedulable.'
$ git log -S"$STRING" HEAD -- kernel/sched.c >/dev/null

On Windows Vista x64, before:

real 0m8.470s
user 0m0.000s
sys 0m0.000s

And after the patch:

real 0m1.887s
user 0m0.000s
sys 0m0.000s

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

diffcore-pickaxe: use memmem()René Scharfe Mon, 2 Mar 2009 23:00:55 +0000 (00:00 +0100)

diffcore-pickaxe: use memmem()

Use memmem() instead of open-coding it. The system libraries usually have a
much faster version than the memcmp()-loop here. Even our own fall-back in
compat/, which is used on Windows, is slightly faster.

The following commands were run in a Linux kernel repository and timed, the
best of five results is shown:

$ STRING='Ensure that the real time constraints are schedulable.'
$ git log -S"$STRING" HEAD -- kernel/sched.c >/dev/null

On Ubuntu 8.10 x64, before (v1.6.2-rc2):

8.09user 0.04system 0:08.14elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+30952minor)pagefaults 0swaps

And with the patch:

1.50user 0.04system 0:01.54elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+30645minor)pagefaults 0swaps

On Fedora 10 x64, before:

8.34user 0.05system 0:08.39elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+29268minor)pagefaults 0swaps

And with the patch:

1.15user 0.05system 0:01.20elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+32253minor)pagefaults 0swaps

On Windows Vista x64, before:

real 0m9.204s
user 0m0.000s
sys 0m0.000s

And with the patch:

real 0m8.470s
user 0m0.000s
sys 0m0.000s

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation: minor grammatical fixes.David J. Mellor Mon, 2 Mar 2009 06:42:44 +0000 (22:42 -0800)

Documentation: minor grammatical fixes.

The final hunk in this patch corrects what appears to be a typo:

of --> or

Signed-off-by: David J. Mellor <dmellor@whistlingcat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation: minor grammatical fixes.David J. Mellor Mon, 2 Mar 2009 06:38:36 +0000 (22:38 -0800)

Documentation: minor grammatical fixes.

Signed-off-by: David J. Mellor <dmellor@whistlingcat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation: minor grammatical fixes.David J. Mellor Mon, 2 Mar 2009 06:37:41 +0000 (22:37 -0800)

Documentation: minor grammatical fixes.

Signed-off-by: David J. Mellor <dmellor@whistlingcat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t3400-rebase: Move detached HEAD check earlierJohannes Sixt Sun, 1 Mar 2009 10:20:03 +0000 (11:20 +0100)

t3400-rebase: Move detached HEAD check earlier

Short story: There is a section in t3400 that tests fundamental rebase
properties. 3ec7371f (Add two extra tests for git rebase, 2009-02-09)
added a check that rebase works on a detached HEAD, but the test was put
near the end of the file. This moves it to a more suitable place.

Long story: The test that preceded the one in question tests that a
rebased commit degrades from a content change with mode change to a
mere mode change. But on Windows, where we have core.filemode=false,
the original commit did not record the mode change, and so the rebase
operation did not rebase anything. This caused the subsequent detached
HEAD test to fail.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge git://git.kernel.org/pub/scm/gitk/gitkJunio C Hamano Mon, 2 Mar 2009 06:20:52 +0000 (22:20 -0800)

Merge git://git.kernel.org/pub/scm/gitk/gitk

* git://git.kernel.org/pub/scm/gitk/gitk:
gitk: Fix possible infinite loop and display corruption

gitk: Fix possible infinite loop and display corruptionPaul Mackerras Sun, 1 Mar 2009 22:38:17 +0000 (09:38 +1100)

gitk: Fix possible infinite loop and display corruption

This fixes an issue reported by Johannes Sixt on the git mailing list:

> This recipe sends gitk into an endless loop. In git.git do:
>
> cd t
> # remove chmod a+x A near the end of the file
> sed -i 's/chmod/: chmod/' t3400-rebase.sh
> sh t3400-rebase.sh --debug
> cd trash\ directory.t3400-rebase/
> gitk master modechange modechange@{1}
>
>
> I briefly see the history chart, but the dot that should be modechange@{1}
> is missing. One automatically selected commit is shown in the diff section
> below. But then the commit list is cleared and gitk goes into an infinite
> loop.
>
> Things work alright if either modechange@{1} is dropped, or the 'chmod'
> line is left unchanged, which is a bit strange.
>
> This is with git version 1.6.1.2.390.gba743

There were actually two problems. This recipe created a situation where
git log would output a child commit after its parent. This meant that
we called fix_reversal which called splitvarc, which should call modify_arc
to note the fact that it has modified the arc that it has just split. It
wasn't, which meant that displayorder and other variables got into an
inconsistent state (a commit appearing twice in displayorder).

This then meant that the targetrow/targetid logic in drawvisible thought
it need to redraw each time. That, together with the fact that drawvisible
called drawcommits which called drawvisible if a redraw was needed, led
to the infinite loop.

In fact drawvisible is now the only caller of drawcommits. Thus, the
start and end row arguments to drawcommits always encompass the whole
visible area, so drawcommits doesn't need to call drawvisible to redraw;
it just needs to clear the screen and draw what it's been asked to.

This fixes these two problems by adding a call to modify_arc in
splitvarc and by taking out the call to drawvisible in drawcommits.
It also removes an unrelated left-over debugging puts in external_blame.

Signed-off-by: Paul Mackerras <paulus@samba.org>

Merge branch 'jc/maint-1.6.0-pack-directory'Junio C Hamano Sun, 1 Mar 2009 00:31:02 +0000 (16:31 -0800)

Merge branch 'jc/maint-1.6.0-pack-directory'

* jc/maint-1.6.0-pack-directory:
Fix odb_mkstemp() on AIX

Merge branch 'maint'Junio C Hamano Sat, 28 Feb 2009 22:39:56 +0000 (14:39 -0800)

Merge branch 'maint'

* maint:
Documentation: minor grammatical fixes.
added missing backtick in git-apply.txt

Documentation: minor grammatical fixes.David J. Mellor Sat, 28 Feb 2009 21:12:59 +0000 (13:12 -0800)

Documentation: minor grammatical fixes.

Signed-off-by: David J. Mellor <dmellor@whistlingcat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Ensure proper setup of git_dir for git-hash-objectElijah Newren Sat, 28 Feb 2009 19:56:49 +0000 (12:56 -0700)

Ensure proper setup of git_dir for git-hash-object

Call setup_git_directory() before git_config() to make sure git_dir is set
to the proper value.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint-1.6.0' into maintJunio C Hamano Sat, 28 Feb 2009 22:05:09 +0000 (14:05 -0800)

Merge branch 'maint-1.6.0' into maint

* maint-1.6.0:
added missing backtick in git-apply.txt

added missing backtick in git-apply.txtDanijel Tasov Sat, 28 Feb 2009 20:03:54 +0000 (21:03 +0100)

added missing backtick in git-apply.txt

Signed-off-by: Danijel Tasov <dt@korn.shell.la>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-rebase: Update --whitespace documentationTodd Zullinger Sat, 28 Feb 2009 18:42:02 +0000 (13:42 -0500)

git-rebase: Update --whitespace documentation

The parameters accepted by the --whitespace option of "git apply" have
changed over time, and the documentation for "git rebase" was out of
sync. Remove the specific parameter list from the "git rebase"
documentation and simply point to the "git apply" documentation for
details, as is already done in the "git am" documentation.

Signed-off-by: Todd Zullinger <tmz@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

is_kept_pack(): final clean-upJunio C Hamano Sat, 28 Feb 2009 08:37:19 +0000 (00:37 -0800)

is_kept_pack(): final clean-up

Now is_kept_pack() is just a member lookup into a structure, we can write
it as such.

Also rewrite the sole caller of has_sha1_kept_pack() to switch on the
criteria the callee uses (namely, revs->kept_pack_only) between calling
has_sha1_kept_pack() and has_sha1_pack(), so that these two callees do not
have to take a pointer to struct rev_info as an argument.

This removes the header file dependency issue temporarily introduced by
the earlier commit, so we revert changes associated to that as well.

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Simplify is_kept_pack()Junio C Hamano Sat, 28 Feb 2009 08:00:21 +0000 (00:00 -0800)

Simplify is_kept_pack()

This removes --unpacked=<packfile> parameter from the revision parser, and
rewrites its use in git-repack to pass a single --kept-pack-only option
instead.

The new --kept-pack-only option means just that. When this option is
given, is_kept_pack() that used to say "not on the --unpacked=<packfile>
list" now says "the packfile has corresponding .keep file".

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Consolidate ignore_packed logic moreJunio C Hamano Sat, 28 Feb 2009 07:43:37 +0000 (23:43 -0800)

Consolidate ignore_packed logic more

This refactors three loops that check if a given packfile is on the
ignore_packed list into a function is_kept_pack(). The function returns
false for a pack on the list, and true for a pack not on the list, because
this list is solely used by "git repack" to pass list of packfiles that do
not have corresponding .keep files, i.e. a packfile not on the list is
"kept".

Signed-off-by: Junio C Hamano <gitster@pobox.com>

has_sha1_kept_pack(): take "struct rev_info"Junio C Hamano Sat, 28 Feb 2009 07:30:38 +0000 (23:30 -0800)

has_sha1_kept_pack(): take "struct rev_info"

Its "ignore_packed" parameter always comes from struct rev_info. This
patch makes the function take a pointer to the surrounding structure, so
that the refactoring in the next patch becomes easier to review.

There is an unfortunate header file dependency and the easiest workaround
is to temporarily move the function declaration from cache.h to
revision.h; this will be moved back to cache.h once the function loses
this "ignore_packed" parameter altogether in the later part of the
series.

Signed-off-by: Junio C Hamano <gitster@pobox.com>

has_sha1_pack(): refactor "pretend these packs do not... Junio C Hamano Sat, 28 Feb 2009 07:15:53 +0000 (23:15 -0800)

has_sha1_pack(): refactor "pretend these packs do not exist" interface

Most of the callers of this function except only one pass NULL to its last
parameter, ignore_packed.

Introduce has_sha1_kept_pack() function that has the function signature
and the semantics of this function, and convert the sole caller that does
not pass NULL to call this new function.

All other callers and has_sha1_pack() lose the ignore_packed parameter.

Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-repack: resist stray environment variableJunio C Hamano Sat, 28 Feb 2009 07:58:50 +0000 (23:58 -0800)

git-repack: resist stray environment variable

The script used $args and $existing without initializing it to empty. It
would have been confused by an environment variable the end user had
before running it.

Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-svn - return original format_svn_date semanticsBen Walton Sat, 28 Feb 2009 03:11:45 +0000 (22:11 -0500)

git-svn - return original format_svn_date semantics

When %z was removed from the strftime call and subsituted with a
local gmt offset calculation, time() was no longer the default for
all time functions as it was with the previous localtime(shift).
This is now corrected so that format_svn_time behaves as it used to.

Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca>
Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-svn: disable broken symlink workaround by defaultEric Wong Sat, 28 Feb 2009 03:40:16 +0000 (19:40 -0800)

git-svn: disable broken symlink workaround by default

Even though this will break things for some extremely rare repositories
used by broken Windows clients, it's probably not worth enabling this by
default as it has negatively affected many more users than it has helped
from what we've seen so far.

The extremely rare repositories that have broken symlinks in them will be
silently corrupted in import; but users can still reenable this option and
restart the import.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'cc/maint-1.6.0-bisect-fix'Junio C Hamano Sat, 28 Feb 2009 00:00:33 +0000 (16:00 -0800)

Merge branch 'cc/maint-1.6.0-bisect-fix'

* cc/maint-1.6.0-bisect-fix:
bisect: fix another instance of eval'ed string

Conflicts:
git-bisect.sh

bisect: fix another instance of eval'ed stringChristian Couder Fri, 27 Feb 2009 06:31:22 +0000 (07:31 +0100)

bisect: fix another instance of eval'ed string

When there is nothing to be skipped, the output from
rev-list --bisect-vars was eval'ed without first being
strung together with &&; this is probably not a problem
as it is much less likely to be a bad input than the list
handcrafted by the filter_skip function, but it still is
a good discipline.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

bash completion: add --format= and --oneline options... Teemu Likonen Tue, 24 Feb 2009 13:33:29 +0000 (15:33 +0200)

bash completion: add --format= and --oneline options for "git log"

We also add --format= completion for "git show".

Signed-off-by: Teemu Likonen <tlikonen@iki.fi>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'cc/maint-1.6.0-bisect-fix'Junio C Hamano Fri, 27 Feb 2009 09:03:21 +0000 (01:03 -0800)

Merge branch 'cc/maint-1.6.0-bisect-fix'

* cc/maint-1.6.0-bisect-fix:
bisect: fix quoting TRIED revs when "bad" commit is also "skip"ped

Conflicts:
git-bisect.sh

bisect: fix quoting TRIED revs when "bad" commit is... Christian Couder Fri, 27 Feb 2009 06:31:22 +0000 (07:31 +0100)

bisect: fix quoting TRIED revs when "bad" commit is also "skip"ped

When the "bad" commit was also "skip"ped and when more than one
commit was skipped, the "filter_skipped" function would have
printed something like:

bisect_rev=<hash1>|<hash2>

(where <hash1> and <hash2> are hexadecimal sha1 hashes)

and this would have been evaled later as piping "bisect_rev=<hash1>"
into "<hash2>", which would have failed.

So this patch makes the "filter_skipped" function properly quote
what it outputs, so that it will print something like:

bisect_rev='<hash1>|<hash2>'

which will be properly evaled later. The caller was not stopping
properly because the scriptlet this function returned to be evaled
was not strung together with && and because of this, an error in
an earlier part of the output was simply ignored.

A test case is added to the test suite.

And while at it, we also initialize the VARS, FOUND and TRIED
variables, so that we protect ourselves from environment variables
the user may have with these names.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-am: make --abort less dangerousJunio C Hamano Thu, 26 Feb 2009 19:24:29 +0000 (11:24 -0800)

git-am: make --abort less dangerous

When you are in the middle of "git rebase", "git am --abort" by mistake
would have referred to nonexistent ORIG_HEAD and barfed, or worse yet, used
a stale ORIG_HEAD and taken you to an unexpected commit.

Also the option parsing did not reject "git am --abort --skip".

Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-am: Keep index in case of abort with dirty indexMichael J Gruber Thu, 26 Feb 2009 09:52:53 +0000 (10:52 +0100)

git-am: Keep index in case of abort with dirty index

git am --abort resets the index unconditionally. But in case a previous
git am exited due to a dirty index it is preferable to keep that index.
Make it so.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t5540-http-push.sh: avoid non-portable grep -PJay Soffian Thu, 26 Feb 2009 23:44:40 +0000 (18:44 -0500)

t5540-http-push.sh: avoid non-portable grep -P

OS X's GNU grep does not support -P/--perl-regexp.

We use a basic RE instead, and simplify the pattern slightly by
replacing '+' with '*' so it can be more easily expressed using a basic
RE. The important part of pattern, checking for a SHA-1 has suffix in
the successful PUT/MOVE operations, remains the same. Also, a-z instead
of a-f was an obvious mistake in the original RE. Here are samples of
what we want to match:

127.0.0.1 - - [26/Feb/2009:22:38:13 +0000] "PUT /test_repo.git/objects/3e/a4fbb9e18a401a6463c595d08118fcb9fb7426_fab55116904c665a95438bcc78521444a7db6096 HTTP/1.1" 201 277
127.0.0.1 - - [26/Feb/2009:22:38:13 +0000] "MOVE /test_repo.git/objects/3e/a4fbb9e18a401a6463c595d08118fcb9fb7426_fab55116904c665a95438bcc78521444a7db6096 HTTP/1.1" 201 277

Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Fix odb_mkstemp() on AIXMike Ralphson Thu, 26 Feb 2009 15:31:52 +0000 (16:31 +0100)

Fix odb_mkstemp() on AIX

The AIX mkstemp() modifies its template parameter to an empty string if
the call fails. The existing code had already recomputed the template,
but too late to be good.

See also 6ff6af62, which fixed this problem in a different spot.

Signed-off-by: Mike Ralphson <mike@abacus.co.uk>
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

GIT 1.6.2-rc2 v1.6.2-rc2Junio C Hamano Wed, 25 Feb 2009 22:50:52 +0000 (14:50 -0800)

GIT 1.6.2-rc2

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'jc/maint-1.6.0-pack-directory'Junio C Hamano Wed, 25 Feb 2009 22:48:30 +0000 (14:48 -0800)

Merge branch 'jc/maint-1.6.0-pack-directory'

* jc/maint-1.6.0-pack-directory:
Make sure objects/pack exists before creating a new pack

Make sure objects/pack exists before creating a new... Junio C Hamano Wed, 25 Feb 2009 07:11:29 +0000 (23:11 -0800)

Make sure objects/pack exists before creating a new pack

In a repository created with git older than f49fb35 (git-init-db: create
"pack" subdirectory under objects, 2005-06-27), objects/pack/ directory is
not created upon initialization. It was Ok because subdirectories are
created as needed inside directories init-db creates, and back then,
packfiles were recent invention.

After the said commit, new codepaths started relying on the presense of
objects/pack/ directory in the repository. This was exacerbated with
8b4eb6b (Do not perform cross-directory renames when creating packs,
2008-09-22) that moved the location temporary pack files are created from
objects/ directory to objects/pack/ directory, because moving temporary to
the final location was done carefully with lazy leading directory creation.

Many packfile related operations in such an old repository can fail
mysteriously because of this.

This commit introduces two helper functions to make things work better.

- odb_mkstemp() is a specialized version of mkstemp() to refactor the
code and teach it to create leading directories as needed;

- odb_pack_keep() refactors the code to create a ".keep" file while
create leading directories as needed.

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Allow HTTP tests to run on DarwinJay Soffian Wed, 25 Feb 2009 08:28:15 +0000 (03:28 -0500)

Allow HTTP tests to run on Darwin

This patch allows the HTTP tests to run on OS X 10.5. It is not
sufficient to be able to pass in LIB_HTTPD_PATH and
LIB_HTTPD_MODULE_PATH alone, as the apache.conf also needs a couple
tweaks.

These changes are put into an <IfDefine> to keep them Darwin specific,
but this means lib-httpd.sh needs to be modified to pass -DDarwin to
apache when running on Darwin. As long as we're making this change to
lib-httpd.sh, we may as well set LIB_HTTPD_PATH and
LIB_HTTPD_MODULE_PATH to appropriate default values for the platform.

Note that we now pass HTTPD_PARA to apache at shutdown as well.
Otherwise apache will emit a harmless, but noisy warning that LogFormat
is an unknown directive.

Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Fix typo in contrib/examples/git-svnimport.txtMichael J Gruber Wed, 25 Feb 2009 14:05:17 +0000 (15:05 +0100)

Fix typo in contrib/examples/git-svnimport.txt

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

gitattributes.txt: Path matching rules are explained... Johannes Sixt Wed, 25 Feb 2009 07:54:42 +0000 (08:54 +0100)

gitattributes.txt: Path matching rules are explained in gitignore.txt

The rules how the patterns are matched against path names are the same
for .gitattribute and .gitignore files.

This also replace the notion "glob pattern" by "pattern" because
gitignore.txt talks about "glob" only in some contexts where the pattern
is mentioned.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

sha1_file.c: fix typoFelipe Contreras Tue, 24 Feb 2009 21:59:05 +0000 (23:59 +0200)

sha1_file.c: fix typo

it's != its

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git add: trivial codestyle cleanupFelipe Contreras Tue, 24 Feb 2009 21:59:03 +0000 (23:59 +0200)

git add: trivial codestyle cleanup

Global static variables don't need to be initialized to 0/NULL.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

README: fix path to "gitcvs-migration.txt" and be more... Christian Couder Tue, 24 Feb 2009 20:16:37 +0000 (21:16 +0100)

README: fix path to "gitcvs-migration.txt" and be more consistent

README suggested to look at "Documentation/gittutorial.txt" for the
tutorial and to use "man git-commandname" for documentation of each
command.

This was not consistent because the tutorial can also be available with
"man gittutorial" once git is installed, and the documentation for each
command can be available at "Documentation/git-commandname.txt" before
installing git.

This patch tries to make the description more consistent. It also fixes
the path to the cvs-migration documentation that changed from
"Documentation/cvs-migration.txt" to "Documentation/gitcvs-migration.txt".

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

trace: Fixed a minor typo in an error message.Allan Caffee Wed, 25 Feb 2009 01:22:20 +0000 (20:22 -0500)

trace: Fixed a minor typo in an error message.

Signed-off-by: Allan Caffee <allan.caffee@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Docs: Expand explanation of the use of + in git push... Marc Branchaud Thu, 19 Feb 2009 17:39:47 +0000 (12:39 -0500)

Docs: Expand explanation of the use of + in git push refspecs.

Signed-off-by: Marc Branchaud <marcnarc@xiplink.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-quiltimport: preserve standard input to be able... Gerrit Pape Tue, 24 Feb 2009 09:00:06 +0000 (09:00 +0000)

git-quiltimport: preserve standard input to be able to read user input

When run without --author and it fails to determine an author, git
quiltimport tries `read patch_author` to get user input, but standard
input has been redirected to the patch series file. This commit lets
quiltimport read the series file through file descriptor 3 so that the
standard input is preserved.

Reported by Uwe Kleine-König through http://bugs.debian.org/515910

Signed-off-by: Gerrit Pape <pape@smarden.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

never fallback relative times to absoluteJeff King Tue, 24 Feb 2009 05:42:16 +0000 (00:42 -0500)

never fallback relative times to absolute

Previously, for dates older than 12 months we fell back to just giving the
absolute time. This can be a bit jarring when reading a list of times.

Instead, let's switch to "Y years, M months" for five years, and then just
"Y years" after that.

No particular reason on the 5 year cutoff except that it seemed reasonable
to me.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Add tests for git log --pretty, --format and --oneline.Felipe Contreras Tue, 24 Feb 2009 21:06:37 +0000 (23:06 +0200)

Add tests for git log --pretty, --format and --oneline.

More specifically; --pretty=format, tformat and new %foo shortcut.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Add --oneline that is a synonym to "--pretty=oneline... Nanako Shiraishi Tue, 24 Feb 2009 09:59:16 +0000 (18:59 +0900)

Add --oneline that is a synonym to "--pretty=oneline --abbrev-commit"

These two are often used together but are too long to type.

Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Give short-hands to --pretty=tformat:%formatstringNanako Shiraishi Tue, 24 Feb 2009 09:59:15 +0000 (18:59 +0900)

Give short-hands to --pretty=tformat:%formatstring

Allow --pretty="%h %s" (and --format="%h %s") as shorthand for an often
used option --pretty=tformat:"%h %s".

Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Add --format that is a synonym to --prettyNanako Shiraishi Tue, 24 Feb 2009 09:59:14 +0000 (18:59 +0900)

Add --format that is a synonym to --pretty

Some people prefer to call the pretty-print styles "format", and get
annoyed to see "git log --format=short" fail. Introduce it as a synonym
to --pretty so that both can be used.

Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Install builtins with the user and group of the install... Gerrit Pape Tue, 24 Feb 2009 08:58:16 +0000 (08:58 +0000)

Install builtins with the user and group of the installing personality

If 'make install' was run with sufficient privileges, then the installed
builtins in gitexecdir, which are either hardlinked, symlinked, or copied,
would receive the user and group of whoever built git. With this commit
the initial hardlink or copy is done from the installation tree and not
the build tree to fix this.

Signed-off-by: Gerrit Pape <pape@smarden.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Fixup: Add bare repository indicator for __git_ps1Marius Storm-Olsen Sat, 21 Feb 2009 14:48:43 +0000 (15:48 +0100)

Fixup: Add bare repository indicator for __git_ps1

Signed-off-by: Marius Storm-Olsen <git@storm-olsen.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge git://git.bogomips.org/git-svnJunio C Hamano Wed, 25 Feb 2009 05:13:32 +0000 (21:13 -0800)

Merge git://git.bogomips.org/git-svn

* git://git.bogomips.org/git-svn:
git-svn fix to avoid using strftime %z

Convert git-* invocations to "git *" in the svnimport... Abhijit Menon-Sen Wed, 25 Feb 2009 03:03:14 +0000 (08:33 +0530)

Convert git-* invocations to "git *" in the svnimport example.

After these changes, git-svnimport worked fine for me.

Signed-off-by: Abhijit Menon-Sen <ams@toroid.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-svn fix to avoid using strftime %zBen Walton Tue, 24 Feb 2009 19:44:49 +0000 (14:44 -0500)

git-svn fix to avoid using strftime %z

%z isn't available on all platforms in the date formatting
routines. Provide a workalike capability that should be
more portable.

Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca>
Acked-by: Eric Wong <normalperson@yhbt.net>

send-email: don't create temporary compose file until... Jay Soffian Mon, 23 Feb 2009 18:51:37 +0000 (13:51 -0500)

send-email: don't create temporary compose file until it is needed

Commit eed6ca7 caused a minor regression when it switched to using
tempfile() to generate the temporary compose file. Since tempfile()
creates the file at the time it generates the filename, zero-length
temporary files are being left behind unless --compose is used (in which
case the file is cleaned up).

This patch fixes the regression by not calling tempfile() to generate
the compose filename unless --compose is in use.

Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge git://git.bogomips.org/git-svnJunio C Hamano Tue, 24 Feb 2009 03:14:13 +0000 (19:14 -0800)

Merge git://git.bogomips.org/git-svn

* git://git.bogomips.org/git-svn:
git-svn: read the dcommit url from the config file on a per remote basis
git-svn: fix delete+add branch tracking with empty files
git-svn: Create leading directories in create-ignore

git-p4: avoid syncing duplicate changesPete Wyckoff Wed, 18 Feb 2009 18:12:14 +0000 (13:12 -0500)

git-p4: avoid syncing duplicate changes

When a particular changeset affects multiple depot paths, it
will appear multiple times in the output of "p4 changes".
Filter out the duplicates to avoid the extra empty commits that
this otherwise would create.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Acked-by: Simon Hausmann <simon@lst.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Add bare repository indicator for __git_ps1Marius Storm-Olsen Sat, 21 Feb 2009 14:48:43 +0000 (15:48 +0100)

Add bare repository indicator for __git_ps1

Prefixes the branch name with "BARE:" if you're in a
bare repository.

Signed-off-by: Marius Storm-Olsen <git@storm-olsen.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-svn: read the dcommit url from the config file... Peter Oberndorfer Mon, 23 Feb 2009 11:02:53 +0000 (12:02 +0100)

git-svn: read the dcommit url from the config file on a per remote basis

The commit url for dcommit is determined in the following order:
commandline option --commit-url
svn.commiturl
svn-remote.<name>.commiturl
svn-remote.<name>.url

Signed-off-by: Peter Oberndorfer <kumbayo84@arcor.de>
Acked-by: Eric Wong <normalperson@yhbt.net>

git-svn: fix delete+add branch tracking with empty... Eric Wong Mon, 23 Feb 2009 04:25:00 +0000 (20:25 -0800)

git-svn: fix delete+add branch tracking with empty files

Original bug report and test case by Björn Steinbrink.

Björn Steinbrink <B.Steinbrink@gmx.de> wrote:
> Hi Eric,
>
> seems that the empty symlink stuff gets confused about which revision to
> use when looking for the parent's file.
>
> r3 = f1a6fcf6b0a1c4a373d0b2b65a3d70700084f361 (tags/1.0.1)
> Found possible branch point: file:///home/doener/h/svn/tags/1.0 => file:///home/doener/h/svn/branches/1.0, 4
> Found branch parent: (1.0) 63ae640ba01014ecbb3df590999ed1fa5914545b
> Following parent with do_switch
> Successfully followed parent
> r5 = 26fcfef5bcced97ab74faf1af7341a2ae0d272aa (1.0)
> Found possible branch point: file:///home/doener/h/svn/branches/1.0 => file:///home/doener/h/svn/tags/1.0.1, 5
> Found branch parent: (tags/1.0.1) 26fcfef5bcced97ab74faf1af7341a2ae0d272aa
> Following parent with do_switch
> Scanning for empty symlinks, this may take a while if you have many empty files
> You may disable this with `git config svn.brokenSymlinkWorkaround false'.
> This may be done in a different terminal without restarting git svn
> Filesystem has no item: File not found: revision 3, path '/branches/1.0/file' at /usr/local/libexec/git-core/git-svn line 3318
>
> Note how it tries to look at revision 3 instead of revision 5 (which it
> correctly detected as the parent). The import succeeds when
> svn.brokenSymlinkWorkaround is set to false. Testcase below.

Signed-off-by: Eric Wong <normalperson@yhbt.net>

git-svn: Create leading directories in create-ignoreBrian Gernhardt Thu, 19 Feb 2009 18:08:04 +0000 (13:08 -0500)

git-svn: Create leading directories in create-ignore

Since SVN tracks empty directories and git does not, we can not assume
that the directory exists when creating .gitignore files.

Signed-off-by: Brian Gernhardt <benji@silverinsanity.com>
Acked-by: Eric Wong <normalperson@yhbt.net>

git config: trivial cleanup for editor actionJohannes Schindelin Sat, 21 Feb 2009 00:48:54 +0000 (02:48 +0200)

git config: trivial cleanup for editor action

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git config: codestyle cleanupsFelipe Contreras Sat, 21 Feb 2009 00:48:53 +0000 (02:48 +0200)

git config: codestyle cleanups

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

format-patch: support deep threadingThomas Rast Thu, 19 Feb 2009 21:26:33 +0000 (22:26 +0100)

format-patch: support deep threading

For deep threading mode, i.e., the mode that gives a thread structured
like

+ [PATCH 0/n] Cover letter
`-+ [PATCH 1/n] First patch
`-+ [PATCH 2/n] Second patch
`-+ ...

we currently have to use 'git send-email --thread' (the default). On
the other hand, format-patch also has a --thread option which gives
shallow mode, i.e.,

+ [PATCH 0/n] Cover letter
|-+ [PATCH 1/n] First patch
|-+ [PATCH 2/n] Second patch
...

To reduce the confusion resulting from having two indentically named
features in different tools giving different results, let format-patch
take an optional argument '--thread=deep' that gives the same output
as 'send-mail --thread'. With no argument, or 'shallow', behave as
before. Also add a configuration variable format.thread with the same
semantics.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

format-patch: thread as reply to cover letter even... Thomas Rast Thu, 19 Feb 2009 21:26:32 +0000 (22:26 +0100)

format-patch: thread as reply to cover letter even with in-reply-to

Currently, format-patch --thread --cover-letter --in-reply-to $parent
makes all mails, including the cover letter, a reply to $parent.
However, we would want the reader to consider the cover letter above
all the patches.

This changes the semantics so that only the cover letter is a reply to
$parent, while all the patches are formatted as replies to the cover
letter.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

format-patch: track several referencesThomas Rast Thu, 19 Feb 2009 21:26:31 +0000 (22:26 +0100)

format-patch: track several references

Currently, format-patch can only track a single reference (the
In-Reply-To:) for each mail. To ensure proper threading, we should
list all known references for every mail.

Change the rev_info.ref_message_id field to a string_list, so that we
can append references at will, and change the output formatting
routines to print all of them in the References: header. The last
entry in the list is implicitly assumed to be the In-Reply-To:, which
gives output consistent with RFC 2822:

The "References:" field will contain the contents of the parent's
"References:" field (if any) followed by the contents of the
parent's "Message-ID:" field (if any).

Note that this is just preparatory work; nothing uses it yet, so all
"References:" fields in the output are still only one deep.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'for-junio' of git://source.winehq.org... Junio C Hamano Sat, 21 Feb 2009 18:38:04 +0000 (10:38 -0800)

Merge branch 'for-junio' of git://source.winehq.org/~julliard/git/git

* 'for-junio' of git://source.winehq.org/~julliard/git/git:
Add a README in the contrib/emacs directory.
git.el: Improve the confirmation message on remove and revert.
git.el: Make sure that file lists are sorted as they are created.

Add a README in the contrib/emacs directory.Alexandre Julliard Mon, 16 Feb 2009 10:40:29 +0000 (11:40 +0100)

Add a README in the contrib/emacs directory.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>

git.el: Improve the confirmation message on remove... Alexandre Julliard Mon, 16 Feb 2009 10:40:08 +0000 (11:40 +0100)

git.el: Improve the confirmation message on remove and revert.

If there's only one file, print its name instead of just "1 file".

Signed-off-by: Alexandre Julliard <julliard@winehq.org>

git.el: Make sure that file lists are sorted as they... Alexandre Julliard Mon, 16 Feb 2009 10:39:11 +0000 (11:39 +0100)

git.el: Make sure that file lists are sorted as they are created.

This avoids a possibly redundant sort in git-update-status-files and
git-status-filenames-map, and allows callers to continue using the
list without having to copy it.

It also fixes the confusing success messages reported by Brent
Goodrick.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>

Support 'raw' date formatLinus Torvalds Fri, 20 Feb 2009 22:15:22 +0000 (14:15 -0800)

Support 'raw' date format

Talking about --date, one thing I wanted for the 1234567890 date was to
get things in the raw format. Sure, you get them with --pretty=raw, but it
felt a bit sad that you couldn't just ask for the date in raw format.

So here's a throw-away patch (meaning: I won't be re-sending it, because I
really don't think it's a big deal) to add "--date=raw". It just prints
out the internal raw git format - seconds since epoch plus timezone (put
another way: 'date +"%s %z"' format)

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Test git-patch-idThomas Rast Thu, 19 Feb 2009 11:13:42 +0000 (12:13 +0100)

Test git-patch-id

So far, git-patch-id was untested. Add some simple checks for output
format and patch (in)equality.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Test rev-list --parents/--childrenThomas Rast Thu, 19 Feb 2009 11:13:41 +0000 (12:13 +0100)

Test rev-list --parents/--children

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>