gitweb.git
rebase: use @{upstream} if no upstream specifiedMartin von Zweigbergk Thu, 10 Feb 2011 01:54:02 +0000 (20:54 -0500)

rebase: use @{upstream} if no upstream specified

'git rebase' without arguments is currently not supported. Make it
default to 'git rebase @{upstream}'. That is also what 'git pull
[--rebase]' defaults to, so it only makes sense that 'git rebase'
defaults to the same thing.

Defaulting to @{upstream} will make it possible to run e.g. 'git
rebase -i' without arguments, which is probably a quite common use
case. It also improves the scenario where you have multiple branches
that rebase against a remote-tracking branch, where you currently have
to choose between the extra network delay of 'git pull' or the
slightly awkward keys to enter 'git rebase @{u}'.

The error reporting when no upstream is configured for the current
branch or when no branch is checked out is reused from git-pull.sh. A
function is extracted into git-parse-remote.sh for this purpose.

Helped-by: Yann Dirson <ydirson@altern.org>
Helped-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

rebase -i: remove unnecessary state rebase-rootMartin von Zweigbergk Sun, 6 Feb 2011 18:44:00 +0000 (13:44 -0500)

rebase -i: remove unnecessary state rebase-root

Before calling 'git cherry-pick', interactive rebase currently checks
if we are rebasing from root (if --root was passed). If we are, the
'--ff' flag to 'git cherry-pick' is omitted. However, according to the
documentation for 'git cherry-pick --ff', "If the current HEAD is the
same as the parent of the cherry-picked commit, then a fast forward to
this commit will be performed.". This should never be the case when
rebasing from root, so it should not matter whether --ff is passed, so
simplify the code by removing the condition.

Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

rebase -i: don't read unused variable preserve_mergesMartin von Zweigbergk Sun, 6 Feb 2011 18:43:59 +0000 (13:43 -0500)

rebase -i: don't read unused variable preserve_merges

Since 8e4a91b (rebase -i: remember the settings of -v, -s and -p when
interrupted, 2007-07-08), the variable preserve_merges (then called
PRESERVE_MERGES) was detected from the state saved in
$GIT_DIR/rebase-merge in order to be used when the rebase resumed, but
its value was never actually used. The variable's value was only used
when the rebase was initated.

Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-rebase--am: remove unnecessary --3way optionMartin von Zweigbergk Sun, 6 Feb 2011 18:43:58 +0000 (13:43 -0500)

git-rebase--am: remove unnecessary --3way option

Since 22db240 (git-am: propagate --3way options as well, 2008-12-04),
the --3way has been propageted across failure, so it is since
pointless to pass it to git-am when resuming.

Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

rebase -m: don't print exit code 2 when merge failsMartin von Zweigbergk Sun, 6 Feb 2011 18:43:57 +0000 (13:43 -0500)

rebase -m: don't print exit code 2 when merge fails

When the merge strategy fails, a message suggesting the user to try
another strategy is displayed. Remove the "$rv" (which is always equal
to "2" in this case) from that message.

Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

rebase -m: remember allow_rerere_autoupdate optionMartin von Zweigbergk Sun, 6 Feb 2011 18:43:56 +0000 (13:43 -0500)

rebase -m: remember allow_rerere_autoupdate option

If '--[no-]allow_rerere_autoupdate' is passed when 'git rebase -m' is
called and a merge conflict occurs, the flag will be forgotten for the
rest of the rebase process. Make rebase remember it by saving the
value.

Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

rebase: remember strategy and strategy optionsMartin von Zweigbergk Sun, 6 Feb 2011 18:43:55 +0000 (13:43 -0500)

rebase: remember strategy and strategy options

When a rebase is resumed, interactive rebase remembers any merge
strategy passed when the rebase was initated. Make non-interactive
rebase remember any merge strategy as well. Also make non-interactive
rebase remember any merge strategy options.

To be able to resume a rebase that was initiated with an older version
of git (older than this commit), make sure not to expect the saved
option files to exist.

Test case idea taken from Junio's 71fc224 (t3402: test "rebase
-s<strategy> -X<opt>", 2010-11-11).

Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

rebase: remember verbose optionMartin von Zweigbergk Sun, 6 Feb 2011 18:43:54 +0000 (13:43 -0500)

rebase: remember verbose option

Currently, only interactive rebase remembers the value of the '-v'
flag from the initial invocation. Make non-interactive rebase also
remember it.

Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

rebase: extract code for writing basic stateMartin von Zweigbergk Sun, 6 Feb 2011 18:43:53 +0000 (13:43 -0500)

rebase: extract code for writing basic state

Extract the code for writing the state to rebase-apply/ or
rebase-merge/ when a rebase is initiated. This will make it easier to
later make both interactive and non-interactive rebase remember the
options used.

Note that non-interactive rebase stores the sha1 of the original head
in a file called orig-head, while interactive rebase stores it in a
file called head. Change this by writing to orig-head in both
cases. When reading, try to read from orig-head. If that fails, read
from head instead. This protects users who upgraded git while they had
an ongoing interactive rebase, while still making it possible to
remove the code that reads from head at some point in the future.

Helped-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

rebase: factor out sub command handlingMartin von Zweigbergk Sun, 6 Feb 2011 18:43:52 +0000 (13:43 -0500)

rebase: factor out sub command handling

Factor out the common parts of the handling of the sub commands
'--continue', '--skip' and '--abort'. The '--abort' handling can
handled completely in git-rebase.sh.

After this refactoring, the calls to git-rebase--am.sh,
git-rebase--merge.sh and git-rebase--interactive.sh will be better
aligned. There will only be one call to interactive rebase that will
shortcut the very last part of git-rebase.sh.

Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

rebase: make -v a tiny bit more verboseMartin von Zweigbergk Sun, 6 Feb 2011 18:43:51 +0000 (13:43 -0500)

rebase: make -v a tiny bit more verbose

To make it possible to later remove the handling of --abort from
git-rebase--interactive.sh, align the implementation in git-rebase.sh
with the former by making it a bit more verbose.

Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

rebase -i: align variable namesMartin von Zweigbergk Sun, 6 Feb 2011 18:43:50 +0000 (13:43 -0500)

rebase -i: align variable names

Rename variables HEAD and OLDHEAD to orig_head and HEADNAME to
head_name, which are the names used in git-rebase.sh. This prepares
for factoring out of the code that persists these variables during the
entire rebase process. Using the same variable names to mean the same
thing in both files also makes the code easier to read.

While at it, also remove the DOTEST variable and use the state_dir
variable that was inherited from git-rebase.sh instead.

Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

rebase: show consistent conflict resolution hintMartin von Zweigbergk Sun, 6 Feb 2011 18:43:49 +0000 (13:43 -0500)

rebase: show consistent conflict resolution hint

When rebase stops due to conflict, interactive rebase currently
displays a different hint to the user than non-interactive rebase
does. Use the same message for both types of rebase.

Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

rebase: extract am code to new source fileMartin von Zweigbergk Sun, 6 Feb 2011 18:43:48 +0000 (13:43 -0500)

rebase: extract am code to new source file

Extract the code for am-based rebase to git-rebase--am.sh.

Suggested-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

rebase: extract merge code to new source fileMartin von Zweigbergk Sun, 6 Feb 2011 18:43:47 +0000 (13:43 -0500)

rebase: extract merge code to new source file

Extract the code for merge-based rebase to git-rebase--merge.sh.

Suggested-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

rebase: remove $branch as synonym for $orig_headMartin von Zweigbergk Sun, 6 Feb 2011 18:43:46 +0000 (13:43 -0500)

rebase: remove $branch as synonym for $orig_head

The variables $branch and $orig_head were used as synonyms. To avoid
confusion, remove $branch. The name 'orig_head' seems more suitable,
since that is the name used when the variable is persisted.

Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

rebase -i: support --statMartin von Zweigbergk Sun, 6 Feb 2011 18:43:45 +0000 (13:43 -0500)

rebase -i: support --stat

Move up the code that displays the diffstat if '--stat' is passed, so
that it will be executed before calling git-rebase--interactive.sh.

A side effect is that the diffstat is now displayed before "First,
rewinding head to replay your work on top of it...".

Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

rebase: factor out call to pre-rebase hookMartin von Zweigbergk Sun, 6 Feb 2011 18:43:44 +0000 (13:43 -0500)

rebase: factor out call to pre-rebase hook

Remove the call to the pre-rebase hook from
git-rebase--interactive.sh and rely on the call in
git-rebase.sh.

Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

rebase: factor out clean work tree checkMartin von Zweigbergk Sun, 6 Feb 2011 18:43:43 +0000 (13:43 -0500)

rebase: factor out clean work tree check

Remove the check for clean work tree from git-rebase--interactive.sh and
rely on the check in git-rebase.sh.

Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

rebase: factor out reference parsingMartin von Zweigbergk Sun, 6 Feb 2011 18:43:42 +0000 (13:43 -0500)

rebase: factor out reference parsing

Remove the parsing and validation of references (onto, upstream, branch)
from git-rebase--interactive.sh and rely on the information exported from
git-rebase.sh.

By using the parsing of the --onto parameter in git-rebase.sh, this
improves the error message when the parameter is invalid.

Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

rebase: reorder validation stepsMartin von Zweigbergk Sun, 6 Feb 2011 18:43:41 +0000 (13:43 -0500)

rebase: reorder validation steps

Reorder validation steps in preparation for the validation to be factored
out from git-rebase--interactive.sh into git-rebase.sh.

The main functional difference is that the pre-rebase hook will no longer
be run if the work tree is dirty.

Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

rebase -i: remove now unnecessary directory checksMartin von Zweigbergk Sun, 6 Feb 2011 18:43:40 +0000 (13:43 -0500)

rebase -i: remove now unnecessary directory checks

Remove directory checks from git-rebase--interactive.sh that are done in
git-rebase.sh.

Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

rebase: factor out command line option processingMartin von Zweigbergk Sun, 6 Feb 2011 18:43:39 +0000 (13:43 -0500)

rebase: factor out command line option processing

Factor out the command line processing in git-rebase--interactive.sh
to git-rebase.sh. Store the options in variables in git-rebase.sh and
then source git-rebase--interactive.sh.

Suggested-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

rebase: align variable contentMartin von Zweigbergk Sun, 6 Feb 2011 18:43:38 +0000 (13:43 -0500)

rebase: align variable content

Make sure to interpret variables with the same name in the same way in
git-rebase.sh and git-rebase--interactive.sh. This will make it easier
to factor out code from git-rebase.sh to git-rebase--interactive and
export the variables.

Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

rebase: align variable namesMartin von Zweigbergk Sun, 6 Feb 2011 18:43:37 +0000 (13:43 -0500)

rebase: align variable names

git-rebase--interactive.sh will soon be sourced from
git-rebase.sh. Align the names of variables used in these scripts to
prepare for that.

Some names in git-rebase--interactive.sh, such as "author_script" and
"amend", are currently used in their upper case form to refer to a
file and in their lower case form to refer to something else. In these
cases, change the name of the existing lower case variable and
downcase the name of the variable that refers to the file.

Currently, git-rebase.sh uses mostly lower case variable names, while
git-rebase--interactive.sh uses mostly upper case variable names. For
consistency, downcase all variables, not just the ones that will be
shared between the two script files.

Helped-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

rebase: stricter check of standalone sub commandMartin von Zweigbergk Sun, 6 Feb 2011 18:43:36 +0000 (13:43 -0500)

rebase: stricter check of standalone sub command

The sub commands '--continue', '--skip' or '--abort' may only be used
standalone according to the documentation. Other options following the
sub command are currently not accepted, but options preceeding them
are. For example, 'git rebase --continue -v' is not accepted, while
'git rebase -v --continue' is. Tighten up the check and allow no other
options when one of these sub commands are used.

Only check that it is standalone for non-interactive rebase for
now. Once the command line processing for interactive rebase has been
replaced by the command line processing in git-rebase.sh, this check
will also apply to interactive rebase.

Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

rebase: act on command line outside parsing loopMartin von Zweigbergk Sun, 6 Feb 2011 18:43:35 +0000 (13:43 -0500)

rebase: act on command line outside parsing loop

To later be able to use the command line processing in git-rebase.sh
for both interactive and non-interactive rebases, move anything that
is specific to non-interactive rebase outside of the parsing
loop. Keep only parsing and validation of command line options in the
loop.

Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

rebase: improve detection of rebase in progressMartin von Zweigbergk Sun, 6 Feb 2011 18:43:34 +0000 (13:43 -0500)

rebase: improve detection of rebase in progress

Detect early on if a rebase is in progress and what type of rebase it
is (interactive, merge-based or am-based). This prepares for further
refactoring where am-based rebase will be dispatched to
git-rebase--am.sh and merge-based rebase will be dispatched to
git-rebase--merge.sh.

The idea is to use the same variables whether the type of rebase was
detected from rebase-apply/ or rebase-merge/ directories or from the
command line options. This will make the code more readable and will
later also make it easier to dispatch to the type-specific scripts.

Also show a consistent error message independent of the type of rebase
that was in progress and remove the obsolete wording about being in
the middle of a 'patch application', since that (an existing
"$GIT_DIR"/rebase-apply/applying) aborts 'git rebase' at an earlier
stage.

Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

rebase: remove unused rebase state 'prev_head'Martin von Zweigbergk Sun, 6 Feb 2011 18:43:33 +0000 (13:43 -0500)

rebase: remove unused rebase state 'prev_head'

The state stored in $GIT_DIR/rebase-merge/prev_head was introduced in
58634db (rebase: Allow merge strategies to be used when rebasing,
2006-06-21), but it was never used and should therefore be removed.

Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

rebase: read state outside loopMartin von Zweigbergk Sun, 6 Feb 2011 18:43:32 +0000 (13:43 -0500)

rebase: read state outside loop

The 'onto_name' state used in 'git rebase --merge' is currently read
once for each commit that need to be applied. It doesn't change
between each iteration, however, so it should be moved out of the
loop. This also makes the code more readable. Also remove the unused
variable 'end'.

Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

rebase: refactor reading of stateMartin von Zweigbergk Sun, 6 Feb 2011 18:43:31 +0000 (13:43 -0500)

rebase: refactor reading of state

The code reading the state saved in $merge_dir or $rebase_dir is
currently spread out in many places, making it harder to read and to
introduce additional state. Extract this code into one method that
reads the state. Only extract the code associated with the state that
is written when the rebase is initiated. Leave the state that changes
for each commmit, at least for now.

Currently, when resuming a merge-based rebase using --continue or
--skip, move_to_original_branch (via finish_rb_merge) will be called
without head_name and orig_head set. These variables are then lazily
read in move_to_original_branch if head_name is not set (together with
onto, which is unnecessarily read again). Change this by always
eagerly reading the state, for both am-based and merge-based rebase,
in the --continue and --skip cases. Note that this does not change the
behavior for am-based rebase, which read the state eagerly even before
this commit.

Reading the state eagerly means that part of the state will sometimes
be read unnecessarily. One example is when the rebase is continued,
but stops again at another merge conflict. Another example is when the
rebase is aborted. However, since both of these cases involve user
interaction, the delay is hopefully not noticeable. The
call_merge/continue_merge loop is not affected.

Helped-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

rebase: clearer names for directory variablesMartin von Zweigbergk Sun, 6 Feb 2011 18:43:30 +0000 (13:43 -0500)

rebase: clearer names for directory variables

Instead of using the old variable name 'dotest' for
"$GIT_DIR"/rebase-merge and no variable for "$GIT_DIR"/rebase-apply,
introduce two variables 'merge_dir' and 'apply_dir' for these paths.

Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'tr/merge-unborn-clobber'Junio C Hamano Thu, 10 Feb 2011 00:41:17 +0000 (16:41 -0800)

Merge branch 'tr/merge-unborn-clobber'

* tr/merge-unborn-clobber:
Exhibit merge bug that clobbers index&WT

Conflicts:
t/t7607-merge-overwrite.sh

Merge branch 'jc/unpack-trees'Junio C Hamano Thu, 10 Feb 2011 00:41:17 +0000 (16:41 -0800)

Merge branch 'jc/unpack-trees'

* jc/unpack-trees:
unpack_trees(): skip trees that are the same in all input
unpack-trees.c: cosmetic fix

Conflicts:
unpack-trees.c

Merge branch 'jc/fsck-fixes'Junio C Hamano Thu, 10 Feb 2011 00:41:17 +0000 (16:41 -0800)

Merge branch 'jc/fsck-fixes'

* jc/fsck-fixes:
fsck: do not give up too early in fsck_dir()
fsck: drop unused parameter from traverse_one_object()

Merge branch 'tr/diff-words-test'Junio C Hamano Thu, 10 Feb 2011 00:41:17 +0000 (16:41 -0800)

Merge branch 'tr/diff-words-test'

* tr/diff-words-test:
t4034 (diff --word-diff): add a minimum Perl drier test vector
t4034 (diff --word-diff): style suggestions
userdiff: simplify word-diff safeguard
t4034: bulk verify builtin word regex sanity

Merge branch 'rr/fi-import-marks-if-exists'Junio C Hamano Thu, 10 Feb 2011 00:41:16 +0000 (16:41 -0800)

Merge branch 'rr/fi-import-marks-if-exists'

* rr/fi-import-marks-if-exists:
fast-import: Introduce --import-marks-if-exists

Merge branch 'jn/unpack-lstat-failure-report'Junio C Hamano Thu, 10 Feb 2011 00:41:16 +0000 (16:41 -0800)

Merge branch 'jn/unpack-lstat-failure-report'

* jn/unpack-lstat-failure-report:
unpack-trees: handle lstat failure for existing file
unpack-trees: handle lstat failure for existing directory

Merge branch 'ef/alias-via-run-command'Junio C Hamano Thu, 10 Feb 2011 00:41:16 +0000 (16:41 -0800)

Merge branch 'ef/alias-via-run-command'

* ef/alias-via-run-command:
alias: use run_command api to execute aliases

Merge branch 'cb/setup'Junio C Hamano Thu, 10 Feb 2011 00:41:16 +0000 (16:41 -0800)

Merge branch 'cb/setup'

* cb/setup:
setup: translate symlinks in filename when using absolute paths

Merge branch 'ae/better-template-failure-report'Junio C Hamano Thu, 10 Feb 2011 00:41:16 +0000 (16:41 -0800)

Merge branch 'ae/better-template-failure-report'

* ae/better-template-failure-report:
Improve error messages when temporary file creation fails

Merge branch 'jn/cherry-pick-strategy-option'Junio C Hamano Thu, 10 Feb 2011 00:41:16 +0000 (16:41 -0800)

Merge branch 'jn/cherry-pick-strategy-option'

* jn/cherry-pick-strategy-option:
cherry-pick/revert: add support for -X/--strategy-option

Merge branch 'maint-1.7.0' into maintJunio C Hamano Thu, 10 Feb 2011 00:40:12 +0000 (16:40 -0800)

Merge branch 'maint-1.7.0' into maint

* maint-1.7.0:
fast-import: introduce "feature notes" command
fast-import: clarify documentation of "feature" command

Conflicts:
Documentation/git-fast-import.txt

fast-import: introduce "feature notes" commandJonathan Nieder Wed, 9 Feb 2011 22:43:57 +0000 (16:43 -0600)

fast-import: introduce "feature notes" command

Here is a 'feature' command for streams to use to require support for
the notemodify (N) command.

When the 'feature' facility was introduced (v1.7.0-rc0~95^2~4,
2009-12-04), the notes import feature was old news (v1.6.6-rc0~21^2~8,
2009-10-09) and it was not obvious it deserved to be a named feature.
But now that is clear, since all major non-git fast-import backends
lack support for it.

Details: on git version with this patch applied, any "feature notes"
command in the features/options section at the beginning of a stream
will be treated as a no-op. On fast-import implementations without
the feature (and older git versions), the command instead errors out
with a message like

This version of fast-import does not support feature notes.

So by declaring use of notes at the beginning of a stream, frontends
can avoid wasting time and other resources when the backend does not
support notes. (This would be especially important for backends that
do not support rewinding history after a botched import.)

Improved-by: Thomas Rast <trast@student.ethz.ch>
Improved-by: Sverre Rabbelier <srabbelier@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

fast-import: clarify documentation of "feature" commandJonathan Nieder Sun, 28 Nov 2010 19:43:57 +0000 (13:43 -0600)

fast-import: clarify documentation of "feature" command

The "feature" command allows streams to specify options for the import
that must not be ignored. Logically, they are part of the stream,
even though technically most supported features are synonyms to
command-line options.

Make this more obvious by being more explicit about how the analogy
between most "feature" commands and command-line options works. Treat
the feature (import-marks) that does not fit this analogy separately.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Sverre Rabbelier <srabbelier@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation/merge subtree How-To: fix typoUwe Kleine-König Wed, 9 Feb 2011 09:04:43 +0000 (10:04 +0100)

Documentation/merge subtree How-To: fix typo

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

pull: Document the "--[no-]recurse-submodules" optionsJens Lehmann Mon, 7 Feb 2011 22:24:54 +0000 (23:24 +0100)

pull: Document the "--[no-]recurse-submodules" options

In commits be254a0ea9 and 7dce19d374 the handling of the new fetch options
"--[no-]recurse-submodules" had been added to git-pull.sh. But they were
not documented as the pull options they now are, so let's fix that.

Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

quote.h: simplify the inclusionJonathan Nieder Wed, 5 Jan 2011 00:36:34 +0000 (18:36 -0600)

quote.h: simplify the inclusion

Attempting to include quote.h without first including strbuf.h results
in warnings:

./quote.h:33:33: warning: ‘struct strbuf’ declared inside parameter list
./quote.h:33:33: warning: its scope is only this definition or declaration, which is probably not what you want
./quote.h:34:34: warning: ‘struct strbuf’ declared inside parameter list
...

Add a toplevel declaration for struct strbuf to avoid this.

While at it, stop including system headers from quote.h. git source
files already need to include git-compat-util.h sooner to ensure the
appropriate feature test macros are defined.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

sha1_object_info: examine cached_object store tooNguyễn Thái Ngọc Duy Sat, 5 Feb 2011 14:03:02 +0000 (21:03 +0700)

sha1_object_info: examine cached_object store too

Cached object store was added in d66b37b (Add pretend_sha1_file()
interface. - 2007-02-04) as a way to temporarily inject some objects
to object store.

But only read_sha1_file() knows about this store. While it will return
an object from this store, sha1_object_info() will happily say
"object not found".

Teach sha1_object_info() about the cached store for consistency.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

sha1_file.c: move find_cached_object up so sha1_object_... Nguyễn Thái Ngọc Duy Sat, 5 Feb 2011 14:03:01 +0000 (21:03 +0700)

sha1_file.c: move find_cached_object up so sha1_object_info can use it

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Add const to parse_{commit,tag}_buffer()Nguyễn Thái Ngọc Duy Sat, 5 Feb 2011 10:52:20 +0000 (17:52 +0700)

Add const to parse_{commit,tag}_buffer()

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

diff: support --cached on unborn branchesNguyễn Thái Ngọc Duy Thu, 3 Feb 2011 06:23:34 +0000 (13:23 +0700)

diff: support --cached on unborn branches

"git diff --cached" (without revision) used to mean "git diff --cached
HEAD" (i.e. the user was too lazy to type HEAD). This "correctly"
failed when there was no commit yet. But was that correctness useful?

This patch changes the definition of what particular command means.
It is a request to show what _would_ be committed without further "git
add". The internal implementation is the same "git diff --cached HEAD"
when HEAD exists, but when there is no commit yet, it compares the index
with an empty tree object to achieve the desired result.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

gitweb: Mention optional Perl modules in INSTALLJakub Narebski Thu, 3 Feb 2011 23:20:48 +0000 (00:20 +0100)

gitweb: Mention optional Perl modules in INSTALL

Some optional additional Perl modules are required for some of extra
features. Mention those in gitweb/INSTALL.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

post-receive-email: suppress error if description file... Sitaram Chamarty Thu, 3 Feb 2011 01:00:32 +0000 (06:30 +0530)

post-receive-email: suppress error if description file missing

Signed-off-by: Sitaram Chamarty <sitaramc@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t7407: fix line endings for mingw buildPat Thoyts Thu, 3 Feb 2011 15:31:44 +0000 (15:31 +0000)

t7407: fix line endings for mingw build

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t4120-apply-popt: help systems with core.filemode=falseJohannes Sixt Thu, 3 Feb 2011 15:31:43 +0000 (15:31 +0000)

t4120-apply-popt: help systems with core.filemode=false

A test case verifies that filemode-only patches work as expected. Help
systems where "test -x" does not work by applying the test patch also to
the index, where the effects can be verified even on such systems.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t3509: use unconstrained initial test to setup repository.Pat Thoyts Thu, 3 Feb 2011 15:31:42 +0000 (15:31 +0000)

t3509: use unconstrained initial test to setup repository.

The first test did not run on msysGit due to the SYMLINKS constraint and
so subsequent tests failed because the test repository was not initialized.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

start_command: flush buffers in the WIN32 code path... Johannes Sixt Fri, 4 Feb 2011 08:41:58 +0000 (09:41 +0100)

start_command: flush buffers in the WIN32 code path as well

The POSIX code path did The Right Thing already, but we have to do the same
on Windows.

This bug caused failures in t5526-fetch-submodules, where the output of
'git fetch --recurse-submodules' was in the wrong order.

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

bundle: Use OFS_DELTA in bundle filesShawn O. Pearce Sun, 6 Feb 2011 00:58:53 +0000 (16:58 -0800)

bundle: Use OFS_DELTA in bundle files

git-bundle first appeared in 2e0afafe ("Add git-bundle") in Feb 2007,
and first shipped in Git 1.5.1.

However, OFS_DELTA is an even earlier invention, coming about in
eb32d236 ("introduce delta objects with offset to base") in Sep 2006,
and first shipped in Git 1.4.4.5.

OFS_DELTA is smaller, about 3.2%-5% smaller, and is typically faster
to access than REF_DELTA because the exact location of the delta base
is available after parsing the object header. Since all bundle aware
versions of Git are also OFS_DELTA aware, just make it the default.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Acked-by: Nicolas Pitre <nico@fluxnic.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'jl/fetch-submodule-recursive' into maintJunio C Hamano Mon, 31 Jan 2011 18:05:57 +0000 (10:05 -0800)

Merge branch 'jl/fetch-submodule-recursive' into maint

* jl/fetch-submodule-recursive:
t5526: Fix wrong argument order in "git config"

t5526: Fix wrong argument order in "git config"Jens Lehmann Mon, 31 Jan 2011 16:51:25 +0000 (17:51 +0100)

t5526: Fix wrong argument order in "git config"

This fixes a typo where the "git config" arguments "-f" and "--unset" were
swapped leading to the creation of a "--unset" file.

Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Git 1.7.4 v1.7.4Junio C Hamano Sun, 30 Jan 2011 19:53:13 +0000 (11:53 -0800)

Git 1.7.4

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

fsck: do not give up too early in fsck_dir()Junio C Hamano Wed, 26 Jan 2011 21:01:54 +0000 (13:01 -0800)

fsck: do not give up too early in fsck_dir()

When there is a random garbage file whose name happens to be 38-byte
long in a .git/objects/??/ directory, the loop terminated prematurely
without marking all the other files that it hasn't checked in the
readdir() loop.

Treat such a file just like any other garbage file, and do not break out
of the readdir() loop.

While at it, replace repeated sprintf() calls to a single one outside the
loop.

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

fsck: drop unused parameter from traverse_one_object()Junio C Hamano Wed, 26 Jan 2011 20:46:55 +0000 (12:46 -0800)

fsck: drop unused parameter from traverse_one_object()

Also add comments to seemingly unsafe pointer dereferences, that
are all safe.

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

Don't pass "--xhtml" to hightlight in gitweb.perl script.Adam Tkac Thu, 27 Jan 2011 12:51:51 +0000 (13:51 +0100)

Don't pass "--xhtml" to hightlight in gitweb.perl script.

The "--xhtml" option is supported only in highlight < 3.0. There is no option
to enforce (X)HTML output format compatible with both highlight < 3.0 and
highlight >= 3.0. However default output format is HTML so we don't need to
explicitly specify it.

Signed-off-by: Adam Tkac <atkac@redhat.com>
Helped-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint'Junio C Hamano Thu, 27 Jan 2011 18:27:49 +0000 (10:27 -0800)

Merge branch 'maint'

* maint:
rebase -i: clarify in-editor documentation of "exec"
tests: sanitize more git environment variables
fast-import: treat filemodify with empty tree as delete
rebase: give a better error message for bogus branch
rebase: use explicit "--" with checkout

Conflicts:
t/t9300-fast-import.sh

rebase -i: clarify in-editor documentation of "exec"Jonathan Nieder Fri, 21 Jan 2011 00:36:24 +0000 (18:36 -0600)

rebase -i: clarify in-editor documentation of "exec"

The hints in the current "instruction sheet" template look like so:

# Rebase 3f14246..a1d7e01 onto 3f14246
#
# Commands:
# p, pick = use commit
# r, reword = use commit, but edit the commit message
# e, edit = use commit, but stop for amending
# s, squash = use commit, but meld into previous commit
# f, fixup = like "squash", but discard this commit's log message
# x <cmd>, exec <cmd> = Run a shell command <cmd>, and stop if it fails
#
# If you remove a line here THAT COMMIT WILL BE LOST.
# However, if you remove everything, the rebase will be aborted.
#

This does not make it clear that the format of each line is

<insn> <commit id> <explanatory text that will be printed>

but the reader will probably infer that from the automatically
generated pick examples above it.

What about the "exec" instruction? By analogy, I might imagine that
the format of that line is "exec <command> <explanatory text>", and
the "x <cmd>" hint does not address that question (at first I read it
as taking an argument <cmd> that is the name of a shell). Meanwhile,
the mention of <cmd> makes the hints harder to scan as a table.

So remove the <cmd> and add some words to remind the reader that
"exec" runs a command named by the rest of the line. To make room, it
is left to the manpage to explain that that command is run using
$SHELL and that nonzero status from that command will pause the
rebase.

Wording from Junio.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

tests: sanitize more git environment variablesJeff King Wed, 26 Jan 2011 20:33:32 +0000 (15:33 -0500)

tests: sanitize more git environment variables

These variables should generally not be set in one's
environment, but they do get set by rebase, which means
doing an interactive rebase like:

pick abcd1234 foo
exec make test

will cause false negatives in the test suite.

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

Merge branch 'jn/fast-import-empty-tree-removal' into... Junio C Hamano Thu, 27 Jan 2011 18:23:53 +0000 (10:23 -0800)

Merge branch 'jn/fast-import-empty-tree-removal' into maint

* jn/fast-import-empty-tree-removal:
fast-import: treat filemodify with empty tree as delete

fast-import: treat filemodify with empty tree as deleteJonathan Nieder Thu, 27 Jan 2011 06:07:49 +0000 (00:07 -0600)

fast-import: treat filemodify with empty tree as delete

Normal git processes do not allow one to build a tree with an empty
subtree entry without trying hard at it. This is in keeping with the
general UI philosophy: git tracks content, not empty directories.

v1.7.3-rc0~75^2 (2010-06-30) changed that by making it easy to include
an empty subtree in fast-import's active commit:

M 040000 4b825dc642cb6eb9a060e54bf8d69288fbee4904 subdir

One can trigger this by reading an empty tree (for example, the tree
corresponding to an empty root commit) and trying to move it to a
subtree. It is better and more closely analogous to 'git read-tree
--prefix' to treat such commands as requests to remove the subtree.

Noticed-by: David Barr <david.barr@cordelta.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

rebase: give a better error message for bogus branchJeff King Thu, 27 Jan 2011 00:27:11 +0000 (19:27 -0500)

rebase: give a better error message for bogus branch

When you give a non-existent branch to git-rebase, it spits
out the usage. This can be confusing, since you may
understand the usage just fine, but simply have made a
mistake in the branch name.

Before:

$ git rebase origin bogus
Usage: git rebase ...

After:

$ git rebase origin bogus
fatal: no such branch: bogus
Usage: git rebase ...

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

rebase: use explicit "--" with checkoutJeff King Thu, 27 Jan 2011 00:26:59 +0000 (19:26 -0500)

rebase: use explicit "--" with checkout

In the case of a ref/pathname conflict, checkout will
already do the right thing and checkout the ref. However,
for a non-existant ref, this has two advantages:

1. If a file with that pathname exists, rebase will
refresh the file from the index and then rebase the
current branch instead of producing an error.

2. If no such file exists, the error message using an
explicit "--" is better:

# before
$ git rebase -i origin bogus
error: pathspec 'bogus' did not match any file(s) known to git.
Could not checkout bogus

# after
$ git rebase -i origin bogus
fatal: invalid reference: bogus
Could not checkout bogus

The problems seem to be trigger-able only through "git
rebase -i", as regular git-rebase checks the validity of the
branch parameter as a ref very early on. However, it doesn't
hurt to be defensive.

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

Git 1.7.4-rc3 v1.7.4-rc3Junio C Hamano Mon, 24 Jan 2011 19:00:00 +0000 (11:00 -0800)

Git 1.7.4-rc3

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

Merge branch 'as/userdiff-pascal'Junio C Hamano Mon, 24 Jan 2011 18:54:12 +0000 (10:54 -0800)

Merge branch 'as/userdiff-pascal'

* as/userdiff-pascal:
userdiff: match Pascal class methods

Merge branch 'jn/setup-fixes'Junio C Hamano Mon, 24 Jan 2011 18:53:09 +0000 (10:53 -0800)

Merge branch 'jn/setup-fixes'

* jn/setup-fixes:
t1510: fix typo in the comment of a test
Documentation updates for 'GIT_WORK_TREE without GIT_DIR' historical usecase
Subject: setup: officially support --work-tree without --git-dir
tests: compress the setup tests
tests: cosmetic improvements to the repo-setup test
t/README: hint about using $(pwd) rather than $PWD in tests
Fix expected values of setup tests on Windows

t1510: fix typo in the comment of a testJonathan Nieder Sat, 22 Jan 2011 20:02:48 +0000 (14:02 -0600)

t1510: fix typo in the comment of a test

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation updates for 'GIT_WORK_TREE without GIT_DI... Junio C Hamano Sun, 23 Jan 2011 23:49:41 +0000 (15:49 -0800)

Documentation updates for 'GIT_WORK_TREE without GIT_DIR' historical usecase

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

Subject: setup: officially support --work-tree without... Jonathan Nieder Wed, 19 Jan 2011 12:42:30 +0000 (06:42 -0600)

Subject: setup: officially support --work-tree without --git-dir

The original intention of --work-tree was to allow people to work in a
subdirectory of their working tree that does not have an embedded .git
directory. Because their working tree, which their $cwd was in, did not
have an embedded .git, they needed to use $GIT_DIR to specify where it is,
and because this meant there was no way to discover where the root level
of the working tree was, so we needed to add $GIT_WORK_TREE to tell git
where it was.

However, this facility has long been (mis)used by people's scripts to
start git from a working tree _with_ an embedded .git directory, let git
find .git directory, and then pretend as if an unrelated directory were
the associated working tree of the .git directory found by the discovery
process. It happens to work in simple cases, and is not worth causing
"regression" to these scripts.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation: do not treat reset --keep as a special... Jonathan Nieder Fri, 21 Jan 2011 18:37:34 +0000 (12:37 -0600)

Documentation: do not treat reset --keep as a special case

The current treatment of "git reset --keep" emphasizes how it
differs from --hard (treatment of local changes) and how it breaks
down into plumbing (git read-tree -m -u HEAD <commit> followed by git
update-ref HEAD <commit>). This can discourage people from using
it, since it might seem to be a complex or niche option.

Better to emphasize what the --keep flag is intended for --- moving
the index and worktree from one commit to another, like "git checkout"
would --- so the reader can make a more informed decision about the
appropriate situations in which to use it.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Correctly report corrupted objectsBjörn Steinbrink Thu, 20 Jan 2011 20:12:20 +0000 (21:12 +0100)

Correctly report corrupted objects

The errno check added in commit 3ba7a06 "A loose object is not corrupt
if it cannot be read due to EMFILE" only checked for whether errno is
not ENOENT and thus incorrectly treated "no error" as an error
condition.

Because of that, it never reached the code path that would report that
the object is corrupted and instead caused funny errors like:

fatal: failed to read object 333c4768ce595793fdab1ef3a036413e2a883853: Success

So we have to extend the check to cover the case in which the object
file was successfully read, but its contents are corrupted.

Reported-by: Will Palmer <wmpalmer@gmail.com>
Signed-off-by: Björn Steinbrink <B.Steinbrink@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

tests: compress the setup testsJonathan Nieder Wed, 19 Jan 2011 12:40:51 +0000 (06:40 -0600)

tests: compress the setup tests

New test helpers:

- setup_repo, to initialize a repository or gitfile pointing to a
repository, with core.bare and core.worktree set as specified;

- try_case, to run setup from a given directory and validate the
result, with GIT_DIR and GIT_WORK_TREE set as specified;

- try_repo, to initialize a repository and call "try_case" from the
toplevel and a subdirectory;

- run_wt_tests, to run a battery of tests that check for sane
behavior when GIT_WORK_TREE is set to various positions relative to
the .git dir and cwd.

Use these helpers to make the test shorter, less repetitive, and (one
hopes) easier to understand and modify.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

tests: cosmetic improvements to the repo-setup testJonathan Nieder Wed, 19 Jan 2011 12:38:22 +0000 (06:38 -0600)

tests: cosmetic improvements to the repo-setup test

Give an overview in "sh t1510-repo-setup.sh --help" output.
Waste some vertical and horizontal space for clearer code.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint'Junio C Hamano Wed, 19 Jan 2011 16:33:54 +0000 (08:33 -0800)

Merge branch 'maint'

* maint:
exec_cmd: remove unused extern

exec_cmd: remove unused externErik Faye-Lund Mon, 10 Jan 2011 22:00:49 +0000 (23:00 +0100)

exec_cmd: remove unused extern

This definition was added by commit 77cb17e9, but it's left unused since
commit 511707d. Remove the left-over definition.

Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'jn/gitweb-no-logo' into maintJunio C Hamano Wed, 19 Jan 2011 16:26:47 +0000 (08:26 -0800)

Merge branch 'jn/gitweb-no-logo' into maint

* jn/gitweb-no-logo:
gitweb: make logo optional

Merge branch 'jk/diff-driver-binary-doc' into maintJunio C Hamano Wed, 19 Jan 2011 16:26:44 +0000 (08:26 -0800)

Merge branch 'jk/diff-driver-binary-doc' into maint

* jk/diff-driver-binary-doc:
docs: explain diff.*.binary option

Merge branch 'tr/submodule-relative-scp-url' into maintJunio C Hamano Wed, 19 Jan 2011 16:26:41 +0000 (08:26 -0800)

Merge branch 'tr/submodule-relative-scp-url' into maint

* tr/submodule-relative-scp-url:
submodule: fix relative url parsing for scp-style origin

Merge branch 'rj/maint-difftool-cygwin-workaround'... Junio C Hamano Wed, 19 Jan 2011 16:26:24 +0000 (08:26 -0800)

Merge branch 'rj/maint-difftool-cygwin-workaround' into maint

* rj/maint-difftool-cygwin-workaround:
difftool: Fix failure on Cygwin

Merge branch 'rj/maint-test-fixes' into maintJunio C Hamano Wed, 19 Jan 2011 16:26:17 +0000 (08:26 -0800)

Merge branch 'rj/maint-test-fixes' into maint

* rj/maint-test-fixes:
t9501-*.sh: Fix a test failure on Cygwin
lib-git-svn.sh: Add check for mis-configured web server variables
lib-git-svn.sh: Avoid setting web server variables unnecessarily
t9142: Move call to start_httpd into the setup test
t3600-rm.sh: Don't pass a non-existent prereq to test #15

Merge branch 'jn/maint-gitweb-pathinfo-fix' into maintJunio C Hamano Wed, 19 Jan 2011 16:26:04 +0000 (08:26 -0800)

Merge branch 'jn/maint-gitweb-pathinfo-fix' into maint

* jn/maint-gitweb-pathinfo-fix:
gitweb: Fix handling of whitespace in generated links

Merge branch 'ak/describe-exact' into maintJunio C Hamano Wed, 19 Jan 2011 16:25:52 +0000 (08:25 -0800)

Merge branch 'ak/describe-exact' into maint

* ak/describe-exact:
describe: Delay looking up commits until searching for an inexact match
describe: Store commit_names in a hash table by commit SHA1
describe: Do not use a flex array in struct commit_name
describe: Use for_each_rawref

Merge branch 'jn/maint-fast-import-object-reuse' into... Junio C Hamano Wed, 19 Jan 2011 16:25:46 +0000 (08:25 -0800)

Merge branch 'jn/maint-fast-import-object-reuse' into maint

* jn/maint-fast-import-object-reuse:
fast-import: insert new object entries at start of hash bucket

Merge branch 'jn/submodule-b-current' into maintJunio C Hamano Wed, 19 Jan 2011 16:25:41 +0000 (08:25 -0800)

Merge branch 'jn/submodule-b-current' into maint

* jn/submodule-b-current:
git submodule: Remove now obsolete tests before cloning a repo
git submodule -b ... of current HEAD fails

Merge branch 'jc/maint-svn-info-test-fix' into maintJunio C Hamano Wed, 19 Jan 2011 16:25:38 +0000 (08:25 -0800)

Merge branch 'jc/maint-svn-info-test-fix' into maint

* jc/maint-svn-info-test-fix:
t9119: do not compare "Text Last Updated" line from "svn info"

Merge branch 'nd/maint-relative' into maintJunio C Hamano Wed, 19 Jan 2011 16:25:31 +0000 (08:25 -0800)

Merge branch 'nd/maint-relative' into maint

* nd/maint-relative:
get_cwd_relative(): do not misinterpret root path

Documentation/fast-import: put explanation of M 040000... Jonathan Nieder Sun, 16 Jan 2011 02:22:35 +0000 (20:22 -0600)

Documentation/fast-import: put explanation of M 040000 <dataref> "" in context

Omit needless words ("Additionally ... <path> may also" is redundant).
While at it, place the explanation of this special case after the
general rules for paths to provide the reader with some context.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

svndump.c: Fix a printf format compiler warningRamsay Jones Tue, 11 Jan 2011 18:17:21 +0000 (18:17 +0000)

svndump.c: Fix a printf format compiler warning

In particular, on systems that define uint32_t as an unsigned long,
gcc complains as follows:

CC vcs-svn/svndump.o
vcs-svn/svndump.c: In function `svndump_read':
vcs-svn/svndump.c:215: warning: int format, uint32_t arg (arg 2)

In order to suppress the warning we use the C99 format specifier
macro PRIu32 from <inttypes.h>.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Acked-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote-ext: do not segfault for blank linesJonathan Nieder Sun, 16 Jan 2011 03:49:40 +0000 (21:49 -0600)

remote-ext: do not segfault for blank lines

Instead of stripping space characters past the beginning of the
line and overflowing a buffer, stop at the beginning of the line
(mimicking the corresponding fix in remote-fd).

The argument to isspace does not need to be cast explicitly because
git isspace takes care of that already.

Noticed-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation/fast-import: capitalize beginning of... Jonathan Nieder Sun, 16 Jan 2011 02:16:05 +0000 (20:16 -0600)

Documentation/fast-import: capitalize beginning of sentence

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t4034 (diff --word-diff): add a minimum Perl drier... Junio C Hamano Tue, 18 Jan 2011 17:43:43 +0000 (09:43 -0800)

t4034 (diff --word-diff): add a minimum Perl drier test vector

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