1
0
mirror of https://github.com/git/git.git synced 2024-10-23 12:09:25 +02:00
Commit Graph

1209 Commits

Author SHA1 Message Date
Junio C Hamano
23cb5bf3b3 i18n of multi-line advice messages
Advice messages are by definition meant for human end-users, and prime
candidates for i18n/l10n. They tend to also be more verbose to be helpful,
and need to be longer than just one line.

Although we do not have parameterized multi-line advice messages yet, once
we do, we cannot emit such a message like this:

    advise(_("Please rename %s to something else"), gostak);
    advise(_("so that we can avoid distimming %s unnecessarily."), doshes);

because some translations may need to have the replacement of 'gostak' on
the second line (or 'doshes' on the first line). Some languages may even
need to use three lines in order to fit the same message within a
reasonable width.

Instead, it has to be a single advise() construct, like this:

    advise(_("Please rename %s to something else\n"
             "so that we can avoid distimming %s unnecessarily."),
           gostak, doshes);

Update the advise() function and its existing callers to

 - take a format string that can be multi-line and translatable as a
   whole;
 - use the string and the parameters to form a localized message; and
 - show each line in the result with the localization of the "hint: ".

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-22 11:21:26 -08:00
Junio C Hamano
406cc9b822 Merge branch 'bc/maint-apply-check-no-patch' into maint
* bc/maint-apply-check-no-patch:
  builtin/apply.c: report error on failure to recognize input
  t/t4131-apply-fake-ancestor.sh: fix broken test
2011-12-21 11:42:45 -08:00
Carlos Martín Nieto
a31275d6ff clone: the -o option has nothing to do with <branch>
It is to give an alternate <name> instead of "origin" to the remote
we are cloning from.

Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-21 11:26:30 -08:00
Michael Schubert
967cf9867d builtin/log: remove redundant initialization
"abbrev" and "commit_format" in struct rev_info get initialized in
init_revisions - no need to reinit in cmd_log_init_defaults.

Signed-off-by: Michael Schubert <mschub@elegosoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-21 11:15:56 -08:00
Junio C Hamano
f1f509cc45 Merge branch 'ms/commit-cc-option-helpstring' into maint
* ms/commit-cc-option-helpstring:
  builtin/commit: add missing '/' in help message
2011-12-21 10:50:20 -08:00
Ævar Arnfjörð Bjarmason
97f261b1e7 builtin/init-db.c: eliminate -Wformat warning on Solaris
On Solaris systems we'd warn about an implicit cast of mode_t when we
printed things out with the %d format. We'd get this warning under GCC
4.6.0 with Solaris headers:

    builtin/init-db.c: In function ‘separate_git_dir’:
    builtin/init-db.c:354:4: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘mode_t’ [-Wformat]

We've been doing this ever since v1.7.4.1-296-gb57fb80. Just work
around this by adding an explicit cast.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-20 16:02:08 -08:00
Junio C Hamano
2e8722fc9e Merge branch 'jc/maint-pack-object-cycle' into maint
* jc/maint-pack-object-cycle:
  pack-object: tolerate broken packs that have duplicated objects

Conflicts:
	builtin/pack-objects.c
2011-12-13 22:04:50 -08:00
Junio C Hamano
68f80f5490 Merge branch 'jc/index-pack-reject-dups' into maint
* jc/index-pack-reject-dups:
  receive-pack, fetch-pack: reject bogus pack that records objects twice
2011-12-13 22:03:36 -08:00
Junio C Hamano
df6246ed78 Merge branch 'nd/misc-cleanups' into maint
* nd/misc-cleanups:
  unpack_object_header_buffer(): clear the size field upon error
  tree_entry_interesting: make use of local pointer "item"
  tree_entry_interesting(): give meaningful names to return values
  read_directory_recursive: reduce one indentation level
  get_tree_entry(): do not call find_tree_entry() on an empty tree
  tree-walk.c: do not leak internal structure in tree_entry_len()
2011-12-13 22:02:51 -08:00
Junio C Hamano
8311158c66 Merge branch 'maint-1.7.7' into maint
* maint-1.7.7:
  Git 1.7.7.5
  Git 1.7.6.5
  blame: don't overflow time buffer
  fetch: create status table using strbuf
  checkout,merge: loosen overwriting untracked file check based on info/exclude
  cast variable in call to free() in builtin/diff.c and submodule.c
  apply: get rid of useless x < 0 comparison on a size_t type

Conflicts:
	Documentation/git.txt
	GIT-VERSION-GEN
	RelNotes
	builtin/fetch.c
2011-12-13 21:58:51 -08:00
Junio C Hamano
c0eb9ccfb9 Merge branch 'ab/clang-lints' into maint-1.7.7
* ab/clang-lints:
  cast variable in call to free() in builtin/diff.c and submodule.c
  apply: get rid of useless x < 0 comparison on a size_t type
2011-12-13 21:47:51 -08:00
Junio C Hamano
3b425656a4 Merge branch 'nd/maint-ignore-exclude' into maint-1.7.7
* nd/maint-ignore-exclude:
  checkout,merge: loosen overwriting untracked file check based on info/exclude
2011-12-13 21:47:08 -08:00
Junio C Hamano
7857e3246f Merge branch 'maint-1.7.6' into maint-1.7.7
* maint-1.7.6:
  Git 1.7.6.5
  blame: don't overflow time buffer
  fetch: create status table using strbuf

Conflicts:
	Documentation/git.txt
	GIT-VERSION-GEN
	RelNotes
2011-12-13 21:44:56 -08:00
Junio C Hamano
52b195f2b8 Merge branch 'jk/maint-fetch-status-table' into maint-1.7.6
* jk/maint-fetch-status-table:
  fetch: create status table using strbuf
2011-12-13 21:21:30 -08:00
Junio C Hamano
43176d1e4c Merge branch 'jc/maint-name-rev-all' into maint-1.7.6
* jc/maint-name-rev-all:
  name-rev --all: do not even attempt to describe non-commit object
2011-12-13 21:12:34 -08:00
Jeff King
c3ea051544 blame: don't overflow time buffer
When showing the raw timestamp, we format the numeric
seconds-since-epoch into a buffer, followed by the timezone
string. This string has come straight from the commit
object. A well-formed object should have a timezone string
of only a few bytes, but we could be operating on data
pushed by a malicious user.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-13 21:09:06 -08:00
Jeff King
5914f2d057 fetch: create status table using strbuf
When we fetch from a remote, we print a status table like:

  From url
   * [new branch]   foo -> origin/foo

We create this table in a static buffer using sprintf. If
the remote refnames are long, they can overflow this buffer
and smash the stack.

Instead, let's use a strbuf to build the string.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-09 23:17:00 -08:00
Junio C Hamano
b1af9630d7 Merge branch 'maint-1.7.7' into maint
* maint-1.7.7:
  stripspace: fix outdated comment
  Add MYMETA.yml to perl/.gitignore
2011-12-05 15:07:54 -08:00
Junio C Hamano
c34ba9967c Merge branch 'maint-1.7.6' into maint-1.7.7
* maint-1.7.6:
  stripspace: fix outdated comment
  Add MYMETA.yml to perl/.gitignore
2011-12-05 15:07:49 -08:00
Jeff King
c2857fb8b7 stripspace: fix outdated comment
The comment on top of stripspace() claims that the buffer
will no longer be NUL-terminated. However, this has not been
the case at least since the move to using strbuf in 2007.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-05 15:04:38 -08:00
Brandon Casey
cc64b318f2 builtin/apply.c: report error on failure to recognize input
When git apply is passed something that is not a patch, it does not produce
an error message or exit with a non-zero status if it was not actually
"applying" the patch i.e. --check or --numstat etc were supplied on the
command line.

Fix this by producing an error when apply fails to find any hunks whatsoever
while parsing the patch.

This will cause some of the output formats (--numstat, --diffstat, etc) to
produce an error when they formerly would have reported zero changes and
exited successfully.  That seems like the correct behavior though.  Failure
to recognize the input as a patch should be an error.

Plus, add a test.

Reported-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-05 11:20:50 -08:00
Nguyễn Thái Ngọc Duy
fc001b526c checkout,merge: loosen overwriting untracked file check based on info/exclude
Back in 1127148 (Loosen "working file will be lost" check in
Porcelain-ish - 2006-12-04), git-checkout.sh learned to quietly
overwrite ignored files. Howver the code only took .gitignore files
into account.

Standard ignored files include all specified in .gitignore files in
working directory _and_ $GIT_DIR/info/exclude. This patch makes sure
ignored files in info/exclude can also be overwritten automatically in
the spirit of the original patch.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-11-28 10:37:50 -08:00
Vincent van Ravesteijn
5cd75c7d8d builtin-branch: Fix crash on invalid use of --force
The option --force should not put us in 'create branch' mode. The
fact that this option is only valid in 'create branch' mode is
already caught by the the next 'if' in which we assure that we
are in the correct mode.

Without this patch, "git branch -f" without any other argument ends
up calling create_branch without any branch name.

Signed-off-by: Vincent van Ravesteijn <vfr@lyx.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-11-23 13:23:33 -08:00
Jonathan Nieder
b15aa973b2 revert --abort: do not leave behind useless sequencer-old directory
The "git cherry-pick --abort" command currently renames the
.git/sequencer directory to .git/sequencer-old instead of removing it
on success due to an accident.  cherry-pick --abort is designed to
work in three steps:

 1) find which commit to roll back to
 2) call "git reset --merge <commit>" to move to that commit
 3) remove the .git/sequencer directory

But the careless author forgot step 3 entirely.  The only reason the
command worked anyway is that "git reset --merge <commit>" renames the
.git/sequencer directory as a secondary effect --- after moving to
<commit>, or so the logic goes, it is unlikely but possible that the
caller of git reset wants to continue the series of cherry-picks that
was in progress, so git renames the sequencer state to
.git/sequencer-old to be helpful while allowing the cherry-pick to be
resumed if the caller did not want to end the sequence after all.

By running "git cherry-pick --abort", the operator has clearly
indicated that she is not planning to continue cherry-picking.  Remove
the (renamed) .git/sequencer directory as intended all along.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-11-23 10:56:29 -08:00
Johannes Sixt
2a4037d0a7 Fix revert --abort on Windows
On Windows, it is not possible to rename or remove a directory that has
open files. 'revert --abort' renamed .git/sequencer when it still had
.git/sequencer/head open. Close the file as early as possible to allow
the rename operation on Windows.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Acked-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-11-23 10:54:57 -08:00
Nguyễn Thái Ngọc Duy
b4524d343b revert: do not pass non-literal string as format to git_path()
This fixes the following warning.

    CC builtin/revert.o
builtin/revert.c: In function ‘write_cherry_pick_head’:
builtin/revert.c:311: warning: format not a string literal and no format arguments

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-11-23 09:29:53 -08:00
Jonathan Nieder
c427b211b3 revert: remove --reset compatibility option
Remove the "git cherry-pick --reset" option, which has a different
preferred spelling nowadays ("--quit").  Luckily the old --reset name
was not around long enough for anyone to get used to it.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-11-22 18:18:02 -08:00
Jonathan Nieder
539047c19e revert: introduce --abort to cancel a failed cherry-pick
After running some ill-advised command like "git cherry-pick
HEAD..linux-next", the bewildered novice may want to return to more
familiar territory.  Introduce a "git cherry-pick --abort" command
that rolls back the entire cherry-pick sequence and places the
repository back on solid ground.

Just like "git merge --abort", this internally uses "git reset
--merge", so local changes not involved in the conflict resolution are
preserved.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-11-22 18:16:59 -08:00
Jonathan Nieder
82433cdf4d revert: write REVERT_HEAD pseudoref during conflicted revert
When conflicts are encountered while reverting a commit, it can be
handy to have the name of that commit easily available.  For example,
to produce a copy of the patch to refer to while resolving conflicts:

	$ git revert 2eceb2a8
	error: could not revert 2eceb2a8... awesome, buggy feature
	$ git show -R REVERT_HEAD >the-patch
	$ edit $(git diff --name-only)

Set a REVERT_HEAD pseudoref when "git revert" does not make a commit,
for cases like this.  This also makes it possible for scripts to
distinguish between a revert that encountered conflicts and other
sources of an unmerged index.

After successfully committing, resetting with "git reset", or moving
to another commit with "git checkout" or "git reset", the pseudoref is
no longer useful, so remove it.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-11-22 13:34:44 -08:00
Jonathan Nieder
b8c74690b2 revert: improve error message for cherry-pick during cherry-pick
In the spirit of v1.6.3.3~3^2 (refuse to merge during a merge,
2009-07-01), "git cherry-pick" refuses to start a new cherry-pick when
in the middle of an existing conflicted cherry-pick in the following
sequence:

 1. git cherry-pick HEAD..origin
 2. resolve conflicts
 3. git cherry-pick HEAD..origin (instead of "git cherry-pick
    --continue", by mistake)

Good.  However, the error message on attempting step 3 is more
convoluted than necessary:

  $ git cherry-pick HEAD..origin
  error: .git/sequencer already exists.
  error: A cherry-pick or revert is in progress.
  hint: Use --continue to continue the operation
  hint: or --quit to forget about it
  fatal: cherry-pick failed

Clarify by removing the redundant first "error:" message, simplifying
the advice, and using lower-case and no full stops to be consistent
with other commands that prefix their messages with "error:", so it
becomes

  error: a cherry-pick or revert is already in progress
  hint: try "git cherry-pick (--continue | --quit)"
  fatal: cherry-pick failed

The "fatal: cherry-pick failed" line seems unnecessary, too, but
that can be fixed some other day.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-11-22 13:33:49 -08:00
Jonathan Nieder
dffc860028 revert: rearrange pick_revisions() for clarity
Deal completely with "cherry-pick --quit" and --continue at the
beginning of pick_revisions(), leaving the rest of the function for
the more interesting "git cherry-pick <commits>" case.

No functional change intended.  The impact is just to unindent the
code a little.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-11-22 13:33:01 -08:00
Jonathan Nieder
f80a87262a revert: rename --reset option to --quit
The option to "git cherry-pick" and "git revert" to discard the
sequencer state introduced by v1.7.8-rc0~141^2~6 (revert: Introduce
--reset to remove sequencer state, 2011-08-04) has a confusing name.
Change it now, while we still have the time.

The new name for "cherry-pick, please get out of my way, since I've
long forgotten about the sequence of commits I was cherry-picking when
you wrote that old .git/sequencer directory" is --quit.  Mnemonic:
this is analagous to quiting a program the user is no longer using ---
we just want to get out of the multiple-command cherry-pick procedure
and not to reset HEAD or rewind any other old state.

The "--reset" option is kept as a synonym to minimize the impact.  We
might consider dropping it for simplicity in a separate patch, though.

Adjust documentation and tests to use the newly preferred name (--quit)
instead of --reset.  While at it, let's clarify the short descriptions
of these operations in "-h" output.

Before:

	--reset		forget the current operation
	--continue	continue the current operation

After:

	--quit		end revert or cherry-pick sequence
	--continue	resume revert or cherry-pick sequence

Noticed-by: Phil Hord <phil.hord@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-11-22 13:30:35 -08:00
Junio C Hamano
4c00c852b3 Sync with 1.7.7.4 2011-11-18 11:30:02 -08:00
Junio C Hamano
c9de921848 Merge branch 'jc/maint-name-rev-all' into maint
* jc/maint-name-rev-all:
  name-rev --all: do not even attempt to describe non-commit object
2011-11-18 11:14:16 -08:00
Jonathan Nieder
418c9b176c do not let git_path clobber errno when reporting errors
Because git_path() calls vsnprintf(), code like

	fd = open(git_path("SQUASH_MSG"), O_WRONLY | O_CREAT, 0666);
	die_errno(_("Could not write to '%s'"), git_path("SQUASH_MSG"));

can end up printing an error indicator from vsnprintf() instead of
open() by mistake.  Store the path we are trying to write to in a
temporary variable and pass _that_ to die_errno(), so the messages
written by git cherry-pick/revert and git merge can avoid this source
of confusion.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-11-17 15:06:27 -08:00
Junio C Hamano
f63c79dbc8 pack-object: tolerate broken packs that have duplicated objects
When --reuse-delta is in effect (which is the default), and an existing
pack in the repository has the same object registered twice (e.g. one copy
in a non-delta format and the other copy in a delta against some other
object), an attempt to repack the repository can result in a cyclic delta
dependency, causing write_one() function to infinitely recurse into
itself.

Detect such a case and break the loopy dependency by writing out an object
that is involved in such a loop in the non-delta format.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-11-16 22:06:08 -08:00
Junio C Hamano
68be2fea50 receive-pack, fetch-pack: reject bogus pack that records objects twice
When receive-pack & fetch-pack are run and store the pack obtained over
the wire to a local repository, they internally run the index-pack command
with the --strict option. Make sure that we reject incoming packfile that
records objects twice to avoid spreading such a damage.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-11-16 22:05:21 -08:00
Ramkumar Ramachandra
5e1e6b93d0 revert: prettify fatal messages
Some of the fatal messages printed by revert and cherry-pick look ugly
like the following:

  fatal: Could not open .git/sequencer/todo.: No such file or directory

The culprit here is that these callers of the die_errno() function did not
take it into account that the message string they give to it is followed
by ": <strerror>", hence the message typically should not end with the
full-stop.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-11-15 16:59:46 -08:00
Junio C Hamano
f0c7fd49c0 Revert "upload-archive: use start_command instead of fork"
This reverts commit c09cd77ea2fe3580b33918a99fe138d239ac2aaf, expecting a
better version to be rerolled soon.
2011-11-15 15:39:33 -08:00
Junio C Hamano
dc865af65f Merge branch 'ly/mktree-using-strbuf'
* ly/mktree-using-strbuf:
  mktree: fix a memory leak in write_tree()
2011-11-11 21:34:06 -08:00
Junio C Hamano
c444c16589 Merge "Move 'builtin-*' into a 'builtin/' subdirectory" 2011-11-10 09:10:51 -08:00
Junio C Hamano
d7a0129b3c Merge branch 'jc/remote-setbranches-usage-fix'
* jc/remote-setbranches-usage-fix:
  remote: fix set-branches usage
2011-11-08 16:40:31 -08:00
Junio C Hamano
8327ee8677 Merge branch 'fc/remote-seturl-usage-fix'
* fc/remote-seturl-usage-fix:
  remote: fix remote set-url usage
2011-11-08 16:40:27 -08:00
Junio C Hamano
992499d853 Merge branch 'dm/pack-objects-update' into maint
* dm/pack-objects-update:
  pack-objects: don't traverse objects unnecessarily
  pack-objects: rewrite add_descendants_to_write_order() iteratively
  pack-objects: use unsigned int for counter and offset values
  pack-objects: mark add_to_write_order() as inline
2011-11-08 16:26:45 -08:00
Junio C Hamano
92622e6214 Merge branch 'ss/blame-textconv-fake-working-tree'
* ss/blame-textconv-fake-working-tree:
  blame.c: Properly initialize strbuf after calling textconv_object(), again
2011-11-07 16:43:19 -08:00
Sebastian Schuberth
8518088fe8 blame.c: Properly initialize strbuf after calling textconv_object(), again
2564aa4 started to initialize buf.alloc, but that should actually be one
more byte than the string length due to the trailing \0. Also, do not
modify buf.alloc out of the strbuf code. Use the existing strbuf_attach
instead.

Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-11-07 16:42:57 -08:00
Junio C Hamano
656cdf0c9e remote: fix set-branches usage
Bad copy-paste.

Otherwise "git remote set-branches" without necessary argument
will result in an error message and help for set-url subcommand.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-11-06 21:15:30 -08:00
Ævar Arnfjörð Bjarmason
83838d5c1b cast variable in call to free() in builtin/diff.c and submodule.c
Both of these free() calls are freeing a "const unsigned char (*)[20]"
type while free() expects a "void *". This results in the following
warning under clang 2.9:

    builtin/diff.c:185:7: warning: passing 'const unsigned char (*)[20]' to parameter of type 'void *' discards qualifiers
            free(parent);
                 ^~~~~~

    submodule.c:394:7: warning: passing 'const unsigned char (*)[20]' to parameter of type 'void *' discards qualifiers
            free(parents);
                 ^~~~~~~

This free()-ing without a cast was added by Jim Meyering to
builtin/diff.c in v1.7.6-rc3~4 and later by Fredrik Gustafsson in
submodule.c in v1.7.7-rc1~25^2.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-11-06 10:43:18 -08:00
Ævar Arnfjörð Bjarmason
473f4c96e3 apply: get rid of useless x < 0 comparison on a size_t type
According to the C standard size_t is always unsigned, therefore the
comparison "n1 < 0 || n2 < 0" when n1 and n2 are size_t will always be
false.

This was raised by clang 2.9 which throws this warning when compiling
apply.c:

    builtin/apply.c:253:9: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
            if (n1 < 0 || n2 < 0)
                ~~ ^ ~
    builtin/apply.c:253:19: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
            if (n1 < 0 || n2 < 0)
                          ~~ ^ ~

This check was originally added in v1.6.5-rc0~53^2 by Giuseppe Bilotta
while adding an option to git-apply to ignore whitespace differences.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-11-06 10:36:59 -08:00
Junio C Hamano
ee6dfb2d83 receive-pack: do not expect object 0{40} to exist
When pushing to delete a ref, it uses 0{40} as an object name to signal
that the request is a deletion. We shouldn't trigger "deletion of a
corrupt ref" warning in such a case, which was designed to notice that a
ref points at an object that is truly missing from the repository.

Reported-by: Stefan Näwe
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-11-03 14:27:04 -07:00