git.git
14 years agomerge-recursive: Remove redundant path clearing for D/F conflicts
Elijah Newren [Mon, 20 Sep 2010 08:29:10 +0000 (02:29 -0600)]
merge-recursive: Remove redundant path clearing for D/F conflicts

The code had several places where individual checks were done to remove
files that could be in the way of directories in D/F conflicts.  Not all
D/F conflicts could have a path cleared for them in such a manner, however,
leading to the need to create make_room_for_directories_of_df_conflicts()
as done in the previous patch.  That new function could not have been
incorporated into the code sooner, since not all relevant code paths had
been deferred to process_df_entry() yet, leading to the creation of even
more of these now-redundant path removals.

Clean out all of these extra D/F path clearing cases.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agomerge-recursive: Make room for directories in D/F conflicts
Elijah Newren [Mon, 20 Sep 2010 08:29:09 +0000 (02:29 -0600)]
merge-recursive: Make room for directories in D/F conflicts

When there are unmerged entries present, make sure to check for D/F
conflicts first and remove any files present in HEAD that would be in the
way of creating files below the correspondingly named directory.  Such
files will be processed again at the end of the merge in
process_df_entry(); at that time we will be able to tell if we need to
and can reinstate the file, whether we need to place its contents in a
different file due to the directory still being present, etc.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agohandle_delete_modify(): Check whether D/F conflicts are still present
Elijah Newren [Mon, 20 Sep 2010 08:29:08 +0000 (02:29 -0600)]
handle_delete_modify(): Check whether D/F conflicts are still present

If all the paths below some directory involved in a D/F conflict were not
removed during the rest of the merge, then the contents of the file whose
path conflicted needs to be recorded in file with an alternative filename.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agomerge_content(): Check whether D/F conflicts are still present
Elijah Newren [Mon, 20 Sep 2010 08:29:07 +0000 (02:29 -0600)]
merge_content(): Check whether D/F conflicts are still present

If all the paths below some directory involved in a D/F conflict were not
removed during the rest of the merge, then the contents of the file whose
path conflicted needs to be recorded in file with an alternative filename.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoconflict_rename_rename_1to2(): Fix checks for presence of D/F conflicts
Elijah Newren [Mon, 20 Sep 2010 08:29:06 +0000 (02:29 -0600)]
conflict_rename_rename_1to2(): Fix checks for presence of D/F conflicts

This function is called from process_df_entry(), near the end of the merge.
Rather than just checking whether one of the sides of the merge had a
directory at the same path as one of our files, check whether that
directory is still present by this point of our merge.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoconflict_rename_delete(): Check whether D/F conflicts are still present
Elijah Newren [Mon, 20 Sep 2010 08:29:05 +0000 (02:29 -0600)]
conflict_rename_delete(): Check whether D/F conflicts are still present

If all the paths below some directory involved in a D/F conflict were not
removed during the rest of the merge, then the contents of the file whose
path conflicted needs to be recorded in file with an alternative filename.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agomerge-recursive: Delay modify/delete conflicts if D/F conflict present
Elijah Newren [Mon, 20 Sep 2010 08:29:04 +0000 (02:29 -0600)]
merge-recursive: Delay modify/delete conflicts if D/F conflict present

When handling merges with modify/delete conflicts, if the modified path is
involved in a D/F conflict, handle the issue in process_df_entry() rather
than process_entry().

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agomerge-recursive: Delay content merging for renames
Elijah Newren [Mon, 20 Sep 2010 08:29:03 +0000 (02:29 -0600)]
merge-recursive: Delay content merging for renames

Move the handling of content merging for renames from process_renames() to
process_df_entry().

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agomerge-recursive: Delay handling of rename/delete conflicts
Elijah Newren [Mon, 20 Sep 2010 08:29:02 +0000 (02:29 -0600)]
merge-recursive: Delay handling of rename/delete conflicts

Move the handling of rename/delete conflicts from process_renames() to
process_df_entry().

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agomerge-recursive: Move handling of double rename of one file to other file
Elijah Newren [Mon, 20 Sep 2010 08:29:01 +0000 (02:29 -0600)]
merge-recursive: Move handling of double rename of one file to other file

Move the handling of rename/rename conflicts where one file is renamed on
both sides to the same file, from process_renames() to process_entry().
Here we avoid the three way merge logic by just using
update_stages_and_entry() to move the higher stage entries in the index
from the rename source to the rename destination, and then allow
process_entry() to do its magic.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agomerge-recursive: Move handling of double rename of one file to two
Elijah Newren [Mon, 20 Sep 2010 08:29:00 +0000 (02:29 -0600)]
merge-recursive: Move handling of double rename of one file to two

Move the handling of rename/rename conflicts where one file is renamed to
two different files, from process_renames() to process_df_entry().

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agomerge-recursive: Avoid doubly merging rename/add conflict contents
Elijah Newren [Mon, 20 Sep 2010 08:28:59 +0000 (02:28 -0600)]
merge-recursive: Avoid doubly merging rename/add conflict contents

When a commit moves A to B while another commit created B (or moved C to
B), and these two different commits serve as different merge-bases for a
later merge, c94736a (merge-recursive: don't segfault while handling
rename clashes 2009-07-30) added some special code to avoid segfaults.
Since that commit, the two versions of B are merged in place (which could
be potentially conflicting) and the intermediate result is used as the
virtual ancestor.

However, right before this special merge, try_merge was turned on, meaning
that process_renames() would try an alternative merge that ignores the
'add' part of the conflict, and, if the merge is clean, store that as the
new virtual ancestor.  This could cause incorrect merging of criss-cross
merges; it would typically result in just recording a slightly confusing
merge base, but in some cases it could cause silent acceptance of one side
of a merge as the final resolution when a conflict should have been
flagged.

When we do a special merge for such a rename/add conflict between
merge-bases, turn try_merge off to avoid an inappropriate second merge.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agomerge-recursive: Update merge_content() call signature
Elijah Newren [Mon, 20 Sep 2010 08:28:58 +0000 (02:28 -0600)]
merge-recursive: Update merge_content() call signature

Enable calling merge_content() and providing more information about renames
and D/F conflicts (which we will want to do from process_df_entry()).

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agomerge-recursive: Update conflict_rename_rename_1to2() call signature
Elijah Newren [Mon, 20 Sep 2010 08:28:57 +0000 (02:28 -0600)]
merge-recursive: Update conflict_rename_rename_1to2() call signature

To facilitate having this function called later using information stored
in a rename_df_conflict_info struct, accept a diff_filepair instead of a
rename.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agomerge-recursive: Structure process_df_entry() to handle more cases
Elijah Newren [Mon, 20 Sep 2010 08:28:56 +0000 (02:28 -0600)]
merge-recursive: Structure process_df_entry() to handle more cases

Modify process_df_entry() (mostly just indentation level changes) to
get it ready for handling more D/F conflict type cases.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agomerge-recursive: Have process_entry() skip D/F or rename entries
Elijah Newren [Mon, 20 Sep 2010 08:28:55 +0000 (02:28 -0600)]
merge-recursive: Have process_entry() skip D/F or rename entries

If an entry has an associated rename_df_conflict_info, skip it and allow
it to be processed by process_df_entry().

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agomerge-recursive: New function to assist resolving renames in-core only
Elijah Newren [Mon, 20 Sep 2010 08:28:54 +0000 (02:28 -0600)]
merge-recursive: New function to assist resolving renames in-core only

process_renames() and process_entry() have nearly identical code for
doing three-way file merging to resolve content changes.  Since we are
already deferring some of the current rename handling in order to better
handle D/F conflicts, it seems to make sense to defer content merging as
well and remove the (nearly) duplicated code sections for handling this
merging.

To facilitate this process, add a new update_stages_and_entry() function
which will map the higher stage index entries from two files involved in a
rename into the resulting rename destination's index entries, and update
the associated stage_data structure.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agomerge-recursive: New data structures for deferring of D/F conflicts
Elijah Newren [Mon, 20 Sep 2010 08:28:53 +0000 (02:28 -0600)]
merge-recursive: New data structures for deferring of D/F conflicts

Since we need to resolve paths (including renames) in-core first and defer
checking of D/F conflicts (namely waiting to see if directories are still
in the way after all paths are resolved) before updating files involved in
D/F conflicts, we will need to first process_renames, then record some
information about the rename needed at D/F resolution time, and then make
use of that information when resolving D/F conflicts at the end.

This commit adds some relevant data structures for storing the necessary
information.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agomerge-recursive: Move process_entry's content merging into a function
Elijah Newren [Mon, 20 Sep 2010 08:28:52 +0000 (02:28 -0600)]
merge-recursive: Move process_entry's content merging into a function

This move is in preparation for merge_content growing and being called from
multiple places in order to handle D/F conflicts.

I also snuck in a small change to the output in the case that the merged
content for the file matches the current file contents, to make it better
match (and thus more able to take over) how other merge_file() calls in
process_renames() are handled.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agomerge-recursive: Move delete/modify handling into dedicated function
Elijah Newren [Mon, 20 Sep 2010 08:28:51 +0000 (02:28 -0600)]
merge-recursive: Move delete/modify handling into dedicated function

This move is in preparation for the function being called from multiple
places in order to handle D/F conflicts.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agomerge-recursive: Move rename/delete handling into dedicated function
Elijah Newren [Mon, 20 Sep 2010 08:28:50 +0000 (02:28 -0600)]
merge-recursive: Move rename/delete handling into dedicated function

This move is in preparation for the function growing and being called from
multiple places in order to handle D/F conflicts.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agomerge-recursive: Nuke rename/directory conflict detection
Elijah Newren [Mon, 20 Sep 2010 08:28:49 +0000 (02:28 -0600)]
merge-recursive: Nuke rename/directory conflict detection

Since we want to resolve merges in-core and then detect at the end whether
D/F conflicts remain in the way, we should just apply renames in-core and
let logic elsewhere check for D/F conflicts.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agomerge-recursive: Rename conflict_rename_rename*() for clarity
Elijah Newren [Mon, 20 Sep 2010 08:28:48 +0000 (02:28 -0600)]
merge-recursive: Rename conflict_rename_rename*() for clarity

The names conflict_rename_rename and conflict_rename_rename_2 did not make
it clear what they were handling.  Since the first of these handles one
file being renamed in both branches to different files, while the latter
handles two different files being renamed to the same thing, add a little
'1to2' and '2to1' suffix on these and an explanatory comment to make their
intent clearer.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agomerge-recursive: Small code clarification -- variable name and comments
Elijah Newren [Mon, 20 Sep 2010 08:28:47 +0000 (02:28 -0600)]
merge-recursive: Small code clarification -- variable name and comments

process_renames() had a variable named "stage" and derived variables
src_other and dst_other whose purpose was not immediately obvious; also,
I want to extend the scope of this variable and use it later, so it should
have a more descriptive name.  Do so, and add a brief comment explaining
how it is used and what it relates to.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agot6036: Add testcase for undetected conflict
Elijah Newren [Mon, 20 Sep 2010 08:28:46 +0000 (02:28 -0600)]
t6036: Add testcase for undetected conflict

If merging two lines of development involves a rename/add conflict, and two
different people make such a merge but resolve it differently, and then
someone tries to merge the resulting two merges, then they should clearly
get a conflict due to the different resolutions from the previous
developers.  However, in some such cases the conflict would not be detected
and git would silently accept one of the two versions being merged as the
final merge resolution.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agot6036: Add a second testcase similar to the first but with content changes
Elijah Newren [Mon, 20 Sep 2010 08:28:45 +0000 (02:28 -0600)]
t6036: Add a second testcase similar to the first but with content changes

c94736a (merge-recursive: don't segfault while handling rename clashes
2009-07-30) added t6036 with a testcase that involved dual renames and a
criss-cross merge.  Add a test that is nearly identical, but which also
involves content modification -- a case git currently does not merge
correctly.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agot6036: Test index and worktree state, not just that merge fails
Elijah Newren [Mon, 20 Sep 2010 08:28:44 +0000 (02:28 -0600)]
t6036: Test index and worktree state, not just that merge fails

c94736a (merge-recursive: don't segfault while handling rename clashes
2009-07-30) added this testcase with an interesting corner case test,
which previously had cased git to segfault.  This test ensures that the
segfault does not return and that the merge correctly fails; just add
some checks that verify the state of the index and worktree after the merge
are correct.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agot6020: Add a testcase for modify/delete + directory/file conflict
Elijah Newren [Mon, 20 Sep 2010 08:28:43 +0000 (02:28 -0600)]
t6020: Add a testcase for modify/delete + directory/file conflict

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agot6020: Modernize style a bit
Elijah Newren [Mon, 20 Sep 2010 08:28:42 +0000 (02:28 -0600)]
t6020: Modernize style a bit

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agot6022: Add tests for rename/rename combined with D/F conflicts
Elijah Newren [Mon, 20 Sep 2010 08:28:41 +0000 (02:28 -0600)]
t6022: Add tests for rename/rename combined with D/F conflicts

Add tests where one file is renamed to two different paths in different
sides of history, and where each of the new files matches the name of a
directory from the opposite side of history.  Include tests for both the
case where the merge results in those directories not being cleanly
removed, and where those directories are cleanly removed during the merge.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agot6022: Add paired rename+D/F conflict: (two/file, one/file) -> (one, two)
Elijah Newren [Mon, 20 Sep 2010 08:28:40 +0000 (02:28 -0600)]
t6022: Add paired rename+D/F conflict: (two/file, one/file) -> (one, two)

An interesting testcase is having two files each in their own subdirectory
getting renamed to the toplevel at the directory pathname of the other.
Questions arise as to whether the order of operations matters and whether
the directories can correctly get out of the way and make room for the
new files.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agot6022: Add tests with both rename source & dest involved in D/F conflicts
Elijah Newren [Mon, 20 Sep 2010 08:28:39 +0000 (02:28 -0600)]
t6022: Add tests with both rename source & dest involved in D/F conflicts

Having the source of a rename be involved in a directory/file conflict does
not currently pose any difficulties to the current merge-recursive
algorithm (in contrast to destinations of renames and D/F conflicts).
However, combining the two seemed like good testcases to include for
completeness.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agot6022: Add tests for reversing order of merges when D/F conflicts present
Elijah Newren [Mon, 20 Sep 2010 08:28:38 +0000 (02:28 -0600)]
t6022: Add tests for reversing order of merges when D/F conflicts present

When merging two branches with some path involved in a D/F conflict, the
choice of which branch to merge into the other matters for (at least) two
reasons: (1) whether the working copy has a directory full of files that
is in the way of a file, or a file exists that is in the way of a
directory of files, (2) when the directory full of files does not disappear
due to the merge, what files at the same paths should be renamed to
(e.g. filename~HEAD vs. filename~otherbranch).

Add some tests that reverse the merge order of two other tests, and which
verify the contents are as expected (namely, that the results are identical
other than modified-for-uniqueness filenames involving branch names).

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agot6022: Add test combinations of {content conflict?, D/F conflict remains?}
Elijah Newren [Mon, 20 Sep 2010 08:28:37 +0000 (02:28 -0600)]
t6022: Add test combinations of {content conflict?, D/F conflict remains?}

Add testing of the various ways that a renamed file to a path involved in
a directory/file conflict may be involved in.  This includes whether or not
there are conflicts of the contents of the renamed file (if the file was
modified on both sides of history), and whether the directory from the
other side of the merge will disappear as a result of the merge or not.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agot6032: Add a test checking for excessive output from merge
Elijah Newren [Mon, 20 Sep 2010 08:28:36 +0000 (02:28 -0600)]
t6032: Add a test checking for excessive output from merge

Previous D/F fixes I submitted (5a2580d and ae74548) had caused merge to
become excessively spammy, which was fixed in 96ecac6 (merge-recursive:
Avoid excessive output for and reprocessing of renames 2010-08-20).  Add a
new test to avoid repeating that mistake with my several upcoming changes.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agomerge-recursive: Restructure showing how to chain more process_* functions
Junio C Hamano [Mon, 20 Sep 2010 08:28:35 +0000 (02:28 -0600)]
merge-recursive: Restructure showing how to chain more process_* functions

In 3734893 (merge-recursive: Fix D/F conflicts 2010-07-09),
process_df_entry() was added to process_renames() and process_entry() but
in a somewhat restrictive manner.  Modify the code slightly to make it
clearer how we could chain more such functions if necessary, and alter
process_df_entry() to handle such chaining.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agot3030: Add a testcase for resolvable rename/add conflict with symlinks
Schalk, Ken [Mon, 20 Sep 2010 08:28:34 +0000 (02:28 -0600)]
t3030: Add a testcase for resolvable rename/add conflict with symlinks

d5af510 (RE: [PATCH] Avoid rename/add conflict when contents are identical
2010-09-01) avoided erroring out in a rename/add conflict when the contents
were identical.  A simpler fix could have handled that particular testcase,
but it would not correctly handle the case where a symlink is involved.
Add another testcase using symlinks, to avoid breaking that case.

Signed-off-by: Ken Schalk <ken.schalk@intel.com>
Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge branch 'en/rename-d-f' into en/merge-recursive
Junio C Hamano [Thu, 30 Sep 2010 00:25:28 +0000 (17:25 -0700)]
Merge branch 'en/rename-d-f' into en/merge-recursive

* en/rename-d-f:
  merge-recursive: D/F conflicts where was_a_dir/file -> was_a_dir
  t3509: Add rename + D/F conflict testcase that recursive strategy fails

14 years agoGit 1.7.3 v1.7.3
Junio C Hamano [Sat, 18 Sep 2010 21:55:08 +0000 (14:55 -0700)]
Git 1.7.3

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge branch 'js/ls-files-x-doc'
Junio C Hamano [Sat, 18 Sep 2010 21:46:44 +0000 (14:46 -0700)]
Merge branch 'js/ls-files-x-doc'

* js/ls-files-x-doc:
  ls-files documentation: reword for consistency
  git-ls-files.txt: clarify -x/--exclude option

Conflicts:
Documentation/git-ls-files.txt

14 years agogit-rebase--interactive.sh: replace cut with ${v%% *}
Chris Johnsen [Fri, 17 Sep 2010 21:42:51 +0000 (16:42 -0500)]
git-rebase--interactive.sh: replace cut with ${v%% *}

Some versions of cut do not cope well with lines that do not end in
an LF. In this case, we can completely avoid cut by using the
${var%% *} parameter expansion (suggested by Brandon Casey).

I found this problem when t3404's "avoid unnecessary reset" failed
due to the "rebase -i" not avoiding updating the tested timestamp.

On a Mac OS X 10.4.11 system:

    % printf '%s' 'foo bar' | /usr/bin/cut -d ' ' -f 1
    cut: stdin: Illegal byte sequence

Signed-off-by: Chris Johnsen <chris_johnsen@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agot/t7300: workaround ancient touch by rearranging arguments
Brandon Casey [Wed, 15 Sep 2010 20:58:22 +0000 (15:58 -0500)]
t/t7300: workaround ancient touch by rearranging arguments

The ancient touch on Solaris 7 thinks that a decimal number supplied as
the first argument specifies a date_time to give to the files specified by
the remaining arguments.  In this case, it fails to parse '1' as a proper
date_time and exits with a failure status.  Workaround this flaw by
rearranging the arguments supplied to touch so that a non-digit appears
first and touch will not be confused.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge branch 'bg/fix-t7003'
Junio C Hamano [Thu, 16 Sep 2010 14:43:41 +0000 (07:43 -0700)]
Merge branch 'bg/fix-t7003'

* bg/fix-t7003:
  t7003: Use test_commit instead of custom function

14 years agols-files documentation: reword for consistency
Junio C Hamano [Thu, 16 Sep 2010 00:34:20 +0000 (17:34 -0700)]
ls-files documentation: reword for consistency

Similar to descriptions of other options, state what -x does in imperative
mood.  Start sentences for -X and --exclude-per-directory options in
capital letters.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agogit-ls-files.txt: clarify -x/--exclude option
Jay Soffian [Wed, 15 Sep 2010 23:56:48 +0000 (19:56 -0400)]
git-ls-files.txt: clarify -x/--exclude option

Since b5227d8, -x/--exclude does not apply to cached files.
This is easy to miss unless you read the discussion in the
EXCLUDE PATTERNS section. Clarify that the option applies
to untracked files and direct the reader to EXCLUDE PATTERNS.

Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoGit 1.7.3 rc2 v1.7.3-rc2
Junio C Hamano [Wed, 15 Sep 2010 19:47:37 +0000 (12:47 -0700)]
Git 1.7.3 rc2

14 years agoMerge branch 'dr/maint-ls-tree-prefix-recursion-fix'
Junio C Hamano [Wed, 15 Sep 2010 19:41:13 +0000 (12:41 -0700)]
Merge branch 'dr/maint-ls-tree-prefix-recursion-fix'

* dr/maint-ls-tree-prefix-recursion-fix:
  ls-tree $di $dir: do not mistakenly recurse into directories

14 years agoMerge branch 'os/fix-rebase-diff-no-prefix'
Junio C Hamano [Wed, 15 Sep 2010 19:40:33 +0000 (12:40 -0700)]
Merge branch 'os/fix-rebase-diff-no-prefix'

* os/fix-rebase-diff-no-prefix:
  Add --src/dst-prefix to git-formt-patch in git-rebase.sh

14 years agoMerge branch 'jl/fix-test'
Junio C Hamano [Wed, 15 Sep 2010 19:40:12 +0000 (12:40 -0700)]
Merge branch 'jl/fix-test'

* jl/fix-test:
  t1020: Get rid of 'cd "$HERE"' at the start of each test
  t2016 (checkout -p): add missing &&
  t1302 (core.repositoryversion): style tweaks
  t2105 (gitfile): add missing &&
  t1450 (fsck): remove dangling objects
  tests: subshell indentation stylefix
  Several tests: cd inside subshell instead of around

14 years agoMerge branch 'ch/filter-branch-deprecate-remap-to-ancestor'
Junio C Hamano [Wed, 15 Sep 2010 19:39:32 +0000 (12:39 -0700)]
Merge branch 'ch/filter-branch-deprecate-remap-to-ancestor'

* ch/filter-branch-deprecate-remap-to-ancestor:
  filter-branch: retire --remap-to-ancestor

14 years agoMerge branch 'ch/maint-cannot-create-bundle-error'
Junio C Hamano [Wed, 15 Sep 2010 19:39:22 +0000 (12:39 -0700)]
Merge branch 'ch/maint-cannot-create-bundle-error'

* ch/maint-cannot-create-bundle-error:
  bundle: detect if bundle file cannot be created

14 years agoMerge branch 'ks/recursive-rename-add-identical'
Junio C Hamano [Wed, 15 Sep 2010 19:39:12 +0000 (12:39 -0700)]
Merge branch 'ks/recursive-rename-add-identical'

* ks/recursive-rename-add-identical:
  RE: [PATCH] Avoid rename/add conflict when contents are identical

14 years agoMerge git://repo.or.cz/git-gui
Junio C Hamano [Wed, 15 Sep 2010 19:34:37 +0000 (12:34 -0700)]
Merge git://repo.or.cz/git-gui

* 'master' of git://repo.or.cz/git-gui:
  git-gui 0.13
  git-gui: avoid mis-encoding the copyright message on Windows.
  git-gui: Update Swedish translation (521t).
  git-gui: ensure correct application termination in git-gui--askpass
  git-gui: handle textconv filter on Windows and in development
  git-gui: use shell to launch textconv filter in "blame"
  git-gui: display error launching blame as a message box.
  git-gui: Make usage statement visible on Windows.

14 years agogit-gui 0.13 gitgui-0.13.0
Pat Thoyts [Tue, 14 Sep 2010 21:42:37 +0000 (22:42 +0100)]
git-gui 0.13

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
14 years agogit-gui: avoid mis-encoding the copyright message on Windows.
Pat Thoyts [Mon, 13 Sep 2010 19:41:42 +0000 (20:41 +0100)]
git-gui: avoid mis-encoding the copyright message on Windows.

On Windows the tcl script file will use the system encoding and attempting
to convert the copyright mis-encodes the string. Instead, keep the message
as ASCII and substitute in the correct unicode character when running.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
14 years agogit-gui: Update Swedish translation (521t).
Peter Krefting [Sun, 12 Sep 2010 20:13:29 +0000 (21:13 +0100)]
git-gui: Update Swedish translation (521t).

Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
14 years agot7003: Use test_commit instead of custom function
Brian Gernhardt [Fri, 10 Sep 2010 22:06:36 +0000 (18:06 -0400)]
t7003: Use test_commit instead of custom function

t7003-filter-branch.sh had a make_commit() function that was identical
to test_commit() in test-lib.sh except that it used tr to create a
lowercase file name from the uppercase branch name instead of
appending ".t".

Not only is this unneeded code duplication, it also was something
simply waiting to fail on case-insensitive file systems.  So replace
all uses of make_commit with test_commit.

While we're editing the setup, chain it together with && so that
failures early in the sequence don't get lost and add a commit graph.

Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge branch 'maint'
Junio C Hamano [Sun, 12 Sep 2010 20:53:03 +0000 (13:53 -0700)]
Merge branch 'maint'

* maint:
  t3101: modernise style
  compat/nedmalloc: don't force NDEBUG on the rest of git

Conflicts:
Makefile

14 years agols-tree $di $dir: do not mistakenly recurse into directories
Junio C Hamano [Sat, 11 Sep 2010 18:47:09 +0000 (11:47 -0700)]
ls-tree $di $dir: do not mistakenly recurse into directories

When applying two pathspecs, one of which is named as a prefix to the
other, we mistakenly recursed into the shorter one.

Noticed and fixed by David Reis.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agot3101: modernise style
Junio C Hamano [Sat, 11 Sep 2010 17:53:29 +0000 (10:53 -0700)]
t3101: modernise style

Also add a few " &&" cascade that were missing.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agovcs-svn: Fix some printf format compiler warnings
Ramsay Jones [Thu, 9 Sep 2010 17:24:06 +0000 (18:24 +0100)]
vcs-svn: Fix some printf format compiler warnings

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

      CC vcs-svn/fast_export.o
  vcs-svn/fast_export.c: In function `fast_export_modify':
  vcs-svn/fast_export.c:28: warning: unsigned int format, uint32_t arg (arg 2)
  vcs-svn/fast_export.c:28: warning: int format, uint32_t arg (arg 3)
  vcs-svn/fast_export.c: In function `fast_export_commit':
  vcs-svn/fast_export.c:42: warning: int format, uint32_t arg (arg 5)
  vcs-svn/fast_export.c:62: warning: int format, uint32_t arg (arg 2)
  vcs-svn/fast_export.c: In function `fast_export_blob':
  vcs-svn/fast_export.c:72: warning: int format, uint32_t arg (arg 2)
  vcs-svn/fast_export.c:72: warning: int format, uint32_t arg (arg 3)
      CC vcs-svn/svndump.o
  vcs-svn/svndump.c: In function `svndump_read':
  vcs-svn/svndump.c:260: warning: int format, uint32_t arg (arg 3)

In order to suppress the warnings we use the C99 format specifier
macros PRIo32 and 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>
14 years agocompat/nedmalloc: don't force NDEBUG on the rest of git
René Scharfe [Sat, 11 Sep 2010 09:59:18 +0000 (11:59 +0200)]
compat/nedmalloc: don't force NDEBUG on the rest of git

Define the nedmalloc feature configuration macros for nedmalloc.o, only.
This keeps assert(3) working for the rest of the git source; it was
turned off for nedmalloc users before by defining NDEBUG globally.

Also remove -DUSE_NED_ALLOCATOR as this macro isn't used anywhere.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoGit 1.7.3 rc1 v1.7.3-rc1
Junio C Hamano [Fri, 10 Sep 2010 18:55:55 +0000 (11:55 -0700)]
Git 1.7.3 rc1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge branch 'np/relnotes-in-subdir'
Junio C Hamano [Fri, 10 Sep 2010 18:54:58 +0000 (11:54 -0700)]
Merge branch 'np/relnotes-in-subdir'

* np/relnotes-in-subdir:
  install-webdoc: keep installed RelNotes-*.txt
  Documentation: move RelNotes into a directory of their own

14 years agoPrepare for 1.7.3 rc1
Junio C Hamano [Fri, 10 Sep 2010 18:54:34 +0000 (11:54 -0700)]
Prepare for 1.7.3 rc1

14 years agoMerge branch 'maint'
Junio C Hamano [Fri, 10 Sep 2010 16:39:08 +0000 (09:39 -0700)]
Merge branch 'maint'

* maint:
  config.txt: fix placement of diff.noprefix

14 years agoconfig.txt: fix placement of diff.noprefix
Mark Lodato [Fri, 10 Sep 2010 01:39:37 +0000 (21:39 -0400)]
config.txt: fix placement of diff.noprefix

In git-config(1), diff.noprefix was placed in between
diff.mnemonicprefix and the list of mnemonic prefixes, which is
obviously incorrect and very confusing to readers.  Now, it is located
after the end of the explanation of mnemonicprefix, which makes much
more sense.

Signed-off-by: Mark Lodato <lodatom@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agot/t4018: avoid two unnecessary sub-shell invocations
Brandon Casey [Fri, 10 Sep 2010 16:13:38 +0000 (11:13 -0500)]
t/t4018: avoid two unnecessary sub-shell invocations

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge branch 'maint'
Junio C Hamano [Fri, 10 Sep 2010 00:29:40 +0000 (17:29 -0700)]
Merge branch 'maint'

* maint:
  xdiff-interface.c: always trim trailing space from xfuncname matches
  diff.c: call regfree to free memory allocated by regcomp when necessary

14 years agot/t4018: test whether the word_regex patterns compile
Brandon Casey [Thu, 9 Sep 2010 19:02:47 +0000 (14:02 -0500)]
t/t4018: test whether the word_regex patterns compile

Previously (e3bf5e43), a test was added to test whether the builtin
xfuncname regular expressions could be compiled without error by regcomp.
Let's do the same for the word_regex patterns.  This should help catch any
cross-platform incompatibilities that exist between the pattern creator's
system and the various platforms that the test suite is commonly run on.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoxdiff-interface.c: always trim trailing space from xfuncname matches
Brandon Casey [Thu, 9 Sep 2010 19:02:46 +0000 (14:02 -0500)]
xdiff-interface.c: always trim trailing space from xfuncname matches

Generally, trailing space is removed from the string matched by the
xfuncname patterns.  The exception is when the matched string exceeds the
length of the fixed-size buffer that it will be copied in to.  But, a
string that exceeds the buffer can still contain trailing space in the
portion of the string that will be copied into the buffer.  So, simplify
this code slightly, and just perform the trailing space removal always.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agodiff.c: call regfree to free memory allocated by regcomp when necessary
Brandon Casey [Thu, 9 Sep 2010 19:02:45 +0000 (14:02 -0500)]
diff.c: call regfree to free memory allocated by regcomp when necessary

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agot/t5510-fetch.sh: improve testing with explicit URL and merge spec
Brandon Casey [Thu, 9 Sep 2010 18:56:37 +0000 (13:56 -0500)]
t/t5510-fetch.sh: improve testing with explicit URL and merge spec

Commit 6106ce46 introduced a test to demonstrate fetch's failure to
retrieve any objects or update FETCH_HEAD when it was supplied a repository
URL and the current branch had a configured merge spec.  This commit
expands the original test based on comments from Junio Hamano.  In addition
to actually verifying that the fetch updates FETCH_HEAD correctly, and does
not update the current branch, two more tests are added to ensure that the
merge configuration is ignored even when the supplied URL matches the URL
of the remote configured for the branch.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agobuiltin/fetch.c: comment that branch->remote_name is usable when has_merge
Brandon Casey [Thu, 9 Sep 2010 18:56:36 +0000 (13:56 -0500)]
builtin/fetch.c: comment that branch->remote_name is usable when has_merge

Save future readers the trouble of tracing code to determine that the two
uses of branch->remote_name are safe when has_merge is set, by adding a
comment explaining that it is so.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMakefile: use compat regex on IRIX 6.5
Brandon Casey [Thu, 9 Sep 2010 19:15:58 +0000 (14:15 -0500)]
Makefile: use compat regex on IRIX 6.5

The IRIX 6.5 regex.h header file defines REG_STARTEND, but the feature does
not appear to work.  Since REG_STARTEND is required for proper functioning
of git-grep, set NO_REGEX and use the alternative regex libraries in compat/

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agot/t7008: workaround broken handling of \000 by printf on IRIX
Brandon Casey [Thu, 9 Sep 2010 19:15:57 +0000 (14:15 -0500)]
t/t7008: workaround broken handling of \000 by printf on IRIX

On IRIX 6.5, the printf utility in /usr/bin does not appear to handle the
\ddd notation according to POSIX.  This printf appears to halt processing
of the string argument and ignore any additional characters in the string.
Work around this flaw by replacing the \000's with 'Q' and using the
q_to_nul helper function provided by test-lib.sh

This problem with printf is not apparent when using the Bash shell since
Bash implements a POSIX compatible printf function internally.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoAdd --src/dst-prefix to git-formt-patch in git-rebase.sh
Oded Shimon [Thu, 9 Sep 2010 18:49:51 +0000 (21:49 +0300)]
Add --src/dst-prefix to git-formt-patch in git-rebase.sh

For the case of "diff.noprefix" in git-config, git-format-patch should
still output diff with standard prefixes for git-am

Signed-off-by: Oded Shimon <ods15@ods15.dyndns.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agomerge-recursive: D/F conflicts where was_a_dir/file -> was_a_dir
Elijah Newren [Wed, 8 Sep 2010 06:40:41 +0000 (00:40 -0600)]
merge-recursive: D/F conflicts where was_a_dir/file -> was_a_dir

In merge-recursive.c, whenever there was a rename where a file name on one
side of the rename matches a directory name on the other side of the merge,
then the very first check that

  string_list_has_string(&o->current_directory_set, ren1_dst)

would trigger forcing it into marking it as a rename/directory conflict.

However, if the path is only renamed on one side and a simple three-way
merge between the separate files resolves cleanly, then we don't need to
mark it as a rename/directory conflict.  So, we can simply move the check
for rename/directory conflicts after we've verified that there isn't a
rename/rename conflict and that a threeway content merge doesn't work.

This changes the particular error message one gets in the case where the
directory name that a file on one side of the rename matches is not also
part of the rename pair.  For example, with commits containing the files:

  COMMON    -> (HEAD,           MERGE )
  ---------    ---------------  -------
  sub/file1 -> (sub/file1,      newsub)
  <NULL>    -> (newsub/newfile, <NULL>)

then previously when one tried to merge MERGE into HEAD, one would get

  CONFLICT (rename/directory): Rename sub/file1->newsub in HEAD directory newsub added in merge
  Renaming sub/file1 to newsub~HEAD instead
  Adding newsub/newfile
  Automatic merge failed; fix conflicts and then commit the result.
After this patch, the error message will instead become:
  Removing newsub
  Adding newsub/newfile
  CONFLICT (file/directory): There is a directory with name newsub in merge. Adding newsub as newsub~HEAD
  Automatic merge failed; fix conflicts and then commit the result.

That makes more sense to me, because git can't know that there's a conflict
until after it's tried resolving paths involving newsub/newfile to see if
they are still in the way at the end (and if newsub/newfile is not in the
way at the end, there should be no conflict at all, which did not hold with
git previously).

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agot3509: Add rename + D/F conflict testcase that recursive strategy fails
Elijah Newren [Wed, 8 Sep 2010 06:40:40 +0000 (00:40 -0600)]
t3509: Add rename + D/F conflict testcase that recursive strategy fails

When one side of a file rename matches a directory name on the other side,
the recursive merge strategy will fail.  This is true even if the merge is
trivially resolvable.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoinstall-webdoc: keep installed RelNotes-*.txt
Junio C Hamano [Thu, 9 Sep 2010 23:17:59 +0000 (16:17 -0700)]
install-webdoc: keep installed RelNotes-*.txt

Otherwise URLs in the wild that point at older release notes will become
dangling.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agot1020: Get rid of 'cd "$HERE"' at the start of each test
Jens Lehmann [Tue, 7 Sep 2010 10:29:20 +0000 (12:29 +0200)]
t1020: Get rid of 'cd "$HERE"' at the start of each test

To achieve that, all cd commands which weren't inside a subshell had to
be put into a new one.

Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agot2016 (checkout -p): add missing &&
Jonathan Nieder [Tue, 7 Sep 2010 08:22:53 +0000 (03:22 -0500)]
t2016 (checkout -p): add missing &&

Although the set_state command is not likely to fail, it is best to
stay in the habit of checking for failures.

Cc: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agot1302 (core.repositoryversion): style tweaks
Jonathan Nieder [Tue, 7 Sep 2010 01:52:27 +0000 (20:52 -0500)]
t1302 (core.repositoryversion): style tweaks

This test is from 2007, which is late enough for the style to be
recognizably modern but still a while ago.  Freshen it up to
follow new best practices:

 - guard setup commands with test_expect_setup, so errors at
   that stage can be caught;
 - use <<\EOF in preference to <<EOF, to save reviewers the
   trouble of looking for variable interpolations;
 - use test_cmp instead of test "$foo" = "$bar", for better
   output with -v on failure;
 - indent commands in subshells and let them span multiple lines;
 - combine the two "gitdir required mode" tests that do not make
   as much sense alone.

Cc: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agot2105 (gitfile): add missing &&
Jonathan Nieder [Tue, 7 Sep 2010 01:49:10 +0000 (20:49 -0500)]
t2105 (gitfile): add missing &&

Make sure early failures are not masked by later successes.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Brad King <brad.king@kitware.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agot1450 (fsck): remove dangling objects
Jonathan Nieder [Tue, 7 Sep 2010 01:47:07 +0000 (20:47 -0500)]
t1450 (fsck): remove dangling objects

The fsck test is generally careful to remove the corrupt objects
it inserts, but dangling objects are left behind due to some typos
and omissions.  It is better to clean up more completely, to
simplify the addition of later tests.  So:

 - guard setup and cleanup with test_expect_success to catch
   typos and errors;
 - check both stdout and stderr when checking for empty fsck
   output;
 - use test_cmp empty file in place of test $(wc -l <file) = 0,
   for better debugging output when running tests with -v;
 - add a remove_object () helper and use it to replace broken
   object removal code that forgot about the fanout in
   .git/objects;
 - disable gc.auto, to avoid tripping up object removal if the
   number of objects ever reaches that threshold.
 - use test_when_finished to ensure cleanup tasks are run and
   succeed when tests fail;
 - add a new final test that no breakage or dangling objects
   was left behind.

While at it, add a brief description to test_description of the
history that is expected to persist between tests.

Part of a campaign to clean up subshell usage in tests.

Cc: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agotests: subshell indentation stylefix
Jonathan Nieder [Tue, 7 Sep 2010 01:42:54 +0000 (20:42 -0500)]
tests: subshell indentation stylefix

Format the subshells introduced by the previous patch (Several tests:
cd inside subshell instead of around, 2010-09-06) like so:

(
cd subdir &&
...
) &&

This is generally easier to read and has the nice side-effect that
this patch will show what commands are used in the subshell, making
it easier to check for lost environment variables and similar
behavior changes.

Cc: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge branch 'tf/cleanup-builtin-help-headers'
Junio C Hamano [Wed, 8 Sep 2010 16:17:01 +0000 (09:17 -0700)]
Merge branch 'tf/cleanup-builtin-help-headers'

* tf/cleanup-builtin-help-headers:
  builtin.h: Move two functions definitions to help.h.

14 years agoMerge branch 'jk/test-must-fail-missing'
Junio C Hamano [Wed, 8 Sep 2010 16:17:01 +0000 (09:17 -0700)]
Merge branch 'jk/test-must-fail-missing'

* jk/test-must-fail-missing:
  tests: make test_might_fail fail on missing commands
  tests: make test_might_fail more verbose
  tests: make test_must_fail fail on missing commands
  tests: make test_must_fail more verbose

14 years agoMerge branch 'jh/error-removing-missing-note'
Junio C Hamano [Wed, 8 Sep 2010 16:17:01 +0000 (09:17 -0700)]
Merge branch 'jh/error-removing-missing-note'

* jh/error-removing-missing-note:
  notes: Don't create (empty) commit when removing non-existing notes

14 years agoMerge branch 'kf/askpass-config'
Junio C Hamano [Wed, 8 Sep 2010 16:17:01 +0000 (09:17 -0700)]
Merge branch 'kf/askpass-config'

* kf/askpass-config:
  Extend documentation of core.askpass and GIT_ASKPASS.
  Allow core.askpass to override SSH_ASKPASS.
  Add a new option 'core.askpass'.

14 years agoMerge branch 'bc/maint-fetch-url-only'
Junio C Hamano [Wed, 8 Sep 2010 16:17:00 +0000 (09:17 -0700)]
Merge branch 'bc/maint-fetch-url-only'

* bc/maint-fetch-url-only:
  builtin/fetch.c: ignore merge config when not fetching from branch's remote
  t/t5510: demonstrate failure to fetch when current branch has merge ref

14 years agoMerge branch 'jk/maint-pass-c-config-in-env'
Junio C Hamano [Wed, 8 Sep 2010 16:17:00 +0000 (09:17 -0700)]
Merge branch 'jk/maint-pass-c-config-in-env'

* jk/maint-pass-c-config-in-env:
  do not pass "git -c foo=bar" params to transport helpers
  pass "git -c foo=bar" params through environment

14 years agoMerge branch 'en/d-f-conflict-fix'
Junio C Hamano [Wed, 8 Sep 2010 15:54:01 +0000 (08:54 -0700)]
Merge branch 'en/d-f-conflict-fix'

* en/d-f-conflict-fix:
  fast-export: ensure that a renamed file is printed after all references

14 years agofast-export: ensure that a renamed file is printed after all references
Johannes Sixt [Tue, 7 Sep 2010 19:33:02 +0000 (21:33 +0200)]
fast-export: ensure that a renamed file is printed after all references

t9350 sets up a commit where a file is both copied and renamed. The output
of fast-export for this commit should look like this:

  author ...
  committer ...
  from :19
  C "file2" "file4"
  R "file2" "file5"

The order of the two modification lines is derived from the result that
the diff machinery produces.

060df62 (fast-export: Fix output order of D/F changes) inserted a qsort
call that modifies the order of the diff result. Unfortunately, qsort need
not be stable. Therefore, it is possible that the 'R' line appears before
the 'C' line and the resulting fast-import stream is incorrect.

Fix it by forcing that the rename entry is printed after all other
modification lines with the same file name.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoDocumentation: move RelNotes into a directory of their own
Nicolas Pitre [Tue, 7 Sep 2010 00:29:57 +0000 (20:29 -0400)]
Documentation: move RelNotes into a directory of their own

There are 108 of them already.  That's a bit more than one third of
all the files in the Documentation directory already, and still growing.

Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge branch 'maint'
Junio C Hamano [Tue, 7 Sep 2010 00:40:18 +0000 (17:40 -0700)]
Merge branch 'maint'

* maint:
  revert: Fix trivial comment style issue
  cache_tree_free: Fix small memory leak

Conflicts:
builtin/revert.c

14 years agorevert: Fix trivial comment style issue
Elijah Newren [Mon, 6 Sep 2010 21:53:24 +0000 (15:53 -0600)]
revert: Fix trivial comment style issue

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agocache_tree_free: Fix small memory leak
Elijah Newren [Mon, 6 Sep 2010 21:40:16 +0000 (15:40 -0600)]
cache_tree_free: Fix small memory leak

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge branch 'jh/clean-exclude'
Junio C Hamano [Mon, 6 Sep 2010 23:57:05 +0000 (16:57 -0700)]
Merge branch 'jh/clean-exclude'

* jh/clean-exclude:
  builtin/clean.c: Use STRING_LIST_INIT_NODUP.

14 years agobuiltin/clean.c: Use STRING_LIST_INIT_NODUP.
Thiago Farina [Mon, 6 Sep 2010 23:32:55 +0000 (20:32 -0300)]
builtin/clean.c: Use STRING_LIST_INIT_NODUP.

Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>