Code

git.git
13 years agogit-send-email: fix missing space in error message
Sylvain Rabot [Fri, 29 Apr 2011 18:23:24 +0000 (20:23 +0200)]
git-send-email: fix missing space in error message

When the command cannot make a connection to the SMTP server the error
message to diagnose the broken configuration is issued.  However, when an
optional smtp-server-port is given and needs to be reported, the message
lacked a space between "hello=<smtp-domain>" and "port=<smtp-server-port>".

Signed-off-by: Sylvain Rabot <sylvain@abstraction.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoblame: tolerate bogus e-mail addresses a bit better
Josh Stone [Thu, 21 Apr 2011 22:07:36 +0000 (15:07 -0700)]
blame: tolerate bogus e-mail addresses a bit better

The names and e-mails are sanitized by fmt_ident() when creating commits,
so that they do not contain "<" nor ">", and the "committer" and "author"
lines in the commit object will always be in the form:

    ("author" | "committer") name SP "<" email ">" SP timestamp SP zone

When parsing the email part out, the current code looks for SP starting
from the end of the email part, but the author could obfuscate the address
as "author at example dot com".

We should instead look for SP followed by "<", to match the logic of the
side that formats these lines.

Signed-off-by: Josh Stone <jistone@redhat.com>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agot/test-lib.sh: minor readability improvements
Mathias Lafeldt [Fri, 29 Apr 2011 12:30:30 +0000 (14:30 +0200)]
t/test-lib.sh: minor readability improvements

Apply parameter expansion. Also use here document to save
test results instead of appending each line with ">>".

Signed-off-by: Mathias Lafeldt <misfire@debugon.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agodiffcore-rename.c: avoid set-but-not-used warning
Jim Meyering [Fri, 29 Apr 2011 09:42:41 +0000 (11:42 +0200)]
diffcore-rename.c: avoid set-but-not-used warning

Since 9d8a5a5 (diffcore-rename: refactor "too many candidates" logic,
2011-01-06), diffcore_rename() initializes num_src but does not use it
anymore.  "-Wunused-but-set-variable" in gcc-4.6 complains about this.

Signed-off-by: Jim Meyering <meyering@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'jc/diff-irreversible-delete'
Junio C Hamano [Thu, 28 Apr 2011 21:11:47 +0000 (14:11 -0700)]
Merge branch 'jc/diff-irreversible-delete'

* jc/diff-irreversible-delete:
  git diff -D: omit the preimage of deletes

13 years agoMerge branch 'jc/rename-degrade-cc-to-c'
Junio C Hamano [Thu, 28 Apr 2011 21:11:43 +0000 (14:11 -0700)]
Merge branch 'jc/rename-degrade-cc-to-c'

* jc/rename-degrade-cc-to-c:
  diffcore-rename: fall back to -C when -C -C busts the rename limit
  diffcore-rename: record filepair for rename src
  diffcore-rename: refactor "too many candidates" logic
  builtin/diff.c: remove duplicated call to diff_result_code()

13 years agoMerge branch 'mz/rebase'
Junio C Hamano [Thu, 28 Apr 2011 21:11:39 +0000 (14:11 -0700)]
Merge branch 'mz/rebase'

* mz/rebase: (34 commits)
  rebase: define options in OPTIONS_SPEC
  Makefile: do not install sourced rebase scripts
  rebase: use @{upstream} if no upstream specified
  rebase -i: remove unnecessary state rebase-root
  rebase -i: don't read unused variable preserve_merges
  git-rebase--am: remove unnecessary --3way option
  rebase -m: don't print exit code 2 when merge fails
  rebase -m: remember allow_rerere_autoupdate option
  rebase: remember strategy and strategy options
  rebase: remember verbose option
  rebase: extract code for writing basic state
  rebase: factor out sub command handling
  rebase: make -v a tiny bit more verbose
  rebase -i: align variable names
  rebase: show consistent conflict resolution hint
  rebase: extract am code to new source file
  rebase: extract merge code to new source file
  rebase: remove $branch as synonym for $orig_head
  rebase -i: support --stat
  rebase: factor out call to pre-rebase hook
  ...

13 years agoMerge branch 'en/merge-recursive'
Junio C Hamano [Thu, 28 Apr 2011 21:11:35 +0000 (14:11 -0700)]
Merge branch 'en/merge-recursive'

* en/merge-recursive:
  merge-recursive: tweak magic band-aid
  merge-recursive: When we detect we can skip an update, actually skip it
  t6022: New test checking for unnecessary updates of files in D/F conflicts
  t6022: New test checking for unnecessary updates of renamed+modified files

13 years agoMerge branch 'jh/dirstat'
Junio C Hamano [Thu, 28 Apr 2011 21:11:19 +0000 (14:11 -0700)]
Merge branch 'jh/dirstat'

* jh/dirstat:
  --dirstat: In case of renames, use target filename instead of source filename
  Teach --dirstat not to completely ignore rearranged lines within a file
  --dirstat-by-file: Make it faster and more correct
  --dirstat: Describe non-obvious differences relative to --stat or regular diff

13 years agoMerge branch 'sp/maint-clear-postfields'
Junio C Hamano [Thu, 28 Apr 2011 21:10:51 +0000 (14:10 -0700)]
Merge branch 'sp/maint-clear-postfields'

* sp/maint-clear-postfields:
  http: clear POSTFIELDS when initializing a slot

13 years agohashcmp(): inline memcmp() by hand to optimize
Ingo Molnar [Thu, 28 Apr 2011 10:19:02 +0000 (12:19 +0200)]
hashcmp(): inline memcmp() by hand to optimize

This is reported to speed "git gc" by 18%.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agogit-rebase--interactive.sh: preserve-merges fails on merges created with no-ff
Andrew Wong [Thu, 28 Apr 2011 04:35:55 +0000 (00:35 -0400)]
git-rebase--interactive.sh: preserve-merges fails on merges created with no-ff

'git rebase' uses 'git merge' to preserve merges (-p).  This preserves
the original merge commit correctly, except when the original merge
commit was created by 'git merge --no-ff'.  In this case, 'git rebase'
will fail to preserve the merge, because during 'git rebase', 'git
merge' will simply fast-forward and skip the commit.  For example:

               B
              / \
             A---M
            /
    ---o---O---P---Q

If we try to rebase M onto P, we lose the merge commit and this happens:

                 A---B
                /
    ---o---O---P---Q

To correct this, we simply do a "no fast-forward" on all merge commits
when rebasing.  Since by the time we decided to do a 'git merge' inside
'git rebase', it means there was a merge originally, so 'git merge'
should always create a merge commit regardless of what the merge
branches look like. This way, when rebase M onto P from the above
example, we get:

                   B
                  / \
                 A---M
                /
    ---o---O---P---Q

Signed-off-by: Andrew Wong <andrew.kw.w@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agocompletion: remove unnecessary _get_comp_words_by_ref() invocations
SZEDER Gábor [Thu, 28 Apr 2011 16:01:52 +0000 (18:01 +0200)]
completion: remove unnecessary _get_comp_words_by_ref() invocations

In v1.7.4-rc0~11^2~2 (bash: get --pretty=m<tab> completion to work
with bash v4, 2010-12-02) we started to use _get_comp_words_by_ref()
to access completion-related variables.  That was large change, and to
make it easily reviewable, we invoked _get_comp_words_by_ref() in each
completion function and systematically replaced every occurance of
bash's completion-related variables ($COMP_WORDS and $COMP_CWORD) with
variables set by _get_comp_words_by_ref().

This has the downside that _get_comp_words_by_ref() is invoked several
times during a single completion.  The worst offender is perhaps 'git
log mas<TAB>': during the completion of 'master'
_get_comp_words_by_ref() is invoked no less than six times.

However, the variables $prev, $cword, and $words provided by
_get_comp_words_by_ref() are not modified in any of the completion
functions, and the previous commit ensures that the $cur variable is
not modified as well.  This makes it possible to invoke
_get_comp_words_by_ref() to get those variables only once in our
toplevel completion functions _git() and _gitk(), and all other
completion functions will inherit them.

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agocompletion: don't modify the $cur variable in completion functions
SZEDER Gábor [Thu, 28 Apr 2011 16:01:51 +0000 (18:01 +0200)]
completion: don't modify the $cur variable in completion functions

Since v1.7.4-rc0~11^2~2 (bash: get --pretty=m<tab> completion to work
with bash v4, 2010-12-02) we use _get_comp_words_by_ref() to access
completion-related variables, and the $cur variable holds the word
containing the current cursor position in all completion functions.
This $cur variable is left unchanged in most completion functions;
there are only four functions modifying its value, namely __gitcomp(),
__git_complete_revlist_file(), __git_complete_remote_or_refspec(), and
_git_config().

If this variable were never modified, then it would allow us a nice
optimisation and cleanup.  Therefore, this patch assigns $cur to an
other local variable and uses that for later modifications in those
four functions.

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoStart 1.7.6 cycle
Junio C Hamano [Wed, 27 Apr 2011 19:09:04 +0000 (12:09 -0700)]
Start 1.7.6 cycle

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'mg/x-years-12-months'
Junio C Hamano [Wed, 27 Apr 2011 18:36:43 +0000 (11:36 -0700)]
Merge branch 'mg/x-years-12-months'

* mg/x-years-12-months:
  date: avoid "X years, 12 months" in relative dates

13 years agoMerge branch 'cn/format-patch-quiet'
Junio C Hamano [Wed, 27 Apr 2011 18:36:43 +0000 (11:36 -0700)]
Merge branch 'cn/format-patch-quiet'

* cn/format-patch-quiet:
  format-patch: document --quiet option
  format-patch: don't pass on the --quiet flag

13 years agoMerge branch 'ef/maint-strbuf-init'
Junio C Hamano [Wed, 27 Apr 2011 18:36:43 +0000 (11:36 -0700)]
Merge branch 'ef/maint-strbuf-init'

* ef/maint-strbuf-init:
  config: support values longer than 1023 bytes
  strbuf: make sure buffer is zero-terminated

13 years agoMerge branch 'rr/doc-content-type'
Junio C Hamano [Wed, 27 Apr 2011 18:36:43 +0000 (11:36 -0700)]
Merge branch 'rr/doc-content-type'

* rr/doc-content-type:
  Documentation: Allow custom diff tools to be specified in 'diff.tool'
  Documentation: Add diff.<driver>.* to config
  Documentation: Move diff.<driver>.* from config.txt to diff-config.txt
  Documentation: Add filter.<driver>.* to config

13 years agoMerge branch 'jc/merge-dash-previous'
Junio C Hamano [Wed, 27 Apr 2011 18:36:42 +0000 (11:36 -0700)]
Merge branch 'jc/merge-dash-previous'

* jc/merge-dash-previous:
  merge: allow "-" as a short-hand for "previous branch"

13 years agoMerge branch 'dm/stash-k-i-p'
Junio C Hamano [Wed, 27 Apr 2011 18:36:42 +0000 (11:36 -0700)]
Merge branch 'dm/stash-k-i-p'

* dm/stash-k-i-p:
  stash: ensure --no-keep-index and --patch can be used in any order
  stash: add two more tests for --no-keep-index

13 years agoMerge branch 'rj/sparse'
Junio C Hamano [Wed, 27 Apr 2011 18:36:42 +0000 (11:36 -0700)]
Merge branch 'rj/sparse'

* rj/sparse:
  sparse: Fix some "symbol not declared" warnings
  sparse: Fix errors due to missing target-specific variables
  sparse: Fix an "symbol 'merge_file' not decared" warning
  sparse: Fix an "symbol 'format_subject' not declared" warning
  sparse: Fix some "Using plain integer as NULL pointer" warnings
  sparse: Fix an "symbol 'cmd_index_pack' not declared" warning
  Makefile: Use cgcc rather than sparse in the check target

13 years agoMerge branch 'jk/maint-upload-pack-shallow'
Junio C Hamano [Wed, 27 Apr 2011 18:36:42 +0000 (11:36 -0700)]
Merge branch 'jk/maint-upload-pack-shallow'

* jk/maint-upload-pack-shallow:
  upload-pack: start pack-objects before async rev-list

13 years agoMerge branch 'nk/blame-abbrev'
Junio C Hamano [Wed, 27 Apr 2011 18:36:42 +0000 (11:36 -0700)]
Merge branch 'nk/blame-abbrev'

* nk/blame-abbrev:
  blame: add --abbrev command line option and make it honor core.abbrev

13 years agoMerge branch 'jk/maint-stash-oob'
Junio C Hamano [Wed, 27 Apr 2011 18:36:42 +0000 (11:36 -0700)]
Merge branch 'jk/maint-stash-oob'

* jk/maint-stash-oob:
  stash: fix false positive in the invalid ref test.
  stash: fix accidental apply of non-existent stashes

Conflicts:
t/t3903-stash.sh

13 years agoMerge branch 'dm/color-palette'
Junio C Hamano [Wed, 27 Apr 2011 18:36:41 +0000 (11:36 -0700)]
Merge branch 'dm/color-palette'

* dm/color-palette:
  Share color list between graph and show-branch

13 years agoMerge branch 'jk/stash-loosen-safety'
Junio C Hamano [Wed, 27 Apr 2011 18:36:41 +0000 (11:36 -0700)]
Merge branch 'jk/stash-loosen-safety'

* jk/stash-loosen-safety:
  stash: drop dirty worktree check on apply

13 years agoMerge branch 'jc/pack-objects-bigfile'
Junio C Hamano [Wed, 27 Apr 2011 18:36:41 +0000 (11:36 -0700)]
Merge branch 'jc/pack-objects-bigfile'

* jc/pack-objects-bigfile:
  Teach core.bigfilethreashold to pack-objects

13 years agoMerge branch 'mh/git-svn-automkdirs'
Junio C Hamano [Wed, 27 Apr 2011 18:36:41 +0000 (11:36 -0700)]
Merge branch 'mh/git-svn-automkdirs'

* mh/git-svn-automkdirs:
  git-svn: add an option to skip the creation of empty directories

13 years agoMerge branch 'mg/reflog-with-options'
Junio C Hamano [Wed, 27 Apr 2011 18:36:41 +0000 (11:36 -0700)]
Merge branch 'mg/reflog-with-options'

* mg/reflog-with-options:
  reflog: fix overriding of command line options
  t/t1411: test reflog with formats
  builtin/log.c: separate default and setup of cmd_log_init()

13 years agoMerge branch 'ar/clean-rmdir-empty'
Junio C Hamano [Wed, 27 Apr 2011 18:36:41 +0000 (11:36 -0700)]
Merge branch 'ar/clean-rmdir-empty'

* ar/clean-rmdir-empty:
  clean: unreadable directory may still be rmdir-able if it is empty

13 years agoMerge branch 'mg/sha1-path-advise'
Junio C Hamano [Wed, 27 Apr 2011 18:36:40 +0000 (11:36 -0700)]
Merge branch 'mg/sha1-path-advise'

* mg/sha1-path-advise:
  sha1_name: Suggest commit:./file for path in subdir
  t1506: factor out test for "Did you mean..."

13 years agoconfig.txt,diff-options.txt: porcelain vs. plumbing for color.diff
Michael J Gruber [Wed, 27 Apr 2011 07:38:27 +0000 (09:38 +0200)]
config.txt,diff-options.txt: porcelain vs. plumbing for color.diff

Reading the diff-family and config man pages one may think that the
color.diff and color.ui settings apply to all diff commands. Make it
clearer that they do not apply to the plumbing variants
diff-{files,index,tree}.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agostrbuf: clarify assertion in strbuf_setlen()
René Scharfe [Wed, 27 Apr 2011 17:24:50 +0000 (19:24 +0200)]
strbuf: clarify assertion in strbuf_setlen()

Commit a8f3e2219 introduced the strbuf_grow() call to strbuf_setlen() to
make ensure that there was at least one byte available to write the
mandatory trailing NUL, even for previously unallocated strbufs.

Then b315c5c0 added strbuf_slopbuf for the same reason, only globally for
all uses of strbufs.

Thus the strbuf_grow() call can be removed now.  This avoids readers of
strbuf.h from mistakenly thinking that strbuf_setlen() can be used to
extend a strbuf.

The following assert() needs to be changed to cope with the fact that
sb->alloc can now be zero, which is OK as long as len is also zero.  As
suggested by Junio, use the chance to convert it to a die() with a short
explanatory message.  The pattern of 'die("BUG: ...")' is already used in
strbuf.c.

This was the only assert() in strbuf.[ch], so assert.h doesn't have to be
included anymore either.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agohandle_alias: provide GIT_PREFIX to !alias
Michael J Gruber [Wed, 27 Apr 2011 08:36:27 +0000 (10:36 +0200)]
handle_alias: provide GIT_PREFIX to !alias

Provide an environment variable GIT_PREFIX which contains the subdirectory
from which a !alias was called (i.e. 'git rev-parse --show-prefix') since
these cd to the to level directory before they are executed.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agot1020: test !alias in subdirectory
Michael J Gruber [Wed, 27 Apr 2011 08:36:26 +0000 (10:36 +0200)]
t1020: test !alias in subdirectory

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoAutomatically autoload bashcompinit for ZSH, when needed
Marius Storm-Olsen [Wed, 27 Apr 2011 03:23:35 +0000 (22:23 -0500)]
Automatically autoload bashcompinit for ZSH, when needed

If bashcompinit has not already been autoloaded, do so
automatically, as it is required to properly parse the
git-completion file with ZSH.

Helped-by: Felipe Contreras
Signed-off-by: Marius Storm-Olsen <mstormo@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agopretty: quote rfc822 specials in email addresses
Jeff King [Fri, 8 Apr 2011 22:40:36 +0000 (18:40 -0400)]
pretty: quote rfc822 specials in email addresses

If somebody has a name that includes an rfc822 special, we
will output it literally in the "From:" header. This is
usually OK, but certain characters (like ".") are supposed
to be enclosed in double-quotes in a mail header.

In practice, whether this matters may depend on your MUA.
Some MUAs will happily take in:

   From: Foo B. Bar <author@example.com>

without quotes, and properly quote the "." when they send
the actual mail.  Others may not, or may screw up harder
things like:

  From: Foo "The Baz" Bar <author@example.com>

For example, mutt will strip the quotes, thinking they are
actual syntactic rfc822 quotes.

So let's quote properly, and then (if necessary) we still
apply rfc2047 encoding on top of that, which should make all
MUAs happy.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agogitweb: supply '-n' to gzip for identical output
Fraser Tweedale [Tue, 26 Apr 2011 01:32:00 +0000 (11:32 +1000)]
gitweb: supply '-n' to gzip for identical output

For projects that do not release official archives, gitweb's snapshot
feature would be an excellent alternative, and but without the '-n'
('--no-name') argument, gzip includes a timestamp in output which results
in different files.  Because some systems hash/checksum downloaded files
to ensure integrity of the tarball (e.g FreeBSD), it is desirable to
produce tarballs in a reproducible way for that purpose.

Whilst '--no-name' is more descriptive, the long version of the flag is
not supported on all systems.  In particular, OpenBSD does not appear to
support it.

Supply '-n' to gzip to exclude timestamp from output and produce idential
output every time.

Signed-off-by: Fraser Tweedale <frase@frase.id.au>
Acked-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agorev-list --count: separate count for --cherry-mark
Michael J Gruber [Tue, 26 Apr 2011 08:24:29 +0000 (10:24 +0200)]
rev-list --count: separate count for --cherry-mark

When --count is used with --cherry-mark, omit the patch equivalent
commits from the count for left and right commits and print the count of
equivalent commits separately.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agogit-svn.txt: small typeface improvements
Valentin Haenel [Tue, 26 Apr 2011 11:34:19 +0000 (13:34 +0200)]
git-svn.txt: small typeface improvements

Mark subcommand names as 'subcommand' to make them stand out.

Signed-off-by: Valentin Haenel <valentin.haenel@gmx.de>
Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agogit-svn.txt: move option descriptions
Valentin Haenel [Tue, 26 Apr 2011 11:34:18 +0000 (13:34 +0200)]
git-svn.txt: move option descriptions

The options '---use-log-author' and '--add-author-from' are applicable to other
subcommands except 'fetch' -- therefore move them from the 'fetch' section to
the more general 'options' section.

Signed-off-by: Valentin Haenel <valentin.haenel@gmx.de>
Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agogit-svn.txt: fix usage of --add-author-from
Valentin Haenel [Mon, 25 Apr 2011 21:36:15 +0000 (23:36 +0200)]
git-svn.txt: fix usage of --add-author-from

The option '--add-author-from' is used in 'commit-diff', 'set-tree', and
'dcommit' subcommands.

Signed-off-by: Valentin Haenel <valentin.haenel@gmx.de>
Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agot/README: unify documentation of test function args
Mathias Lafeldt [Tue, 26 Apr 2011 10:33:26 +0000 (12:33 +0200)]
t/README: unify documentation of test function args

Document all test function arguments in the same way.

While at it, tweak the description of test_path_is_* (thanks to Junio),
and correct some grammatical errors.

Signed-off-by: Mathias Lafeldt <misfire@debugon.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agohttp: clear POSTFIELDS when initializing a slot
Junio C Hamano [Tue, 26 Apr 2011 15:04:49 +0000 (08:04 -0700)]
http: clear POSTFIELDS when initializing a slot

After posting a short request using CURLOPT_POSTFIELDS, if the slot
is reused for posting a large payload, the slot ends up having both
POSTFIELDS (which now points at a random garbage) and READFUNCTION,
in which case the curl library tries to use the stale POSTFIELDS.

Clear it as part of the general slot initialization in get_active_slot().

Heavylifting-by: Shawn Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Acked-by: Shawn Pearce <spearce@spearce.org>
13 years agoGit 1.7.5 v1.7.5
Junio C Hamano [Sun, 24 Apr 2011 06:36:32 +0000 (23:36 -0700)]
Git 1.7.5

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agodiff-files: show unmerged entries correctly
Junio C Hamano [Fri, 22 Apr 2011 23:19:27 +0000 (16:19 -0700)]
diff-files: show unmerged entries correctly

Earlier, e9c8409 (diff-index --cached --raw: show tree entry on the LHS
for unmerged entries., 2007-01-05) taught the command to show the object
name and the mode from the entry coming from the tree side when comparing
a tree with an unmerged index.

This is a belated companion patch that teaches diff-files to show the mode
from the entry coming from the working tree side, when comparing an
unmerged index and the working tree.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agodiff: remove often unused parameters from diff_unmerge()
Junio C Hamano [Fri, 22 Apr 2011 23:05:58 +0000 (16:05 -0700)]
diff: remove often unused parameters from diff_unmerge()

e9c8409 (diff-index --cached --raw: show tree entry on the LHS for
unmerged entries., 2007-01-05) added a <mode, object name> pair as
parameters to this function, to store them in the pre-image side of an
unmerged file pair.  Now the function is fixed to return the filepair it
queued, we can make the caller on the special case codepath to do so.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agodiff.c: return filepair from diff_unmerge()
Junio C Hamano [Fri, 22 Apr 2011 22:55:55 +0000 (15:55 -0700)]
diff.c: return filepair from diff_unmerge()

The underlying diff_queue() returns diff_filepair so that the caller can
further add information to it, and the helper function diff_unmerge()
utilizes the feature itself, but does not expose it to its callers, which
was kind of selfish.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agotest: use $_z40 from test-lib
Junio C Hamano [Sun, 24 Apr 2011 05:34:13 +0000 (22:34 -0700)]
test: use $_z40 from test-lib

There is no need to duplicate the definition of $_z40 and $_x40 that
test-lib.sh supplies the test scripts.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agosparse: Fix some "symbol not declared" warnings
Ramsay Jones [Thu, 7 Apr 2011 18:49:33 +0000 (19:49 +0100)]
sparse: Fix some "symbol not declared" warnings

In particular, sparse issues the "symbol 'a_symbol' was not declared.
Should it be static?" warnings for the following symbols:

    attr.c:468:12: 'git_etc_gitattributes'
    attr.c:476:5:  'git_attr_system'
    vcs-svn/svndump.c:282:6: 'svndump_read'
    vcs-svn/svndump.c:417:5: 'svndump_init'
    vcs-svn/svndump.c:432:6: 'svndump_deinit'
    vcs-svn/svndump.c:445:6: 'svndump_reset'

The symbols in attr.c only require file scope, so we add the static
modifier to their declaration.

The symbols in vcs-svn/svndump.c are external symbols, and they
already have extern declarations in the "svndump.h" header file,
so we simply include the header in svndump.c.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agosparse: Fix errors due to missing target-specific variables
Ramsay Jones [Thu, 21 Apr 2011 19:14:42 +0000 (20:14 +0100)]
sparse: Fix errors due to missing target-specific variables

In particular, sparse issues the following errors:

    attr.c:472:43: error: undefined identifier 'ETC_GITATTRIBUTES'
    config.c:821:43: error: undefined identifier 'ETC_GITCONFIG'
    exec_cmd.c:14:37: error: undefined identifier 'PREFIX'
    exec_cmd.c:83:28: error: undefined identifier 'GIT_EXEC_PATH'
    builtin/help.c:328:46: error: undefined identifier 'GIT_MAN_PATH'
    builtin/help.c:374:40: error: undefined identifier 'GIT_INFO_PATH'
    builtin/help.c:382:45: error: undefined identifier 'GIT_HTML_PATH'
    git.c:96:42: error: undefined identifier 'GIT_HTML_PATH'
    git.c:241:35: error: invalid initializer
    http.c:293:43: error: undefined identifier 'GIT_HTTP_USER_AGENT'

which is caused by not passing the target-specific additions to
the EXTRA_CPPFLAGS variable to cgcc.

In order to fix the problem, we define a new sparse target which
depends on a set of non-existent "sparse object" files (*.sp)
which correspond to the set of C source files. In addition to the
new target, we also provide a new pattern rule for "creating" the
sparse object files from the source files by running cgcc.  This
allows us to add '*.sp' to the rules setting the target-specific
EXTRA_CPPFLAGS variable, which is then included in the new pattern
rule to run cgcc.

Also, we change the 'check' target to re-direct the user to the
new sparse target.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agodate: avoid "X years, 12 months" in relative dates
Michael J Gruber [Wed, 20 Apr 2011 09:12:11 +0000 (11:12 +0200)]
date: avoid "X years, 12 months" in relative dates

When relative dates are more than about a year ago, we start
writing them as "Y years, M months".  At the point where we
calculate Y and M, we have the time delta specified as a
number of days. We calculate these integers as:

  Y = days / 365
  M = (days % 365 + 15) / 30

This rounds days in the latter half of a month up to the
nearest month, so that day 16 is "1 month" (or day 381 is "1
year, 1 month").

We don't round the year at all, though, meaning we can end
up with "1 year, 12 months", which is silly; it should just
be "2 years".

Implement this differently with months of size

  onemonth = 365/12

so that

  totalmonths = (long)( (days + onemonth/2)/onemonth )
  years = totalmonths / 12
  months = totalmonths % 12

In order to do this without floats, we write the first formula as

  totalmonths = (days*12*2 + 365) / (365*2)

Tests and inspiration by Jeff King.

Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agorun-command: handle short writes and EINTR in die_child
Jonathan Nieder [Wed, 20 Apr 2011 10:40:05 +0000 (05:40 -0500)]
run-command: handle short writes and EINTR in die_child

If start_command fails after forking and before exec finishes, there
is not much use in noticing an I/O error on top of that.
finish_command will notice that the child exited with nonzero status
anyway.  So as noted in v1.7.0.3~20^2 (run-command.c: fix build
warnings on Ubuntu, 2010-01-30) and v1.7.5-rc0~29^2 (2011-03-16), it
is safe to ignore errors from write in this codepath.

Even so, the result from write contains useful information: it tells
us if the write was cancelled by a signal (EINTR) or was only
partially completed (e.g., when writing to an almost-full pipe).
Let's use write_in_full to loop until the desired number of bytes have
been written (still ignoring errors if that fails).

As a happy side effect, the assignment to a dummy variable to appease
gcc -D_FORTIFY_SOURCE is no longer needed.  xwrite and write_in_full
check the return value from write(2).

Noticed with gcc -Wunused-but-set-variable.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agotests: check error message from run_command
Jonathan Nieder [Wed, 20 Apr 2011 10:35:08 +0000 (05:35 -0500)]
tests: check error message from run_command

In git versions starting at v1.7.5-rc0~29^2 until v1.7.5-rc3~2 (Revert
"run-command: prettify -D_FORTIFY_SOURCE workaround", 2011-04-18)
fixed it, the run_command facility would write a truncated error
message when the command is present but cannot be executed for some
other reason.  For example, if I add a 'hello' command to git:

$ echo 'echo hello' >git-hello
$ chmod +x git-hello
$ PATH=.:$PATH git hello
hello

and make it non-executable, this is what I normally get:

$ chmod -x git-hello
$ git hello
fatal: cannot exec 'git-hello': Permission denied

But with the problematic versions, we get disturbing output:

$ PATH=.:$PATH git hello
fatal: $

Add some tests to make sure it doesn't happen again.

The hello-script used in these tests uses cat instead of echo because
on Windows the bash spawned by git converts LF to CRLF in text written
by echo while the bash running tests does not, causing the test to
fail if "echo" is used.  Thanks to Hannes for noticing.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Improved-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoGit 1.7.5-rc3 v1.7.5-rc3
Junio C Hamano [Tue, 19 Apr 2011 18:51:00 +0000 (11:51 -0700)]
Git 1.7.5-rc3

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoSync with 1.7.4.5
Junio C Hamano [Tue, 19 Apr 2011 18:49:13 +0000 (11:49 -0700)]
Sync with 1.7.4.5

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoGit 1.7.4.5 v1.7.4.5
Junio C Hamano [Tue, 19 Apr 2011 18:45:38 +0000 (11:45 -0700)]
Git 1.7.4.5

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoremove noise and inaccuracies from git-svn docs
Stefan Sperling [Tue, 19 Apr 2011 09:06:46 +0000 (11:06 +0200)]
remove noise and inaccuracies from git-svn docs

Signed-off-by: Stefan Sperling <stsp@stsp.name>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoDocumentation/format-patch: suggest Toggle Word Wrap add-on for Thunderbird
Johannes Sixt [Mon, 18 Apr 2011 06:31:16 +0000 (08:31 +0200)]
Documentation/format-patch: suggest Toggle Word Wrap add-on for Thunderbird

Of the (now) three methods to send unmangled patches using Thunderbird,
this method is listed first because it provides a single-click on-demand
option rather than a permanent change of configuration like the other
two methods.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agogit-svn.txt: Document --mergeinfo
Michael J Gruber [Tue, 19 Apr 2011 12:24:27 +0000 (14:24 +0200)]
git-svn.txt: Document --mergeinfo

6abd933 (git-svn: allow the mergeinfo property to be set, 2010-09-24)
introduced the --mergeinfo option. Document it.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoRevert "run-command: prettify -D_FORTIFY_SOURCE workaround"
Junio C Hamano [Mon, 18 Apr 2011 21:14:53 +0000 (14:14 -0700)]
Revert "run-command: prettify -D_FORTIFY_SOURCE workaround"

This reverts commit ebec842773932e6f853acac70c80f84209b5f83e, which
somehow mistakenly thought that any non-zero return from write(2) is
an error.

13 years agodoc: Clarify that "cherry-pick -x" does not use "git notes"
Sebastian Schuberth [Fri, 15 Apr 2011 17:53:51 +0000 (19:53 +0200)]
doc: Clarify that "cherry-pick -x" does not use "git notes"

The documentation for "cherry-pick -x" could be misread in the way that a
"git notes" object is attached to the new commit, which is not the case.

Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoDocumentation: publicize hints for sending patches with GMail
Jonathan Nieder [Fri, 15 Apr 2011 02:33:57 +0000 (21:33 -0500)]
Documentation: publicize hints for sending patches with GMail

The hints in SubmittingPatches about stopping GMail from clobbering
patches are widely useful both as examples of "git send-email" and
"git imap-send" usage.

Move the documentation to the appropriate places.

While at it, don't encourage storing passwords in config files.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoDocumentation: publicize KMail hints for sending patches inline
Jonathan Nieder [Fri, 15 Apr 2011 02:32:55 +0000 (21:32 -0500)]
Documentation: publicize KMail hints for sending patches inline

These hints are in git's private SubmittingPatches document but a
wider audience might be interested.  Move them to the "git
format-patch" manpage.

I'm not sure what gotchas these hints are meant to work around.
They might be completely false.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoDocumentation: hints for sending patches inline with Thunderbird
Jonathan Nieder [Fri, 15 Apr 2011 02:28:06 +0000 (21:28 -0500)]
Documentation: hints for sending patches inline with Thunderbird

The standard reference for this information is the article
"Plain text e-mail - Thunderbird#Completely_plain_email" at
kb.mozillazine.org, but the hints hidden away in git's
SubmittingPatches file are more complete.  Move them to the
"git format-patch" manual so they can be installed with git and
read by a wide audience.

While at it, make some tweaks:

 - update "Approach #1" so it might work with Thunderbird 3;
 - remove ancient version numbers from the descriptions of both
   approaches so current readers might have more reason to
   complain if they don't work.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoDocumentation: explain how to check for patch corruption
Jonathan Nieder [Fri, 15 Apr 2011 02:24:01 +0000 (21:24 -0500)]
Documentation: explain how to check for patch corruption

SubmittingPatches has some excellent advice about how to check a patch
for corruption before sending it off.  Move it to the format-patch
manual so it can be installed with git's documentation for use by
people not necessarily interested in the git project's practices.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge v1.7.5-rc2 into jn/format-patch-doc
Junio C Hamano [Fri, 15 Apr 2011 20:25:50 +0000 (13:25 -0700)]
Merge v1.7.5-rc2 into jn/format-patch-doc

This is to sync with the recent updates in Documentation/SubmittingPatches
and Documentation/format-patch.txt

13 years agoDocumentation: describe the format of messages with inline patches
Jonathan Nieder [Fri, 15 Apr 2011 02:22:02 +0000 (21:22 -0500)]
Documentation: describe the format of messages with inline patches

Add a DISCUSSION section to the "git format-patch" manual to encourage
people to send patches in a form that can be applied by "git am"
automatically.  There are two such forms:

 1. The default form in which most metadata goes in the mail header
    and the message body starts with the patch description;

 2. The snipsnip form in which a message starts with pertinent
    discussion and ends with a patch after a "scissors" mark.

The example requires QP encoding in the "Subject:" header intended for
the mailer to give the reader a chance to reflect on that, rather than
being startled by it later.  By contrast, in-body "From:" and
"Subject:" lines should be human-readable and not QP encoded.

Inspired-by: Jim Meyering <jim@meyering.net>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Improved-by: Junio C Hamano <gitster@pobox.com>
Improved-by: Drew Northup <drew.northup@maine.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoRestructure documentation for git-merge-base.
Jonathan Nieder [Fri, 15 Apr 2011 08:38:55 +0000 (10:38 +0200)]
Restructure documentation for git-merge-base.

Restructure the text of git-merge-base to better explain more clearly
the different modes of operation.

Signed-off-by: Vincent van Ravesteijn <vfr@lyx.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoDocumentation: update to git-merge-base --octopus
Vincent van Ravesteijn [Fri, 15 Apr 2011 08:34:03 +0000 (10:34 +0200)]
Documentation: update to git-merge-base --octopus

Unlike plain merge-base, merge-base --octopus only requires at least one
commit argument; update the synopsis to reflect that.

Add a sentence to the discussion that when --octopus is used, we do expect
'2' (the common ansestor across all) as the result.

Signed-off-by: Vincent van Ravesteijn <vfr@lyx.org>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoformat-patch: wrap email addresses after long names
Jeff King [Thu, 14 Apr 2011 22:18:09 +0000 (18:18 -0400)]
format-patch: wrap email addresses after long names

We already wrap names in "from" headers, which tend to be
the long part of an address. But it's also possible for a
long name to not be wrapped, but to make us want to wrap the
email address. For example (imagine for the sake of
readability we want to wrap at 50 characters instead of 78):

  From: this is my really long git name <foo@example.com>

The name does not overflow the line, but the name and email
together do. So we would rather see:

  From: this is my really long git name
    <git@example.com>

Because we wrap the name separately during add_rfc2047, we
neglected this case. Instead, we should see how long the
final line of the wrapped name ended up, and decide whether
or not to wrap based on that. We can't break the address
into multiple parts, so we either leave it with the name, or
put it by itself on a line.

Test by Erik Faye-Lund.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoi18n: use test_i18n{cmp,grep} in t7600, t7607, t7611 and t7811
Junio C Hamano [Thu, 14 Apr 2011 21:36:14 +0000 (14:36 -0700)]
i18n: use test_i18n{cmp,grep} in t7600, t7607, t7611 and t7811

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoi18n: use test_i18n{grep,cmp} in t7508
Junio C Hamano [Thu, 14 Apr 2011 20:56:14 +0000 (13:56 -0700)]
i18n: use test_i18n{grep,cmp} in t7508

Two tests looked for "[Uu]sage" in the output, but we cannot expect the
l10n to use that phrase.  Mark them with test_i18ngrep so that in later
versions we can test truly localized versions with the same tests, not
just GETTEXT_POISON that happens to keep the original string in the
output.

Merge a few tests that were artificially split into "do" and "test output
under C_LOCALE_OUTPUT" in the original i18n patches back.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoi18n: use test_i18ngrep in t7506
Junio C Hamano [Thu, 14 Apr 2011 20:37:54 +0000 (13:37 -0700)]
i18n: use test_i18ngrep in t7506

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'maint'
Junio C Hamano [Thu, 14 Apr 2011 19:26:45 +0000 (12:26 -0700)]
Merge branch 'maint'

* maint:
  archive: document limitation of tar.umask config setting
  t3306,t5304: avoid clock skew issues
  git.txt: fix list continuation

13 years agocontrib/completion: --notes, --no-notes
Michael J Gruber [Thu, 14 Apr 2011 17:53:13 +0000 (19:53 +0200)]
contrib/completion: --notes, --no-notes

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoarchive: document limitation of tar.umask config setting
René Scharfe [Thu, 14 Apr 2011 18:04:57 +0000 (20:04 +0200)]
archive: document limitation of tar.umask config setting

The local value of the config variable tar.umask is not passed to the
other side with --remote.  We may want to change that, but for now just
document this fact.

Reported-by: Jacek Masiulaniec <jacek.masiulaniec@gmail.com>
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agot3306,t5304: avoid clock skew issues
Michael J Gruber [Thu, 14 Apr 2011 17:38:13 +0000 (19:38 +0200)]
t3306,t5304: avoid clock skew issues

On systems where the local time and file modification time may be out of
sync (e.g. test directory on NFS) t3306 and t5305 can fail because prune
compares times such as "now" (client time) with file modification times
(server times for remote file systems). I.e., these are spurious test
failures.

Avoid this by setting the relevant modification times to the local time.

Noticed on a system with as little as 2s time skew.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agogit.txt: fix list continuation
Michael J Gruber [Thu, 14 Apr 2011 07:17:26 +0000 (09:17 +0200)]
git.txt: fix list continuation

Remove a spurious empty line which prevented asciidoc from recognizing a
list continuation mark ('+'), so that it does not get output literally any
more.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoi18n: use test_i18ngrep and test_i18ncmp in t7502
Junio C Hamano [Wed, 13 Apr 2011 23:17:50 +0000 (16:17 -0700)]
i18n: use test_i18ngrep and test_i18ncmp in t7502

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoi18n: use test_i18ngrep in t7501
Junio C Hamano [Wed, 13 Apr 2011 23:17:29 +0000 (16:17 -0700)]
i18n: use test_i18ngrep in t7501

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoi18n: use test_i18ncmp in t7500
Junio C Hamano [Tue, 12 Apr 2011 23:48:35 +0000 (16:48 -0700)]
i18n: use test_i18ncmp in t7500

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoi18n: use test_i18ngrep in t7201
Junio C Hamano [Tue, 12 Apr 2011 23:39:14 +0000 (16:39 -0700)]
i18n: use test_i18ngrep in t7201

Some test were mistakenly disabled under GETTEXT_POISON as well,
and they have been resurrected.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoi18n: use test_i18ncmp and test_i18ngrep in t7102 and t7110
Junio C Hamano [Tue, 12 Apr 2011 23:36:18 +0000 (16:36 -0700)]
i18n: use test_i18ncmp and test_i18ngrep in t7102 and t7110

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoi18n: use test_i18ncmp and test_i18ngrep in t5541, t6040, t6120, t7004, t7012 and...
Junio C Hamano [Tue, 12 Apr 2011 23:33:39 +0000 (16:33 -0700)]
i18n: use test_i18ncmp and test_i18ngrep in t5541, t6040, t6120, t7004, t7012 and t7060

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoi18n: use test_i18ncmp and test_i18ngrep in t3700, t4001 and t4014
Junio C Hamano [Tue, 12 Apr 2011 23:27:11 +0000 (16:27 -0700)]
i18n: use test_i18ncmp and test_i18ngrep in t3700, t4001 and t4014

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoi18n: use test_i18ncmp and test_i18ngrep in t3203, t3501 and t3507
Junio C Hamano [Tue, 12 Apr 2011 23:23:01 +0000 (16:23 -0700)]
i18n: use test_i18ncmp and test_i18ngrep in t3203, t3501 and t3507

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoi18n: use test_i18ngrep in t2020, t2204, t3030, and t3200
Junio C Hamano [Tue, 12 Apr 2011 23:20:32 +0000 (16:20 -0700)]
i18n: use test_i18ngrep in t2020, t2204, t3030, and t3200

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoi18n: use test_i18ngrep in lib-httpd and t2019
Junio C Hamano [Tue, 12 Apr 2011 23:12:47 +0000 (16:12 -0700)]
i18n: use test_i18ngrep in lib-httpd and t2019

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoi18n: do not overuse C_LOCALE_OUTPUT (grep)
Junio C Hamano [Tue, 12 Apr 2011 22:57:08 +0000 (15:57 -0700)]
i18n: do not overuse C_LOCALE_OUTPUT (grep)

Instead of skipping the whole test, introduce test_i18ngrep wrapper that
pretends a successful result under GETTEXT_POISON build.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoi18n: use test_i18ncmp in t1200 and t2200
Junio C Hamano [Tue, 12 Apr 2011 22:50:55 +0000 (15:50 -0700)]
i18n: use test_i18ncmp in t1200 and t2200

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoi18n: .git file is not a human readable message (t5601)
Junio C Hamano [Tue, 12 Apr 2011 23:29:19 +0000 (16:29 -0700)]
i18n: .git file is not a human readable message (t5601)

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoGit 1.7.5-rc2 v1.7.5-rc2
Junio C Hamano [Wed, 13 Apr 2011 21:01:03 +0000 (14:01 -0700)]
Git 1.7.5-rc2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'maint'
Junio C Hamano [Wed, 13 Apr 2011 20:59:19 +0000 (13:59 -0700)]
Merge branch 'maint'

* maint:

13 years agoMerge branch 'jc/rev-list-options-fix' into maint
Junio C Hamano [Wed, 13 Apr 2011 20:56:52 +0000 (13:56 -0700)]
Merge branch 'jc/rev-list-options-fix' into maint

* jc/rev-list-options-fix:
  "log --cherry-pick" documentation regression fix

13 years agoMerge branch 'js/checkout-untracked-symlink' into maint
Junio C Hamano [Wed, 13 Apr 2011 20:55:53 +0000 (13:55 -0700)]
Merge branch 'js/checkout-untracked-symlink' into maint

* js/checkout-untracked-symlink:
  t2021: mark a test as fixed

13 years agomergetool: Teach about submodules
Jonathon Mah [Wed, 13 Apr 2011 10:00:48 +0000 (03:00 -0700)]
mergetool: Teach about submodules

When the index has conflicted submodules, mergetool used to mildly
clobber the module, renaming it to mymodule.BACKUP.nnnn, then failing to
copy it non-recursively.

Recognize submodules and offer a resolution instead:

  Submodule merge conflict for 'Shared':
    {local}: submodule commit ad9f12e3e6205381bf2163a793d1e596a9e211d0
    {remote}: submodule commit f5893fb70ec5646efcd9aa643c5136753ac89253
  Use (l)ocal or (r)emote, or (a)bort?

Selecting a commit will stage it, but not update the submodule (as git
does had there been no conflict). Type changes are also supported,
should the path be a submodule on one side, and a file, symlink,
directory, or deleted on the other.

Signed-off-by: Jonathon Mah <me@JonathonMah.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoremove doubled words, e.g., s/to to/to/, and fix related typos
Jim Meyering [Wed, 13 Apr 2011 15:39:40 +0000 (17:39 +0200)]
remove doubled words, e.g., s/to to/to/, and fix related typos

I found that some doubled words had snuck back into projects from which
I'd already removed them, so now there's a "syntax-check" makefile rule in
gnulib to help prevent recurrence.

Running the command below spotted a few in git, too:

  git ls-files | xargs perl -0777 -n \
    -e 'while (/\b(then?|[iao]n|i[fst]|but|f?or|at|and|[dt])\s+\1\b/gims)' \
    -e '{$n=($` =~ tr/\n/\n/ + 1); ($v=$&)=~s/\n/\\n/g;' \
    -e 'print "$ARGV:$n:$v\n"}'

Signed-off-by: Jim Meyering <meyering@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agorevert: Hide '-r' option in default usage
Ramkumar Ramachandra [Sun, 10 Apr 2011 15:39:14 +0000 (21:09 +0530)]
revert: Hide '-r' option in default usage

The '-r' command-line option is a no-op provided only for backward
compatiblity since abd6970 (cherry-pick: make -r the default, 2006-10-05),
and somehow ended up surviving across reimplementation in C at 9509af6
(Make git-revert & git-cherry-pick a builtin, 2007-03-01) and another
rewrite of the command line parser at f810379 (Make builtin-revert.c use
parse_options, 2007-10-07).  We should have stopped advertising the option
long time ago.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>