* jc/maint-add-sync-stat:
t2200: test more cases of "add -u"
git-add: make the entry stat-clean after re-adding the same contents
ce_match_stat, run_diff_files: use symbolic constants for readability
Conflicts:
builtin-add.c
* bg/format-patch-N:
Rearrange git-format-patch synopsis to improve clarity.
format-patch: Test --[no-]numbered and format.numbered
format-patch: Add configuration and off switch for --numbered
* maint:
git-clean: honor core.excludesfile
Documentation: Fix man page breakage with DocBook XSL v1.72
git-remote.txt: fix typo
core-tutorial.txt: Fix argument mistake in an example.
replace reference to git-rm with git-reset in git-commit doc
Grammar fixes for gitattributes documentation
Don't allow fast-import tree delta chains to exceed maximum depth
revert/cherry-pick: allow starting from dirty work tree.
t/t3404: fix test for a bogus todo file.
Conflicts:
fast-import.c
git-clean did not honor core.excludesfile configuration
variable, although some other commands such as git-add and
git-status did. Fix this inconsistency.
Original report and patch from Shun'ichi Fuji. Rewritten by me
and bugs and tests are mine.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
The --skip case was handled properly when rebasing without --merge,
but the --continue case was not.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
SVN requires that paths be URI-escaped for HTTP(S) repositories.
file:// and svn:// repositories do not need these rules.
Additionally, accessing individual paths inside repositories
(check_path() and get_log() do NOT require escapes to function
and in fact it breaks things).
Noticed-by: Michael J. Cohen <mjc@cruiseplanners.com>
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
* maint:
for-each-ref: fix off by one read.
git-branch: remove mention of non-existent '-b' option
git-svn: prevent dcommitting if the index is dirty.
Fix memory leak in traverse_commit_list
dcommit uses rebase to sync the history with what has just been pushed to
SVN. Trying to dcommit with a dirty index is troublesome for rebase, so now
the user will get an error message if he attempts to dcommit with a dirty
index.
Signed-off-by: Benoit Sigoure <tsuna@lrde.epita.fr>
Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This patch removes a spurious "command not found" error
and actually makes the "Test script did not set test_description."
string follow the command line option "--no-color".
Signed-off-by: Michele Ballabio <barra_cuda@katamail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
The option value for --sort is already a pointer to a pointer to struct
ref_sort, so just use it.
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
The interactive version of rebase does all the operations on a detached
HEAD, so that after a successful rebase, <branch>@{1} is the pre-rebase
state. The reflogs of "HEAD" still show all the actions in detail.
This teaches the non-interactive version to do the same.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
* maint:
Start preparing for 1.5.3.6
git-send-email: Change the prompt for the subject of the initial message.
SubmittingPatches: improve the 'Patch:' section of the checklist
instaweb: Minor cleanups and fixes for potential problems
stop t1400 hiding errors in tests
Makefile: add missing dependency on wt-status.h
refresh_index_quietly(): express "optional" nature of index writing better
Fix sed string regex escaping in module_name.
Avoid a few unportable, needlessly nested "...`...".
git-mailsplit: with maildirs not only process cur/, but also new/
Signed-off-by: Junio C Hamano <gitster@pobox.com>
The last rm in the test was lacking an "&&" before it,
which caused the errors in the commands be silently hidden.
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
These tests check whether git-tag properly sends a comment into the
editor, and whether it reuses previous annotation when overwriting
an existing tag.
Signed-off-by: Mike Hommey <mh@glandium.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
upload-pack spawns two processes, rev-list and pack-objects, and carefully
monitors their status so that it can report failure to the remote end.
This change removes the complicated procedures on the grounds of the
following observations:
- If everything is OK, rev-list closes its output pipe end, upon which
pack-objects (which reads from the pipe) sees EOF and terminates itself,
closing its output (and error) pipes. upload-pack reads from both until
it sees EOF in both. It collects the exit codes of the child processes
(which indicate success) and terminates successfully.
- If rev-list sees an error, it closes its output and terminates with
failure. pack-objects sees EOF in its input and terminates successfully.
Again upload-pack reads its inputs until EOF. When it now collects
the exit codes of its child processes, it notices the failure of rev-list
and signals failure to the remote end.
- If pack-objects sees an error, it terminates with failure. Since this
breaks the pipe to rev-list, rev-list is killed with SIGPIPE.
upload-pack reads its input until EOF, then collects the exit codes of
the child processes, notices their failures, and signals failure to the
remote end.
- If upload-pack itself dies unexpectedly, pack-objects is killed with
SIGPIPE, and subsequently also rev-list.
The upshot of this is that precise monitoring of child processes is not
required because both terminate if either one of them dies unexpectedly.
This allows us to use finish_command() and finish_async() instead of
an explicit waitpid(2) call.
The change is smaller than it looks because most of it only reduces the
indentation of a large part of the inner loop.
Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Instead of forking update-index, call refresh_cache() directly.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Since reset is a builtin now, it can use the full power of libgit.a
and check for unmerged entries itself.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
When an option could be an ambiguous abbreviation of two options, the code
used to error out. Even if an exact match would have occured later.
Test and original patch by Pierre Habouzit.
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
* maint:
Remove a couple of duplicated include
grep with unmerged index
git-daemon: fix remote port number in log entry
git-svn: t9114: verify merge commit message in test
git-svn: fix dcommit clobbering when committing a series of diffs
On a case insensitive file system, this test fails because git-diff
doesn't know if it is asking for the file "A" or the tag "a".
Adding "--" at the end of the ambiguous commands allows the test to
finish properly.
Signed-off-by: Brian Gernhardt <benji@silverinsanity.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
It's possible that we end up with an incorrect commit message
in this test after making changes to fix the clobber bug
in dcommit.
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Our revision number sent to SVN is set to the last revision we
committed if we've made any previous commits in a dcommit
invocation.
Although our SVN Editor code uses the delta of two (old) trees
to generate information to send upstream, it'll still send
complete resultant files upstream; even if the tree they're
based against is out-of-date.
The combination of sending a file that does not include the
latest changes, but set with a revision number of a commit we
just made will cause SVN to accept the resultant file even if it
was generated against an old tree.
More trouble was caused when fixing this because we were
rebasing uncessarily at times. We used git-diff-tree to check
the imported SVN revision against our HEAD, not the last tree we
committed to SVN. The unnecessary rebasing caused merge commits
upstream to SVN to fail.
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
sq_quote_buf() treats single-quotes and exclamation marks specially, but
it incorrectly parsed the input for single-quotes and backslashes.
Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This makes the clean.requireForce configuration default to true.
Too many people are burned by typing "git clean" by mistake when
they meant to say "make clean".
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Just because there wasn't a test for --numbered isn't a good reason
not to test format.numbered. So now we test both.
Signed-off-by: Brian Gernhardt <benji@silverinsanity.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
* jc/format-patch-encoding:
test format-patch -s: make sure MIME content type is shown as needed
format-patch -s: add MIME encoding header if signer's name requires so
* jn/gitweb:
gitweb: Use config file for repository description and URLs
gitweb: Read repo config using 'git config -z -l'
gitweb: Add tests for overriding gitweb config with repo config
gitweb: Use href(-replay=>1, action=>...) to generate alternate views
gitweb: Use href(-replay=>1, page=>...) to generate pagination links
gitweb: Easier adding/changing parameters to current URL
gitweb: Remove CGI::Carp::set_programname() call from t9500 gitweb test
gitweb: Add 'status_str' to parse_difftree_raw_line output
gitweb: Always set 'from_file' and 'to_file' in parse_difftree_raw_line
The purpose of the function update_index_from_diff() (which is the
callback function we give do_diff_cache()) is to update those index
entries which differ from the given commit.
Since do_diff_cache() plays games with the in-memory index, this function
discarded the cache and reread it.
Then, back in the function read_from_tree() we wrote the index.
Of course, this broke down when there were no changes and
update_index_from_diff() was not called, and therefore the mangled index
was not discarded.
The solution is to move the index writing into the function
update_index_from_diff().
Noticed by Björn Steinbrink.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Make blame view and snapshot support overridable by repository
config. Test tree view with both features disabled, and with both
features enabled.
Test with features enabled also tests multiple formats snapshot
support (in tree view).
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
* maint:
Fixing path quoting in git-rebase
Remove unecessary hard-coding of EDITOR=':' VISUAL=':' in some test suites.
Documentation: quote commit messages consistently.
Remove escaping of '|' in manpage option sections
* ph/parseopt: (24 commits)
gc: use parse_options
Fixed a command line option type for builtin-fsck.c
Make builtin-pack-refs.c use parse_options.
Make builtin-name-rev.c use parse_options.
Make builtin-count-objects.c use parse_options.
Make builtin-fsck.c use parse_options.
Update manpages to reflect new short and long option aliases
Make builtin-for-each-ref.c use parse-opts.
Make builtin-symbolic-ref.c use parse_options.
Make builtin-update-ref.c use parse_options
Make builtin-revert.c use parse_options.
Make builtin-describe.c use parse_options
Make builtin-branch.c use parse_options.
Make builtin-mv.c use parse-options
Make builtin-rm.c use parse_options.
Port builtin-add.c to use the new option parser.
parse-options: allow callbacks to take no arguments at all.
parse-options: Allow abbreviated options when unambiguous
Add shortcuts for very often used options.
parse-options: make some arguments optional, add callbacks.
...
Conflicts:
Makefile
builtin-add.c
They are already set and exoprted by sourcing ./test-lib.sh
in all test scripts.
Signed-off-by: Kristian Høgsberg <krh@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
It does appear to do nothing; gitweb is run as standalone program
and not as CGI script in this test. This call caused problems later.
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
* js/forkexec:
Use the asyncronous function infrastructure to run the content filter.
Avoid a dup2(2) in apply_filter() - start_command() can do it for us.
t0021-conversion.sh: Test that the clean filter really cleans content.
upload-pack: Run rev-list in an asynchronous function.
upload-pack: Move the revision walker into a separate function.
Use the asyncronous function infrastructure in builtin-fetch-pack.c.
Add infrastructure to run a function asynchronously.
upload-pack: Use start_command() to run pack-objects in create_pack_file().
Have start_command() create a pipe to read the stderr of the child.
Use start_comand() in builtin-fetch-pack.c instead of explicit fork/exec.
Use run_command() to spawn external diff programs instead of fork/exec.
Use start_command() to run content filters instead of explicit fork/exec.
Use start_command() in git_connect() instead of explicit fork/exec.
Change git_connect() to return a struct child_process instead of a pid_t.
Conflicts:
builtin-fetch-pack.c