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

2323 Commits

Author SHA1 Message Date
Nanako Shiraishi
a79ec62d06 git-am: Add --ignore-date option
This new option tells 'git-am' to ignore the date header field
recorded in the format-patch output. The commits will have the
timestamp when they are created instead.

You can work a lot in one day to accumulate many changes, but
apply and push to the public repository only some of them at
the end of the first day. Then next day you can spend all your
working hours reading comics or chatting with your coworkers,
and apply your remaining patches from the previous day using
this option to pretend that you have been working at the end
of the day.

Signed-off-by: しらいしななこ <nanako3@lavabit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-25 18:56:13 -08:00
Junio C Hamano
3f01ad6654 am: Add --committer-date-is-author-date option
This new option tells 'git-am' to use the timestamp recorded
in the Email message as both author and committer date.

Signed-off-by: しらいしななこ <nanako3@lavabit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-25 18:55:49 -08:00
Junio C Hamano
5dc1308562 Merge branch 'js/patience-diff'
* js/patience-diff:
  bash completions: Add the --patience option
  Introduce the diff option '--patience'
  Implement the patience diff algorithm

Conflicts:
	contrib/completion/git-completion.bash
2009-01-23 21:51:38 -08:00
martin f. krafft
b80da424a1 git-am: implement --reject option passed to git-apply
With --reject, git-am simply passes the --reject option to git-apply and thus
allows people to work with reject files if they so prefer.

Signed-off-by: martin f. krafft <madduck@madduck.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-23 17:00:12 -08:00
Arjen Laarhoven
d930508903 t/t4202-log.sh: Add testcases
Add testcases for 'git log --diff-filter=[CM]' (copies and renames).
Also add a testcase for 'git log --follow'.

Signed-off-by: Arjen Laarhoven <arjen@yaph.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-23 15:10:24 -08:00
Junio C Hamano
9a01387b97 Merge branch 'kc/maint-diff-bwi-fix'
* kc/maint-diff-bwi-fix:
  Fix combined use of whitespace ignore options to diff
2009-01-21 17:07:51 -08:00
Junio C Hamano
0aac1614e9 Merge branch 'sg/maint-gitdir-in-subdir'
* sg/maint-gitdir-in-subdir:
  Fix gitdir detection when in subdir of gitdir
2009-01-21 16:51:25 -08:00
Junio C Hamano
d9fde065bd Merge branch 'rs/ctype'
* rs/ctype:
  Add is_regex_special()
  Change NUL char handling of isspecial()
  Reformat ctype.c
  Add ctype test

Conflicts:
	Makefile
2009-01-21 16:51:03 -08:00
Junio C Hamano
35e6afd4c6 Merge branch 'jk/color-parse'
* jk/color-parse:
  Optimize color_parse_mem
  expand --pretty=format color options
  color: make it easier for non-config to parse color specs
2009-01-21 16:50:34 -08:00
Junio C Hamano
a14f15427b Merge branch 'jc/maint-format-patch-o-relative'
* jc/maint-format-patch-o-relative:
  Teach format-patch to handle output directory relative to cwd

Conflicts:
	t/t4014-format-patch.sh
2009-01-21 16:50:19 -08:00
Junio C Hamano
8318eb795e Merge branch 'kb/am-directory'
* kb/am-directory:
  git-am: fix shell quoting
  git-am: add --directory=<dir> option
2009-01-21 16:47:14 -08:00
Junio C Hamano
f873dd5ac2 Merge branch 'maint'
* maint:
  Rename diff.suppress-blank-empty to diff.suppressBlankEmpty
2009-01-21 01:08:10 -08:00
Johannes Schindelin
950db8798d Rename diff.suppress-blank-empty to diff.suppressBlankEmpty
All the other config variables use CamelCase.  This config variable should
not be an exception.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-21 00:17:40 -08:00
Markus Heidelberg
35641310af use uppercase POSIX compliant signals for the 'trap' command
In 'man 1p trap' there is written:

    "Implementations may permit names with the SIG prefix or ignore case
    in signal names as an extension."

So change the lowercase signals to uppercase, which is POSIX compliant
instead of being an extension.

There wasn't anybody claiming that it doesn't work, but there was a bug
with using a signal with the SIG prefix, which is an extension as well.
So let's play it safe and change it, since it doesn't hurt anyone.

While at it, also convert 8 indentation spaces to 1 tab character.

Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-19 22:39:31 -08:00
Keith Cascio
6d12acefd5 Fix combined use of whitespace ignore options to diff
The code used to misbehave when options to ignore certain whitespaces
(-w -b and --ignore-at-eol) were combined.

Signed-off-by: Keith Cascio <keith@cs.ucla.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-19 21:21:58 -08:00
Keith Cascio
537a071f41 test more combinations of ignore-whitespace options to diff
There are three flags involved (-w -b and --ignore-space-at-eol) which
makes 8 combinations possible in total, but only 3 cases are tested (none,
-w alone and -b alone).

This adds the other 5 cases.

Signed-off-by: Keith Cascio <keith@cs.ucla.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-19 21:17:38 -08:00
Eric Wong
b03a71a660 git-svn: avoid importing nested git repos
Some SVN repositories contain git repositories within them
(hopefully accidentally checked in).  Since git refuses to track
nested ".git" repositories, this can be a problem when fetching
updates from SVN.

Thanks to Morgan Christiansson for the report and testing.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
2009-01-18 18:39:57 -08:00
Eric Wong
1ef626b4b6 git-svn: fix SVN 1.1.x compatibility
The get_log() function in the Perl SVN API introduced the limit
parameter in 1.2.0.  However, this got discarded in our SVN::Ra
compatibility layer when used with SVN 1.1.x.  We now emulate
the limit functionality in older SVN versions by preventing the
original callback from being called if the given limit has been
reached.  This emulation is less bandwidth efficient, but SVN
1.1.x is becoming rarer now.

Additionally, the --limit parameter in svn(1) uses the
aforementioned get_log() functionality change in SVN 1.2.x.
t9129 no longer depends on --limit to work and instead uses
Perl to parse out the commit message.

Thanks to Tom G. Christensen for the bug report.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
2009-01-18 15:38:28 -08:00
Eric Wong
baf5fa8a7f git-svn: better attempt to handle broken symlink updates
This is a followup to 7fc35e0e94782bbbefb920875813519038659930,
(workaround a for broken symlinks in SVN).

Since broken SVN clients can commit svn:special files without
the magic "link " prefix, this can affect delta application
when we update the broken svn:special file.  So now we fall
back and retry the delta application on symlinks if having
a "link " prefix fails.

Our behavior differs from svn(1) (v1.5.1) slightly:

  When a svn:special file is created w/o a "link " prefix, svn
  will create a regular file (mode 100644 to git) with the
  contents of the blob as-is.

  Our behavior is to continue creating the symlink (mode 120000
  to git) with the contents of the blob as-is.  While this
  differs from current svn(1) behavior, this is easier and more
  efficient to implement (and the correctness of the svn(1) is
  debatable, since it's a workaround for a bug in the first
  place).

More information on this SVN bug is described here:
  http://subversion.tigris.org/issues/show_bug.cgi?id=2692

Signed-off-by: Eric Wong <normalperson@yhbt.net>
2009-01-18 15:38:28 -08:00
Eric Wong
dbc6c74d08 git-svn: handle empty files marked as symlinks in SVN
Broken SVN clients generate empty files with the svn:special set
to '*'.  This attempts to denote a symlink pointing to a file
with an empty path (""), which cannot be generated on a POSIX
system.

Thus, we mimic the behavior of svn(1) and create a zero-byte
file in our tree.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
2009-01-18 15:38:27 -08:00
Brandon Casey
a83c88525e t7700: demonstrate misbehavior of 'repack -a' when local packs exist
The ability to "...fatten [the] local repository by packing everything that
is needed by the local ref into a single new pack, including things that are
borrowed from alternates"[1] is supposed to be provided by the '-a' or '-A'
options to repack when '-l' is not used, but there is a flaw.  For each
pack in the local repository without a .keep file, repack supplies a
--unpacked=<pack> argument to pack-objects.

The --unpacked option to pack-objects, with or without an argument, causes
pack-objects to ignore any object which is packed in a pack not mentioned
in an argument to --unpacked=.  So, if there are local packs, and
'repack -a' is called, then any objects which reside in packs accessible
through alternates will _not_ be packed.  If there are no local packs, then
no --unpacked argument will be supplied, and repack will behave as expected.

[1] http://mid.gmane.org/7v8wrwidi3.fsf@gitster.siamese.dyndns.org

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-17 23:44:33 -08:00
Keith Cascio
7a38329130 test more combinations of ignore-whitespace options to diff
There are three flags involved (-w -b and --ignore-space-at-eol) which
makes 8 combinations possible in total, but only 3 cases are tested (none,
-w alone and -b alone).

This adds the other 5 cases.

Signed-off-by: Keith Cascio <keith@cs.ucla.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-17 23:43:31 -08:00
Junio C Hamano
8f31355692 Merge branch 'mv/apply-parse-opt'
* mv/apply-parse-opt:
  Resurrect "git apply --flags -" to read from the standard input
  parse-opt: migrate builtin-apply.
2009-01-17 23:06:53 -08:00
Junio C Hamano
90abc19b5a Merge branch 'tr/rebase-root'
* tr/rebase-root:
  rebase: update documentation for --root
  rebase -i: learn to rebase root commit
  rebase: learn to rebase root commit
  rebase -i: execute hook only after argument checking
2009-01-17 23:06:38 -08:00
Junio C Hamano
6af384ce73 Merge branch 'ap/clone-into-empty'
* ap/clone-into-empty:
  Allow cloning to an existing empty directory
  add is_dot_or_dotdot inline function
2009-01-17 23:05:54 -08:00
Junio C Hamano
33256e6b1b Merge branch 'tr/maint-no-index-fixes'
* tr/maint-no-index-fixes:
  diff --no-index -q: fix endless loop
  diff --no-index: test for pager after option parsing
  diff: accept -- when using --no-index
2009-01-17 23:05:38 -08:00
Junio C Hamano
58f37f3c07 Merge branch 'maint'
* maint:
  Update draft release notes for 1.6.1.1
  builtin-fsck: fix off by one head count
  t5540: clarify that http-push does not handle packed-refs on the remote
  http-push: when making directories, have a trailing slash in the path name
  http-push: fix off-by-path_len
  Documentation: let asciidoc align related options
  githooks.txt: add missing word
  builtin-commit.c: do not remove COMMIT_EDITMSG
2009-01-17 23:04:40 -08:00
SZEDER Gábor
72183cb297 Fix gitdir detection when in subdir of gitdir
If the current working directory is a subdirectory of the gitdir (e.g.
<repo>/.git/refs/), then setup_git_directory_gently() will climb its
parent directories until it finds itself in a gitdir.  However, no
matter how many parent directories it climbs, it sets
'GIT_DIR_ENVIRONMENT' to ".", which is obviously wrong.

This behaviour affected at least 'git rev-parse --git-dir' and hence
caused some errors in bash completion (e.g. customized command prompt
when on a detached head and completion of refs).

To fix this, we set the absolute path of the found gitdir instead.

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-17 21:46:50 -08:00
René Scharfe
b4285c71bc Add ctype test
Manipulating the character class table in ctype.c by hand is error prone.
To ensure that typos are found quickly, add a test program and script.

test-ctype checks the output of the character class macros isspace() et.
al. by applying them on all possible char values and consulting a list of
all characters in the particular class.  It doesn't check tolower() and
toupper(); this could be added later.

The test script t0070-fundamental.sh is created because there is no good
place for the ctype test, yet -- except for t0000-basic.sh perhaps, but
it doesn't run well on Windows, yet.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-17 18:30:23 -08:00
Johannes Schindelin
8ee09acd8f t5540: clarify that http-push does not handle packed-refs on the remote
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-17 18:20:00 -08:00
Johannes Schindelin
466ddf90c2 http-push: when making directories, have a trailing slash in the path name
The function lock_remote() sends MKCOL requests to make leading
directories; However, if it does not put a forward slash '/' at the end of
the path, the server sends a 301 redirect.

By leaving the '/' in place, we can avoid this additional step.

Incidentally, at least one version of Curl (7.16.3) does not resend
credentials when it follows a 301 redirect, so this commit also fixes
a bug.

Original patch by Tay Ray Chuan <rctay89@gmail.com>.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-17 18:19:46 -08:00
Jeff King
c002922adc expand --pretty=format color options
Currently, the only colors available to --pretty=format
users are red, green, and blue. Rather than expand it with a
few new colors, this patch makes the usual config color
syntax available, including more colors, backgrounds, and
attributes.

Because colors are no longer bounded to a single word (e.g.,
%Cred), this uses a more advanced syntax that features a
beginning and end delimiter (but the old syntax still
works). So you can now do:

  git log --pretty=tformat:'%C(yellow)%h%C(reset) %s'

to emulate --pretty=oneline, or even

  git log --pretty=tformat:'%C(cyan magenta bold)%s%C(reset)'

if you want to relive the awesomeness of 4-color CGA.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-17 18:04:24 -08:00
Junio C Hamano
7bbd8d6c13 Merge branch 'maint'
* maint:
  t3404: Add test case for auto-amending only edited commits after "edit"
  t3404: Add test case for aborted --continue after "edit"
  t3501: check that commits are actually done
2009-01-15 18:52:35 -08:00
Junio C Hamano
ebb7bbf769 Merge branch 'maint-1.6.0' into maint
* maint-1.6.0:
  t3404: Add test case for auto-amending only edited commits after "edit"
  t3404: Add test case for aborted --continue after "edit"
  t3501: check that commits are actually done
2009-01-15 14:33:54 -08:00
Stephan Beyer
f8aa1b6902 t3404: Add test case for auto-amending only edited commits after "edit"
Add a test case for the bugfix introduced by commit c14c3c82d
"git-rebase--interactive: auto amend only edited commit".

Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-15 14:22:53 -08:00
Stephan Beyer
dc7f55cbe9 t3404: Add test case for aborted --continue after "edit"
Add a test case for the bugfix introduced by commit 8beb1f33d
"git-rebase-interactive: do not squash commits on abort".

Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-15 14:22:42 -08:00
Stephan Beyer
944019c8b3 t3501: check that commits are actually done
The basic idea of t3501 is to check whether revert
and cherry-pick works on renamed files.
But as there is no pure cherry-pick/revert test, it is
good to also check if commits are actually done in that
scenario.

Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-15 14:22:12 -08:00
Junio C Hamano
b32acd21d8 Merge branch 'maint'
* maint:
  Update draft release notes to 1.6.1.1
  Make t3411 executable
  fix handling of multiple untracked files for git mv -k
  add test cases for "git mv -k"
2009-01-14 22:58:46 -08:00
Junio C Hamano
914186a5c3 Merge branch 'maint-1.6.0' into maint
* maint-1.6.0:
  fix handling of multiple untracked files for git mv -k
  add test cases for "git mv -k"
2009-01-14 22:34:05 -08:00
Miklos Vajna
8dca683346 Make t3411 executable
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-14 17:00:00 -08:00
Junio C Hamano
17f26a9ee3 git-am: fix shell quoting
Noticed by Stephan Beyer; the new test is mine.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-14 16:29:59 -08:00
Michael J Gruber
be17262d13 fix handling of multiple untracked files for git mv -k
The "-k" option to "git mv" should allow specifying multiple untracked
files. Currently, multiple untracked files raise an assertion if they
appear consecutively as arguments. Fix this by decrementing the loop
index after removing one entry from the array of arguments.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-14 09:34:22 -08:00
Michael J Gruber
3772923f14 add test cases for "git mv -k"
Add test cases for ignoring nonexisting and untracked files using the -k
option to "git mv". There is one known breakage related to multiple
untracked files specfied as consecutive arguments.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-14 09:29:24 -08:00
Junio C Hamano
6a15416a89 Merge branch 'nd/grep-assume-unchanged'
* nd/grep-assume-unchanged:
  grep: grep cache entries if they are "assume unchanged"
  grep: support --no-ext-grep to test builtin grep
2009-01-13 23:10:02 -08:00
Junio C Hamano
9735a44440 Merge branch 'js/bundle-tags'
* js/bundle-tags:
  bundle: allow rev-list options to exclude annotated tags
2009-01-13 23:09:50 -08:00
Junio C Hamano
132d04b565 Merge branch 'js/add-not-submodule'
* js/add-not-submodule:
  git add: do not add files from a submodule
2009-01-13 23:09:47 -08:00
Junio C Hamano
f39adc250c Merge branch 'cb/maint-unpack-trees-absense'
* cb/maint-unpack-trees-absense:
  unpack-trees: remove redundant path search in verify_absent
  unpack-trees: fix path search bug in verify_absent
  unpack-trees: handle failure in verify_absent
2009-01-13 23:09:20 -08:00
Junio C Hamano
0f2d01d4fc Merge branch 'mc/cd-p-pwd'
* mc/cd-p-pwd:
  git-sh-setup: Fix scripts whose PWD is a symlink to a work-dir on OS X
2009-01-13 23:09:13 -08:00
Junio C Hamano
94468bc1f7 Merge branch 'js/maint-merge-recursive-r-d-conflict' into maint
* js/maint-merge-recursive-r-d-conflict:
  merge-recursive: mark rename/delete conflict as unmerged
2009-01-13 01:15:19 -08:00
Junio C Hamano
9e8f6e7f6e Merge branch 'cb/maint-merge-recursive-fix' into maint
* cb/maint-merge-recursive-fix:
  merge-recursive: do not clobber untracked working tree garbage
  modify/delete conflict resolution overwrites untracked file

Conflicts:
	builtin-merge-recursive.c
2009-01-13 01:13:56 -08:00