1
0
mirror of https://github.com/git/git.git synced 2024-10-19 16:28:32 +02:00
Commit Graph

25430 Commits

Author SHA1 Message Date
Junio C Hamano
e31b018372 Merge branch 'aw/maint-rebase-i-p-no-ff' into maint
* aw/maint-rebase-i-p-no-ff:
  git-rebase--interactive.sh: preserve-merges fails on merges created with no-ff
2011-05-13 10:45:21 -07:00
Junio C Hamano
bc67ad8c37 Merge branch 'js/blame-parsename' into maint
* js/blame-parsename:
  t/annotate-tests: Use echo & cat instead of sed
  blame: tolerate bogus e-mail addresses a bit better
2011-05-13 10:45:00 -07:00
Junio C Hamano
978471dcce Merge branch 'gr/cvsimport-alternative-cvspass-location' into maint
* gr/cvsimport-alternative-cvspass-location:
  Look for password in both CVS and CVSNT password files.
2011-05-13 10:44:54 -07:00
Junio C Hamano
e82c74618b Merge branch 'cj/p4merge' into maint
* cj/p4merge:
  Pass empty file to p4merge where no base is suitable.
2011-05-13 10:44:46 -07:00
Junio C Hamano
8272bcabac Merge branch 'jk/merge-one-file-working-tree' into maint
* jk/merge-one-file-working-tree:
  merge-one-file: fix broken merges with alternate work trees
  add tests for merge-index / merge-one-file
2011-05-13 10:44:19 -07:00
Junio C Hamano
a613b534bc Merge branch 'jc/fix-diff-files-unmerged' into maint
* jc/fix-diff-files-unmerged:
  diff-files: show unmerged entries correctly
  diff: remove often unused parameters from diff_unmerge()
  diff.c: return filepair from diff_unmerge()
  test: use $_z40 from test-lib
2011-05-13 10:41:54 -07:00
Junio C Hamano
4bdbfb15b2 Merge branch 'mz/maint-rename-unmerged' into maint
* mz/maint-rename-unmerged:
  diffcore-rename: don't consider unmerged path as source
2011-05-13 10:41:24 -07:00
Johan Herland
ebe8621fd7 t5400: Fix a couple of typos
Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-13 09:57:16 -07:00
Junio C Hamano
240fe0505f Merge branch 'nd/struct-pathspec'
* nd/struct-pathspec:
  Tweak t3102-ls-tree-wildcards to run on Windows
2011-05-12 22:36:41 -07:00
Johannes Sixt
145f86a009 Tweak t3102-ls-tree-wildcards to run on Windows
The test case fails on Windows, because "a*" is an invalid file name.
Therefore, use "a[a]" instead.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Acked-by: Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-12 22:35:47 -07:00
Junio C Hamano
dbe9c5adf9 Update draft release notes to 1.7.6
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-11 11:56:11 -07:00
Junio C Hamano
a5794988dd Merge branch 'jn/gitweb-dependency'
* jn/gitweb-dependency:
  Remove gitweb/gitweb.cgi and other legacy targets from main Makefile
  git-instaweb: Simplify build dependency on gitweb
2011-05-11 11:38:39 -07:00
Junio C Hamano
c7fe5b61e1 Merge branch 'jc/maint-branch-mergeoptions'
* jc/maint-branch-mergeoptions:
  merge: make branch.<name>.mergeoptions correctly override merge.<option>

Conflicts:
	builtin/merge.c
2011-05-11 11:38:36 -07:00
Junio C Hamano
bd9a268845 Merge branch 'jn/maint-test-merge-verify-parents'
* jn/maint-test-merge-verify-parents:
  tests: teach verify_parents to check for extra parents
  tests: eliminate unnecessary setup test assertions
2011-05-11 11:38:10 -07:00
Junio C Hamano
0c529e44d3 Merge branch 'vh/config-interactive-singlekey-doc'
* vh/config-interactive-singlekey-doc:
  git-reset.txt: better docs for '--patch'
  git-checkout.txt: better docs for '--patch'
  git-stash.txt: better docs for '--patch'
  git-add.txt: document 'interactive.singlekey'
  config.txt: 'interactive.singlekey; is used by...
2011-05-11 11:38:06 -07:00
Junio C Hamano
f3b173daf4 Merge branch 'jc/maint-add-p-overlapping-hunks'
* jc/maint-add-p-overlapping-hunks:
  t3701: add-p-fix makes the last test to pass
  "add -p": work-around an old laziness that does not coalesce hunks
  add--interactive.perl: factor out repeated --recount option
  t3701: Editing a split hunk in an "add -p" session
  add -p: 'q' should really quit
2011-05-11 11:37:46 -07:00
Junio C Hamano
9cd805de61 Merge branch 'sr/maint-fast-import-tighten-option-parsing'
* sr/maint-fast-import-tighten-option-parsing:
  fast-import: fix option parser for no-arg options
2011-05-11 11:37:41 -07:00
Junio C Hamano
1f0f5b54ba Merge branch 'dm/http-cleanup'
* dm/http-cleanup:
  t5541-http-push: add test for chunked
  http-push: refactor curl_easy_setup madness
  http-push: use const for strings in signatures
  http: make curl callbacks match contracts from curl header
2011-05-11 11:37:38 -07:00
Junio C Hamano
ebfd72c856 Merge branch 'jn/ctags'
* jn/ctags:
  gitweb: Mark matched 'ctag' / contents tag (?by_tag=foo)
  gitweb: Change the way "content tags" ('ctags') are handled
  gitweb: Restructure projects list generation
2011-05-11 11:37:32 -07:00
Boris Faure
8b1ae678a3 Do not strip empty lines / trailing spaces from a commit message template
Templates should be just that: A form that the user fills out, and forms
have blanks. If people are attached to not having extra whitespace in the
editor, they can simply clean up their templates.

Added test with editor adding even more whitespace.

Signed-off-by: Boris Faure <billiob@gmail.com>
Based-on-patch-by:Sebastian Schuberth <sschuberth@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-11 11:20:28 -07:00
Junio C Hamano
3bfba20dae convert: make it harder to screw up adding a conversion attribute
The current internal API requires the callers of setup_convert_check() to
supply the git_attr_check structures (hence they need to know how many to
allocate), but they grab the same set of attributes for given path.

Define a new convert_attrs() API that fills a higher level information that
the callers (convert_to_git and convert_to_working_tree) really want, and
move the common code to interact with the attributes system to it.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-09 14:59:09 -07:00
Junio C Hamano
83295964b3 convert: make it safer to add conversion attributes
The places that need to pass an array of "struct git_attr_check" needed to
be careful to pass a large enough array and know what index each element
lied.  Make it safer and easier to code these.

Besides, the hard-coded sequence of initializing various attributes was
too ugly after we gained more than a few attributes.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-09 14:59:09 -07:00
Junio C Hamano
c61dcff9d6 convert: give saner names to crlf/eol variables, types and functions
Back when the conversion was only about the end-of-line convention, it
might have made sense to call what we do upon seeing CR/LF simply an
"action", but these days the conversion routines do a lot more than just
tweaking the line ending.  Raname "action" to "crlf_action".

The function that decides what end of line conversion to use on the output
codepath was called "determine_output_conversion", as if there is no other
kind of output conversion.  Rename it to "output_eol"; it is a function
that returns what EOL convention is to be used.

A function that decides what "crlf_action" needs to be used on the input
codepath, given what conversion attribute is set to the path and global
end-of-line convention, was called "determine_action".  Rename it to
"input_crlf_action".

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-09 14:59:09 -07:00
Junio C Hamano
ec70f52f6f convert: rename the "eol" global variable to "core_eol"
Yes, it is clear that "eol" wants to mean some sort of end-of-line thing,
but as the name of a global variable, it is way too short to describe what
kind of end-of-line thing it wants to represent. Besides, there are many
codepaths that want to use their own local "char *eol" variable to point
at the end of the current line they are processing.

This global variable holds what we read from core.eol configuration
variable. Name it as such.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-09 14:58:52 -07:00
Junio C Hamano
7b41e1e15b index_fd(): split into two helper functions
Split out the case where we do not know the size of the input (hence we
read everything into a strbuf before doing anything) to index_pipe(), and
the other case where we mmap or read the whole data to index_bulk().

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-09 11:58:19 -07:00
Junio C Hamano
c4ce46fc7a index_fd(): turn write_object and format_check arguments into one flag
The "format_check" parameter tucked after the existing parameters is too
ugly an afterthought to live in any reasonable API.

Combine it with the other boolean parameter "write_object" into a single
"flags" parameter.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-09 11:58:19 -07:00
Junio C Hamano
365c2aaafc t1507: avoid "${parameter<op>'word'}" inside double-quotes
Kacper Kornet noticed that a $variable in "word" in the above construct is
not substituted by his pdksh.  Modern POSIX compliant shells (e.g. dash,
ksh, bash) all seem to interpret POSIX "2.6.2 Parameter Expansion" that
says "word shall be subjected to tilde expansion, parameter expansion,
command substitution, and arithmetic expansion" in ${parameter<op>word},
to mean that the word is expanded as if it appeared in dq pairs, so if the
word were "'$variable'" (sans dq) it would expand to a single quote, the
value of the $variable and then a single quote.

Johannes Sixt reports that the behavior of quoting at the right of :- when
the ${...:-...} expansion appears in double-quotes was debated recently at
length at the Austin group.  We can avoid this issue and future-proof the
test by a slight rewrite.

Helped-by: Johannes Sixt <j.sixt@viscovery.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-09 09:19:42 -07:00
Junio C Hamano
0bf9fc0cd2 t3701: add-p-fix makes the last test to pass
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-08 13:43:04 -07:00
Junio C Hamano
0f891e7d7e rerere: libify rerere_clear() and rerere_gc()
This moves the two features from builtin/rerere.c to a more library-ish
portion of the codebase.  No behaviour change.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-08 12:55:34 -07:00
Jakub Narebski
f09f1d35b5 Remove gitweb/gitweb.cgi and other legacy targets from main Makefile
Now that there is gitweb/Makefile, let's leave only "gitweb" and
"install-gitweb" targets in main Makefile.  Those targets just
delegate to gitweb's Makefile.

Requested-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-08 11:52:57 -07:00
Jakub Narebski
ff2e2cd584 git-instaweb: Simplify build dependency on gitweb
Since c0cb4ed (git-instaweb: Configure it to work with new gitweb
structure, 2010-05-28) git-instaweb does not re-create gitweb.cgi
etc., but makes use of installed gitweb.  Therefore simplify
git-instaweb dependency on gitweb subsystem in main Makefile from
'gitweb/gitweb.cgi gitweb/static/gitweb.css gitweb/static/gitweb.js'
to simply 'gitweb'.

This is preparation for splitting gitweb.perl script, and for
splitting gitweb.js (to be reassembled / combined on build).  This way
we don't have to duplicate parts of gitweb/Makefile in main
Makefile... it is also more correct description of git-instaweb
dependency.

Reported-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-08 11:52:05 -07:00
Jonathan Nieder
3fc0dbf00b tests: teach verify_parents to check for extra parents
Currently verify_parents only makes sure that the earlier parents of
HEAD match the commits given, and does not care if there are more
parents.  This makes it harder than one would like to check that, for
example, parent reduction works correctly when making an octopus.

Fix it by checking that HEAD^(n+1) is not a valid commit name.
Noticed while working on a new test that was supposed to create a
fast-forward one commit ahead but actually created a merge.

Reported-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-06 15:29:01 -07:00
Junio C Hamano
0d8fc3efc6 merge: make branch.<name>.mergeoptions correctly override merge.<option>
The parsing of the additional command line parameters supplied to
the branch.<name>.mergeoptions configuration variable was implemented
at the wrong stage.  If any merge-related variable came after we read
branch.<name>.mergeoptions, the earlier value was overwritten.

We should first read all the merge.* configuration, override them by
reading from branch.<name>.mergeoptions and then finally read from
the command line.

This patch should fix it, even though I now strongly suspect that
branch.<name>.mergeoptions that gives a single command line that
needs to be parsed was likely to be an ill-conceived idea to begin
with.  Sigh...

Helped-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-06 15:01:56 -07:00
Jonathan Nieder
73151df0cf tests: eliminate unnecessary setup test assertions
Most of git's tests write files and define shell functions and
variables that will last throughout a test script at the top of
the script, before all test assertions:

	. ./test-lib.sh

	VAR='some value'
	export VAR

	>empty

	fn () {
		do something
	}

	test_expect_success 'setup' '
		... nontrivial commands go here ...
	'

Two scripts use a different style with this kind of trivial code
enclosed by a test assertion; fix them.  The usual style is easier to
read since there is less indentation to keep track of and no need to
worry about nested quotes; and on the other hand, because the commands
in question are trivial, it should not make the test suite any worse
at catching future bugs in git.

While at it, make some other small tweaks:

 - spell function definitions with a space before () for consistency
   with other scripts;

 - use the self-contained command "git mktree </dev/null" in
   preference to "git write-tree" which looks at the index when
   writing an empty tree.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-06 14:42:06 -07:00
Junio C Hamano
4e3aa87d13 Update draft release notes to 1.7.6
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-06 11:13:08 -07:00
Junio C Hamano
3970fc5512 Merge branch 'jn/run-command-error-failure'
* jn/run-command-error-failure:
  run-command: handle short writes and EINTR in die_child
  tests: check error message from run_command
2011-05-06 11:01:04 -07:00
Junio C Hamano
606ee4be54 Merge branch 'js/info-man-path'
* js/info-man-path:
  Documentation: clarify meaning of --html-path, --man-path, and --info-path
  git: add --info-path and --man-path options

Conflicts:
	Makefile
2011-05-06 11:00:46 -07:00
Junio C Hamano
efa67bfd16 Merge branch 'im/hashcmp-optim'
* im/hashcmp-optim:
  hashcmp(): inline memcmp() by hand to optimize
2011-05-06 11:00:36 -07:00
Junio C Hamano
ac13e7c514 Merge branch 'jk/merge-one-file-working-tree'
* jk/merge-one-file-working-tree:
  merge-one-file: fix broken merges with alternate work trees
  add tests for merge-index / merge-one-file
2011-05-06 10:54:08 -07:00
Junio C Hamano
22dbeee715 Merge branch 'jc/fix-diff-files-unmerged'
* jc/fix-diff-files-unmerged:
  diff-files: show unmerged entries correctly
  diff: remove often unused parameters from diff_unmerge()
  diff.c: return filepair from diff_unmerge()
  test: use $_z40 from test-lib
2011-05-06 10:52:58 -07:00
Junio C Hamano
6c252ef79e Merge branch 'cj/p4merge'
* cj/p4merge:
  Pass empty file to p4merge where no base is suitable.
2011-05-06 10:52:16 -07:00
Junio C Hamano
2da61dcf9e Merge branch 'gr/cvsimport-alternative-cvspass-location'
* gr/cvsimport-alternative-cvspass-location:
  Look for password in both CVS and CVSNT password files.
2011-05-06 10:52:12 -07:00
Junio C Hamano
6975ecadd7 Merge branch 'sg/completion-cleanup'
* sg/completion-cleanup:
  completion: remove unnecessary _get_comp_words_by_ref() invocations
  completion: don't modify the $cur variable in completion functions
2011-05-06 10:52:03 -07:00
Junio C Hamano
2190a43c42 Merge branch 'js/blame-parsename'
* js/blame-parsename:
  t/annotate-tests: Use echo & cat instead of sed
  blame: tolerate bogus e-mail addresses a bit better
2011-05-06 10:50:32 -07:00
Junio C Hamano
ace8ebbcf5 Merge branch 'jk/format-patch-quote-special-in-from'
* jk/format-patch-quote-special-in-from:
  pretty: quote rfc822 specials in email addresses

Conflicts:
	pretty.c
	t/t4014-format-patch.sh
2011-05-06 10:50:18 -07:00
Junio C Hamano
1273738f05 Merge branch 'nd/struct-pathspec'
* nd/struct-pathspec:
  pathspec: rename per-item field has_wildcard to use_wildcard
  Improve tree_entry_interesting() handling code
  Convert read_tree{,_recursive} to support struct pathspec
  Reimplement read_tree_recursive() using tree_entry_interesting()
2011-05-06 10:50:06 -07:00
Junio C Hamano
9fdc1cc872 Merge branch 'aw/maint-rebase-i-p-no-ff'
* aw/maint-rebase-i-p-no-ff:
  git-rebase--interactive.sh: preserve-merges fails on merges created with no-ff

Conflicts:
	git-rebase--interactive.sh
2011-05-06 10:50:00 -07:00
Junio C Hamano
76f4f74a44 Merge branch 'mg/alias-expose-prefix'
* mg/alias-expose-prefix:
  handle_alias: provide GIT_PREFIX to !alias
  t1020: test !alias in subdirectory
2011-05-06 10:49:57 -07:00
Junio C Hamano
12b99a3598 Merge branch 'mg/diff-uiconfig-doc'
* mg/diff-uiconfig-doc:
  config.txt,diff-options.txt: porcelain vs. plumbing for color.diff
2011-05-06 10:49:53 -07:00
Junio C Hamano
ef6b43a44b Merge branch 'maint'
* maint:
  Remove duplicated "is a"
2011-05-06 10:44:23 -07:00