This reverts commit 09fba7a59d.
These tests are superseded by the ones in t5404 (added in
6fa92bf3 and 8736a848), which are more extensive and better
organized.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Some users expect that deleting a remote-tracking branch would prevent
fetch from creating it again, so be explcit about that it's not the case.
Also be a little more explicit about what fully merged means.
Signed-off-by: Jan Hudec <bulb@ucw.cz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
The helper functions 'map' and 'skip_commit' were provided to commit
filters by sourcing filter-branch itself. This was done with a certain
environment variable set to indicate that only the functions should be
defined, and the script should return then.
This was really hacky, and it did not work all that well, since the
full path to git-filter-branch was not known at all times.
Avoid that by putting the functions into a variable, and eval'ing
that variable. The commit filter gets these functions by prepending
the variable to the specified commands.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
These were found with a grep for '$git_dir'; they all
replace a direct access of "$git_dir/refs/..." with a call
to git-rev-parse or git-update-ref.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Previously, if refs were packed, git-cvsimport would assume
that particular refs did not exist. This could lead to, for
example, overwriting previous 'origin' commits that were
packed.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
We weren't even testing basic things before, so let's at
least try importing and updating a trivial repository, which
will catch total breakage.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Like when it is already specified through -C, -F or -m to git-commit.
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
When colors are set to "true" on the repository, the git log output
will contain control characters to set/reset the colors, even when
the output is to a pipe. This makes list_stash() fail as the
downstream sed does not see what it is expecting.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Now that git-status is builtin on Cygwin this compiles as
git-status.exe. We cannot continue to include git-status
as a Makefile target as it will never be built.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Using the helper function to test for absolute paths makes porting easier.
Signed-off-by: Steffen Prohaska <prohaska@zib.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
The editor program to let the user edit the log message used to
get GIT_INDEX_FILE environment variable pointing at the right
file, but this was lost when git-commit was rewritten in C.
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Acked-by: Kristian Høgsberg <krh@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This detects a regression introduced while moving git-tag to a C
builtin.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
* maint:
user-manual: recovering from corruption
user-manual: clarify language about "modifying" old commits
user-manual: failed push to public repository
user-manual: define "branch" and "working tree" at start
git-checkout: describe detached head correctly
* 'maint' of git://linux-nfs.org/~bfields/git:
user-manual: recovering from corruption
user-manual: clarify language about "modifying" old commits
user-manual: failed push to public repository
user-manual: define "branch" and "working tree" at start
Some instructions on dealing with corruption of the object database.
Most of this text is from an example by Linus, identified by Nicolas
Pitre <nico@cam.org> with a little further editing by me.
Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
When we fail to open a temporary file to be renamed to something else,
we reported the final filename, not the temporary file we failed to
open.
Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
It's important to remember that git doesn't really allowing "editing" or
"modifying" commits, only replacing them by new commits. Redo some of
the language to make this clearer.
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
When you cherry-pick or revert a commit, naming it with an annotated
tag, we added a comment, attempting to repeat what we got from the end
user, to the message.
But this was inconsistent. When we got "cherry-pick branch", we
recorded the object name (40-letter SHA-1) without saying anything like
"original was 'branch'". There was no need to. Also recent rewrite to
use parse-options made it impossible to parrot the original command line
without "unparsing".
This removes the code that implements the misguided "we dereferenced the
tag so record that in the commit message" behaviour.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
When the "--patch" option is supplied, the patch_update_cmd() function is
called bypassing the main_loop() and exits.
Seeing as builtin-add is the only caller of git-add--interactive we can
impose a strict requirement on the format of the arguments to avoid
possible ambiguity: an "--" argument must be used whenever any pathspecs
are passed, both with the "--patch" option and without it.
Signed-off-by: Wincent Colaiuta <win@wincent.com>
When you have a file called HEAD in the work tree, the code to report
where the HEAD is at when "git checkout $commit^0" is done triggered
unnecessary ambiguity checking.
Explicitly mark the command line with "--" and make it clear that we are
talking about a revision.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This fixes the pathspec interactive_add() passes to the underlying
git-add--interactive helper. When the command was run from a
subdirectory, cmd_add() already has gone up to the toplevel of the work
tree, and the helper will be spawned from there. The pathspec given on
the command line from the user needs to be adjusted for this.
This adds "validate_pathspec()" function in the callchain, but it does
not validate yet. The function can be changed to barf if there are
unmatching pathspec given by the user, but that is not strictly
necessary.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
The earlier 7c0ab44589 (Teach builtin-add
to pass multiple paths to git-add--interactive) did not allocate enough,
and had unneeded (void*) pointer arithmetic.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This is to use a few functions refactored to use in the built-in
commit series.
* kh/commit: (28 commits)
Add a few more tests for git-commit
builtin-commit: Include the diff in the commit message when verbose.
builtin-commit: fix partial-commit support
Fix add_files_to_cache() to take pathspec, not user specified list of files
Export three helper functions from ls-files
builtin-commit: run commit-msg hook with correct message file
builtin-commit: do not color status output shown in the message template
file_exists(): dangling symlinks do exist
Replace "runstatus" with "status" in the tests
t7501-commit: Add test for git commit <file> with dirty index.
builtin-commit: Clean up an unused variable and a debug fprintf().
Call refresh_cache() when updating the user index for --only commits.
builtin-commit: Add newline when showing which commit was created
builtin-commit: resurrect behavior for multiple -m options
builtin-commit --s: add a newline if the last line was not a S-o-b
builtin-commit: fix --signoff
git status: show relative paths when run in a subdirectory
builtin-commit: Refresh cache after adding files.
builtin-commit: fix reflog message generation
launch_editor(): read the file, even when EDITOR=:
...
* maint:
Fix rev-list when showing objects involving submodules
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
* 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
* jc/maint-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
* bs/maint-commit-options:
git-commit: Add tests for invalid usage of -a/--interactive with paths
git-commit.sh: Fix usage checks regarding paths given when they do not make sense
This adds description of core.whitespace to the manual page of git-config,
and updates the stale description of whitespace handling in the manual
page of git-apply.
Also demote "strip" to a synonym status for "fix" as the value of --whitespace
option given to git-apply.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
We earlier introduced core.whitespace to allow users to tweak the
definition of what the "whitespace errors" are, for the purpose of diff
output highlighting. This teaches the same to git-apply, so that the
command can both detect (when --whitespace=warn option is given) and fix
(when --whitespace=fix option is given) as configured.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
* jk/send-pack: (24 commits)
send-pack: cluster ref status reporting
send-pack: fix "everything up-to-date" message
send-pack: tighten remote error reporting
make "find_ref_by_name" a public function
Fix warning about bitfield in struct ref
send-pack: assign remote errors to each ref
send-pack: check ref->status before updating tracking refs
send-pack: track errors for each ref
git-push: add documentation for the newly added --mirror mode
Add tests for git push'es mirror mode
Update the tracking references only if they were succesfully updated on remote
Add a test checking if send-pack updated local tracking branches correctly
git-push: plumb in --mirror mode
Teach send-pack a mirror mode
send-pack: segfault fix on forced push
Reteach builtin-ls-remote to understand remotes
send-pack: require --verbose to show update of tracking refs
receive-pack: don't mention successful updates
more terse push output
Build in ls-remote
...
* js/mingw-fallouts:
fetch-pack: Prepare for a side-band demultiplexer in a thread.
rehabilitate some t5302 tests on 32-bit off_t machines
Allow ETC_GITCONFIG to be a relative path.
Introduce git_etc_gitconfig() that encapsulates access of ETC_GITCONFIG.
Allow a relative builtin template directory.
Close files opened by lock_file() before unlinking.
builtin run_command: do not exit with -1.
Move #include <sys/select.h> and <sys/ioctl.h> to git-compat-util.h.
Use is_absolute_path() in sha1_file.c.
Skip t3902-quoted.sh if the file system does not support funny names.
t5302-pack-index: Skip tests of 64-bit offsets if necessary.
t7501-commit.sh: Not all seds understand option -i
t5300-pack-object.sh: Split the big verify-pack test into smaller parts.
* cc/bisect:
Bisect reset: do nothing when not bisecting.
Bisect: use "$GIT_DIR/BISECT_NAMES" to check if we are bisecting.
Bisect visualize: use "for-each-ref" to list all good refs.
git-bisect: modernize branch shuffling hack
git-bisect: use update-ref to mark good/bad commits
git-bisect: war on "sed"
Bisect reset: remove bisect refs that may have been packed.
The variables were somewhat misnamed.
* "What to do when whitespace errors are detected" is now called
"ws_error_action" (used to be called "new_whitespace");
* The constants to denote the possible actions are "nowarn_ws_error",
"warn_on_ws_error", "die_on_ws_error", and "correct_ws_error". The
last one used to be "strip_whitespace", but we correct whitespace
error in indent (SP followed by HT) and "strip" is not quite an
accurate name for it.
Other than the renaming of variables and constants, there is no
functional change in this patch. While we are at it, it also fixes
overly long lines and multi-line comment styles (which of course do
not affect the generated code at all).
Signed-off-by: Junio C Hamano <gitster@pobox.com>