Commit graph

6385 commits

Author SHA1 Message Date
Junio C Hamano 77f3591dbb Merge branch 'pw/git-p4-move'
* pw/git-p4-move:
  git p4: add support for 'p4 move' in P4Submit
  git p4: refactor diffOpts calculation
2012-07-15 21:38:32 -07:00
Junio C Hamano 48c42ff662 Sixth batch for 1.7.12
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-13 15:48:50 -07:00
Junio C Hamano b856ad623e Merge branch 'tb/sanitize-decomposed-utf-8-pathname'
Teaches git to normalize pathnames read from readdir(3) and all
arguments from the command line into precomposed UTF-8 (assuming
that they come as decomposed UTF-8) to work around issues on Mac OS.

I think there still are other places that need conversion
(e.g. paths that are read from stdin for some commands), but this
should be a good first step in the right direction.

* tb/sanitize-decomposed-utf-8-pathname:
  git on Mac OS and precomposed unicode
2012-07-13 15:37:51 -07:00
Junio C Hamano 2b53359290 Reduce draft release notes to 1.7.12
Many "fixes since 1.7.11" items are now in the maintenance track

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-11 13:48:57 -07:00
Junio C Hamano d5c771e234 Sync with 1.7.11.2 2012-07-11 13:00:51 -07:00
Junio C Hamano 8d141a1d56 Git 1.7.11.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-11 12:59:41 -07:00
Junio C Hamano a0ceb72f38 Merge branch 'cn/cherry-pick-range-docs' into maint
The documentation for "git cherry-pick A B..C" was misleading.

* cn/cherry-pick-range-docs:
  git-cherry-pick.txt: clarify the use of revision range notation
  Documentation: --no-walk is no-op if range is specified
2012-07-11 12:45:34 -07:00
Junio C Hamano 2a4dd9333b Fifth batch for 1.7.12
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-09 09:49:44 -07:00
Junio C Hamano ee02c2ab37 Merge branch 'mm/credential-plumbing'
Expose the credential API to scripted Porcelain writers.

* mm/credential-plumbing:
  git-remote-mediawiki: update comments to reflect credential support
  git-remote-mediawiki: add credential support
  git credential fill: output the whole 'struct credential'
  add 'git credential' plumbing command
2012-07-09 09:01:45 -07:00
Junio C Hamano d02d7ac303 Merge branch 'mm/config-xdg'
Teach git to read various information from $XDG_CONFIG_HOME/git/ to allow
the user to avoid cluttering $HOME.

* mm/config-xdg:
  config: write to $XDG_CONFIG_HOME/git/config file when appropriate
  Let core.attributesfile default to $XDG_CONFIG_HOME/git/attributes
  Let core.excludesfile default to $XDG_CONFIG_HOME/git/ignore
  config: read (but not write) from $XDG_CONFIG_HOME/git/config file
2012-07-09 09:00:36 -07:00
Torsten Bögershausen 76759c7dff git on Mac OS and precomposed unicode
Mac OS X mangles file names containing unicode on file systems HFS+,
VFAT or SAMBA.  When a file using unicode code points outside ASCII
is created on a HFS+ drive, the file name is converted into
decomposed unicode and written to disk. No conversion is done if
the file name is already decomposed unicode.

Calling open("\xc3\x84", ...) with a precomposed "Ä" yields the same
result as open("\x41\xcc\x88",...) with a decomposed "Ä".

As a consequence, readdir() returns the file names in decomposed
unicode, even if the user expects precomposed unicode.  Unlike on
HFS+, Mac OS X stores files on a VFAT drive (e.g. an USB drive) in
precomposed unicode, but readdir() still returns file names in
decomposed unicode.  When a git repository is stored on a network
share using SAMBA, file names are send over the wire and written to
disk on the remote system in precomposed unicode, but Mac OS X
readdir() returns decomposed unicode to be compatible with its
behaviour on HFS+ and VFAT.

The unicode decomposition causes many problems:

- The names "git add" and other commands get from the end user may
  often be precomposed form (the decomposed form is not easily input
  from the keyboard), but when the commands read from the filesystem
  to see what it is going to update the index with already is on the
  filesystem, readdir() will give decomposed form, which is different.

- Similarly "git log", "git mv" and all other commands that need to
  compare pathnames found on the command line (often but not always
  precomposed form; a command line input resulting from globbing may
  be in decomposed) with pathnames found in the tree objects (should
  be precomposed form to be compatible with other systems and for
  consistency in general).

- The same for names stored in the index, which should be
  precomposed, that may need to be compared with the names read from
  readdir().

NFS mounted from Linux is fully transparent and does not suffer from
the above.

As Mac OS X treats precomposed and decomposed file names as equal,
we can

 - wrap readdir() on Mac OS X to return the precomposed form, and

 - normalize decomposed form given from the command line also to the
   precomposed form,

to ensure that all pathnames used in Git are always in the
precomposed form.  This behaviour can be requested by setting
"core.precomposedunicode" configuration variable to true.

The code in compat/precomposed_utf8.c implements basically 4 new
functions: precomposed_utf8_opendir(), precomposed_utf8_readdir(),
precomposed_utf8_closedir() and precompose_argv().  The first three
are to wrap opendir(3), readdir(3), and closedir(3) functions.

The argv[] conversion allows to use the TAB filename completion done
by the shell on command line.  It tolerates other tools which use
readdir() to feed decomposed file names into git.

When creating a new git repository with "git init" or "git clone",
"core.precomposedunicode" will be set "false".

The user needs to activate this feature manually.  She typically
sets core.precomposedunicode to "true" on HFS and VFAT, or file
systems mounted via SAMBA.

Helped-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-08 22:03:46 -07:00
Gary Gibbons 84cb00036f git p4: refactor diffOpts calculation
P4Submit.applyCommit()

To avoid recalculating the same diffOpts for each commit, move it
out of applyCommit() and into the top-level run().  Also fix a bug
in that code which interpreted the value of detectRenames as a
string rather than as a boolean.

[pw: fix documentation, rearrange code a bit]

Signed-off-by: Gary Gibbons <ggibbons@perforce.com>
Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-05 23:23:28 -07:00
Junio C Hamano 8228a23b35 Fourth batch for 1.7.12
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-04 23:48:37 -07:00
Andreas Schwab b12905140a Fix formatting in git-config(1)
This fixes two formatting bugs in the git-config documentation:

- in the column.ui entry don't indent the last paragraph so that it isn't
  formatted as a literal paragraph
- in the push.default entry separate the last paragraph from the
  nested list.

Signed-off-by: Andreas Schwab <schwab@linux-m68k.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-03 12:13:19 -07:00
Junio C Hamano e7b44f182b Third batch for 1.7.12
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-06-28 15:35:37 -07:00
Junio C Hamano 30e8e6fdea Merge branch 'lk/more-helpful-status-hints'
Give finer classification to various states of paths in conflicted
state and offer advice messages in the "git status" output.
2012-06-28 15:20:35 -07:00
Junio C Hamano fbc9724188 Merge branch 'lk/rebase-i-x'
Teach "-x <cmd>" to "rebase -i" to insert "exec <cmd>" after each
commit in the resulting history.
2012-06-28 15:20:23 -07:00
Matthieu Moy 2d6dc182b8 git credential fill: output the whole 'struct credential'
Instead of outputing only the username and password, print all the
attributes, even those that already appeared in the input.

This is closer to what the C API does, and allows one to take the exact
output of "git credential fill" as input to "git credential approve" or
"git credential reject".

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-06-25 11:56:24 -07:00
Javier Roucher Iglesias e30b2feb1b add 'git credential' plumbing command
The credential API is in C, and not available to scripting languages.
Expose the functionalities of the API by wrapping them into a new
plumbing command "git credentials".

In other words, replace the internal "test-credential" by an official Git
command.

Most documentation writen by: Jeff King <peff@peff.net>
Signed-off-by: Pavel Volek <Pavel.Volek@ensimag.imag.fr>
Signed-off-by: Kim Thuat Nguyen <Kim-Thuat.Nguyen@ensimag.imag.fr>
Signed-off-by: Javier Roucher Iglesias <Javier.Roucher-Iglesias@ensimag.imag.fr>
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-06-25 11:55:51 -07:00
Junio C Hamano bc9e7dd41f Second batch for 1.7.12
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-06-25 11:31:07 -07:00
Junio C Hamano a913b56fcb Merge branch 'cn/cherry-pick-range-docs'
The command line argument of "git cherry-pick maint master..next" is
just an ordinary revision range, which is unintuitive and at least
deserves documentation.

* cn/cherry-pick-range-docs:
  git-cherry-pick.txt: clarify the use of revision range notation
  Documentation: --no-walk is no-op if range is specified
2012-06-25 11:25:38 -07:00
Junio C Hamano 45362148fa Merge branch 'rr/doc-commit'
* rr/doc-commit:
  commit: document a couple of options
2012-06-25 11:24:42 -07:00
Junio C Hamano 10fcd5194f Merge branch 'jk/no-more-asciidoc7'
We no longer use AsciiDoc7 syntax in our documentation and favor a
more modern style.

* jk/no-more-asciidoc7:
  docs: drop antique comment from Makefile
  docs: drop asciidoc7compatible flag
2012-06-25 11:24:10 -07:00
Huynh Khoi Nguyen Nguyen 0e8593dc5b config: write to $XDG_CONFIG_HOME/git/config file when appropriate
Teach git to write to $XDG_CONFIG_HOME/git/config if

 - it already exists,
 - $HOME/.gitconfig file doesn't, and
 - The --global option is used.

Otherwise, write to $HOME/.gitconfig when the --global option is
given, as before.

If the user doesn't create $XDG_CONFIG_HOME/git/config, there is
absolutely no change. Users can use this new file only if they want.

If $XDG_CONFIG_HOME is either not set or empty, $HOME/.config/git/config
will be used.

Advice for users who often come back to an old version of Git: you
shouldn't create this file.

Signed-off-by: Huynh Khoi Nguyen Nguyen <Huynh-Khoi-Nguyen.Nguyen@ensimag.imag.fr>
Signed-off-by: Valentin Duperray <Valentin.Duperray@ensimag.imag.fr>
Signed-off-by: Franck Jonas <Franck.Jonas@ensimag.imag.fr>
Signed-off-by: Lucien Kong <Lucien.Kong@ensimag.imag.fr>
Signed-off-by: Thomas Nguy <Thomas.Nguy@ensimag.imag.fr>
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-06-25 09:06:15 -07:00
Huynh Khoi Nguyen Nguyen 684e40f657 Let core.attributesfile default to $XDG_CONFIG_HOME/git/attributes
This gives the default value for the core.attributesfile variable
following the exact same logic of the previous change for the
core.excludesfile setting.

Signed-off-by: Huynh Khoi Nguyen Nguyen <Huynh-Khoi-Nguyen.Nguyen@ensimag.imag.fr>
Signed-off-by: Valentin Duperray <Valentin.Duperray@ensimag.imag.fr>
Signed-off-by: Franck Jonas <Franck.Jonas@ensimag.imag.fr>
Signed-off-by: Lucien Kong <Lucien.Kong@ensimag.imag.fr>
Signed-off-by: Thomas Nguy <Thomas.Nguy@ensimag.imag.fr>
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-06-25 09:06:15 -07:00
Huynh Khoi Nguyen Nguyen dc79687e0b Let core.excludesfile default to $XDG_CONFIG_HOME/git/ignore
To use the feature of core.excludesfile, the user needs:

 1. to create such a file,

 2. and add configuration variable to point at it.

Instead, we can make this a one-step process by choosing a default value
which points to a filename in the user's $HOME, that is unlikely to
already exist on the system, and only use the presence of the file as a
cue that the user wants to use that feature.

And we use "${XDG_CONFIG_HOME:-$HOME/.config/git}/ignore" as such a
file, in the same directory as the newly added configuration file
("${XDG_CONFIG_HOME:-$HOME/.config/git}/config).  The use of this
directory is in line with XDG specification as a location to store
such application specific files.

Signed-off-by: Huynh Khoi Nguyen Nguyen <Huynh-Khoi-Nguyen.Nguyen@ensimag.imag.fr>
Signed-off-by: Valentin Duperray <Valentin.Duperray@ensimag.imag.fr>
Signed-off-by: Franck Jonas <Franck.Jonas@ensimag.imag.fr>
Signed-off-by: Lucien Kong <Lucien.Kong@ensimag.imag.fr>
Signed-off-by: Thomas Nguy <Thomas.Nguy@ensimag.imag.fr>
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-06-25 09:06:15 -07:00
Huynh Khoi Nguyen Nguyen 21cf322791 config: read (but not write) from $XDG_CONFIG_HOME/git/config file
Teach git to read the "gitconfig" information from a new location,
$XDG_CONFIG_HOME/git/config; this allows the user to avoid
cluttering $HOME with many per-application configuration files.

In the order of reading, this file comes between the global
configuration file (typically $HOME/.gitconfig) and the system wide
configuration file (typically /etc/gitconfig).

We do not write to this new location (yet).

If $XDG_CONFIG_HOME is either not set or empty, $HOME/.config/git/config
will be used. This is in line with XDG specification.

If the new file does not exist, the behavior is unchanged.

Signed-off-by: Huynh Khoi Nguyen Nguyen <Huynh-Khoi-Nguyen.Nguyen@ensimag.imag.fr>
Signed-off-by: Valentin Duperray <Valentin.Duperray@ensimag.imag.fr>
Signed-off-by: Franck Jonas <Franck.Jonas@ensimag.imag.fr>
Signed-off-by: Lucien Kong <Lucien.Kong@ensimag.imag.fr>
Signed-off-by: Thomas Nguy <Thomas.Nguy@ensimag.imag.fr>
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-06-25 09:05:55 -07:00
Junio C Hamano f71be5cc06 Merge branch 'maint'
* maint:
  Documentation: Fix misspellings
2012-06-22 14:35:57 -07:00
Leila Muhtasib 8d8136c37a Documentation: Fix misspellings
Signed-off-by: Leila Muhtasib <muhtasib@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-06-22 14:25:04 -07:00
Junio C Hamano 0e18bef7e6 Sync with 1.7.11.1 2012-06-21 14:52:23 -07:00
Junio C Hamano 157a282401 The first batch for 1.7.12
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-06-21 14:51:39 -07:00
Junio C Hamano 0e64a95ae5 Git 1.7.11.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-06-21 14:43:59 -07:00
Junio C Hamano 486fcbc458 Merge branch 'jk/clone-local'
"git clone --local $path" started its life as an experiment to
optionally use link/copy when cloning a repository on the disk, but
we didn't deprecate it after we made the option a no-op to always
use the optimization.

The command learns "--no-local" option to turn this off, as a more
explicit alternative over use of file:// URL.

* jk/clone-local:
  clone: allow --no-local to turn off local optimizations
  docs/clone: mention that --local may be ignored
2012-06-21 14:41:53 -07:00
Jeff King 60475183c0 docs: always define git-relative-html-prefix attribute
Commit fe77b41 introduced a new attribute to let the linkgit macro
create cross-directory HTML references from the technical/ and howto/
subdirectories back to the main documentation. We define that attribute
to "../" on the command-line when building inside those subdirectories,
and otherwise leave it unset under the assumption that it would default
to being blank.  Instead, asciidoc omits the link entirely, leading to
broken documentation. Fix this by defining git-relative-html-prefix to
blank in asciidoc.conf (and an instance on the command-line, when
present, will override it).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-06-20 23:35:08 -07:00
Junio C Hamano d28436736a git-commit-tree(1): update synopsis
Even with many new kinds of options, the command still takes the
single <tree> as the first argument.

Probably we would want to update the command to allow it to take
<tree>-ish at the end for consistency.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-06-19 11:36:57 -07:00
Miklos Vajna b4ab1980da Documentation: spelling fixes
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-06-19 11:35:19 -07:00
Junio C Hamano 0ce2e396ee Git 1.7.11
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-06-17 14:07:15 -07:00
Junio C Hamano a890c998de Sync with 1.7.10.5 2012-06-17 14:05:53 -07:00
Junio C Hamano 785ee4960c Git 1.7.10.5
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-06-17 14:04:15 -07:00
Carlos Martín Nieto b98878edef git-cherry-pick.txt: clarify the use of revision range notation
When given a set of commits, cherry-pick will apply the changes for
all of them. Specifying a simple range will also work as expected.

This can lead the user to think that

    git cherry-pick A B..C

may apply A and then B..C, but that is not what happens.

Instead the revs are given to a single invocation of rev-list, which
will consider A and C as positive revs and B as a negative one.  The
commit A will not be used if it is an ancestor of B.

Add a note about this and add an example with this particular
syntax, which has shown up on the list a few times.

Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-06-15 10:56:13 -07:00
Carlos Martín Nieto 42939f1a24 Documentation: --no-walk is no-op if range is specified
The existing description can be misleading and cause the reader to
think that --no-walk will do something if they specify a range in the
command line instead of a set of revs.

Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-06-15 10:41:37 -07:00
Lucien Kong 83c750acde wt-status.*: better advices for git status added
This patch provides new informative help messages in the display of
'git status' (at the top) during conflicts, rebase, am, bisect or
cherry-pick process.

The new messages are not shown when using options such as -s or
--porcelain. The messages about the current situation of the user are
always displayed but the advices on what the user needs to do in order
to resume a rebase/bisect/am/commit after resolving conflicts can be
hidden by setting advice.statushints to 'false' in the config file.

Thus, information about the updated advice.statushints key are added
in Documentation/config.txt.

Also, the test t7060-wt-status.sh is now working with the new help
messages. Tests about suggestions of "git rm" are also added.

Signed-off-by: Lucien Kong <Lucien.Kong@ensimag.imag.fr>
Signed-off-by: Valentin Duperray <Valentin.Duperray@ensimag.imag.fr>
Signed-off-by: Franck Jonas <Franck.Jonas@ensimag.imag.fr>
Signed-off-by: Thomas Nguy <Thomas.Nguy@ensimag.imag.fr>
Signed-off-by: Huynh Khoi Nguyen Nguyen <Huynh-Khoi-Nguyen.Nguyen@ensimag.imag.fr>
Signed-off-by: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-06-14 10:15:19 -07:00
Lucien Kong c214538416 rebase -i: teach "--exec <cmd>"
During an interactive rebase session, it is sometimes desirable to
run tests on each commit in the resulting history.  This can be done
by adding "exec <test command>" when editing the insn sheet, but the
command used for testing is often the same for all resulting commits.

By passing "--exec <cmd>" from the command line, automatically add
these "exec" lines after each commit in the final history.  To work
well with the --autosquash option, these are added at the end of
each run of "fixup" and "squash".

Helped-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Lucien Kong <Lucien.Kong@ensimag.imag.fr>
Signed-off-by: Valentin Duperray <Valentin.Duperray@ensimag.imag.fr>
Signed-off-by: Franck Jonas <Franck.Jonas@ensimag.imag.fr>
Signed-off-by: Thomas Nguy <Thomas.Nguy@ensimag.imag.fr>
Signed-off-by: Huynh Khoi Nguyen Nguyen <Huynh-Khoi-Nguyen.Nguyen@ensimag.imag.fr>
Signed-off-by: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-06-13 15:25:44 -07:00
Junio C Hamano 9bea2b5896 Git 1.7.11-rc3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-06-12 09:10:52 -07:00
Junio C Hamano 73a6e3c794 Merge branch 'mm/api-credentials-doc'
* mm/api-credentials-doc:
  api-credential.txt: document that helpers field is filled-in automatically
2012-06-12 08:40:16 -07:00
Matthieu Moy 317d74be69 api-credential.txt: document that helpers field is filled-in automatically
It was unclear whether the field was to be specified by the user of the
API.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-06-12 07:48:40 -07:00
Junio C Hamano 02101c969d Merge branch 'mm/api-credentials-doc'
Finishing touches...

* mm/api-credentials-doc:
  docs: fix cross-directory linkgit references
2012-06-08 08:32:20 -07:00
Jeff King fe77b416c7 docs: fix cross-directory linkgit references
Most of our documentation is in a single directory, so using
linkgit:git-config[1] just generates a relative link in the
same directory. However, this is not the case with the API
documentation in technical/*, which need to refer to
git-config from the parent directory.

We can fix this by passing a special prefix attribute when building
in a subdirectory, and respecting that prefix in our linkgit
definitions.

We only have to modify the html linkgit definition.  For
manpages, we can ignore this for two reasons:

  1. we do not generate actual links to the file in
     manpages, but instead just give the name and section of
     the linked manpage

  2. we do not currently build manpages for subdirectories,
     only html

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-06-08 08:31:52 -07:00
Ramkumar Ramachandra e858af6d50 commit: document a couple of options
Document git commit '--branch' and '--no-post-rewrite'.  Mention that
'-z' can also be spelt as '--null'.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-06-08 08:14:22 -07:00
Junio C Hamano a1a031d935 Git 1.7.11-rc2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-06-07 09:14:41 -07:00