Commit graph

737 commits

Author SHA1 Message Date
Junio C Hamano 4d9f744e34 Merge branch 'es/worktree-add'
Update to the "linked checkout" in 2.5.0-rc1.

Instead of "checkout --to" that does not do what "checkout"
normally does, move the functionality to "git worktree add".

As this makes the end-user experience of the "worktree add" more or
less complete, I am tempted to say we should cook the other topic
that removes the internal "new-worktree-mode" hack from "checkout"
a bit longer in 'next', and release 2.5 final without that one.

* es/worktree-add:
  Documentation/git: fix stale "MULTIPLE CHECKOUT MODE" reference
  worktree: caution that this is still experimental
  Documentation/git-worktree: fix stale "git checkout --to" references
2015-07-17 10:44:55 -07:00
Eric Sunshine 1eaca7a5bb Documentation/git: fix stale "MULTIPLE CHECKOUT MODE" reference
This should have been changed by 93a3649 (Documentation: move linked
worktree description from checkout to worktree, 2015-07-06).

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-07-17 10:05:36 -07:00
Junio C Hamano 6003e7f93a Sync with 2.4.6 2015-07-15 12:32:37 -07:00
Junio C Hamano bb3e7b1a55 Git 2.4.6
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-07-15 12:31:07 -07:00
Junio C Hamano a6a1ad9b25 Sync with 2.4.5 2015-06-25 11:04:30 -07:00
Junio C Hamano 0df0541bf1 Git 2.4.5
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-06-25 11:03:05 -07:00
Junio C Hamano 5c040f5af5 Sync with 2.4.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-06-16 14:39:01 -07:00
Junio C Hamano f09bd215cd Git 2.4.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-06-16 14:38:01 -07:00
Jeff King 323598387d pkt-line: support tracing verbatim pack contents
When debugging the pack protocol, it is sometimes useful to
store the verbatim pack that we sent or received on the
wire. Looking at the on-disk result is often not helpful for
a few reasons:

  1. If the operation is a clone, we destroy the repo on
     failure, leaving nothing on disk.

  2. If the pack is small, we unpack it immediately, and the
     full pack never hits the disk.

  3. If we feed the pack to "index-pack --fix-thin", the
     resulting pack has the extra delta bases added to it.

We already have a GIT_TRACE_PACKET mechanism for tracing
packets. Let's extend it with GIT_TRACE_PACKFILE to dump the
verbatim packfile.

There are a few other positive fallouts that come from
rearranging this code:

 - We currently disable the packet trace after seeing the
   PACK header, even though we may get human-readable lines
   on other sidebands; now we include them in the trace.

 - We currently try to print "PACK ..." in the trace to
   indicate that the packfile has started. But because we
   disable packet tracing, we never printed this line. We
   will now do so.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-06-16 13:24:22 -07:00
Junio C Hamano 7974889a05 Sync with 2.4.3 2015-06-05 12:23:18 -07:00
Junio C Hamano 69f9a6e54a Git 2.4.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-06-05 12:22:33 -07:00
Junio C Hamano fae46aa0ae Sync with 2.4.2 2015-05-26 13:50:51 -07:00
Junio C Hamano 9eabf5b536 Git 2.4.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-05-26 13:49:59 -07:00
Junio C Hamano 1ea28e1494 Sync with 2.4.1
* maint:
  Git 2.4.1
2015-05-13 14:35:05 -07:00
Junio C Hamano aaa7e0d7f8 Git 2.4.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-05-13 14:11:43 -07:00
Junio C Hamano c518059b26 Merge branch 'maint'
* maint:
  Git 2.3.8
2015-05-11 14:39:39 -07:00
Junio C Hamano c99fec6e35 Sync with 2.3.8
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-05-11 14:39:28 -07:00
Junio C Hamano 9a3d637541 Git 2.3.8
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-05-11 14:36:31 -07:00
Junio C Hamano 68a2e6a2c8 Merge branch 'nd/multiple-work-trees'
A replacement for contrib/workdir/git-new-workdir that does not
rely on symbolic links and make sharing of objects and refs safer
by making the borrowee and borrowers aware of each other.

* nd/multiple-work-trees: (41 commits)
  prune --worktrees: fix expire vs worktree existence condition
  t1501: fix test with split index
  t2026: fix broken &&-chain
  t2026 needs procondition SANITY
  git-checkout.txt: a note about multiple checkout support for submodules
  checkout: add --ignore-other-wortrees
  checkout: pass whole struct to parse_branchname_arg instead of individual flags
  git-common-dir: make "modules/" per-working-directory directory
  checkout: do not fail if target is an empty directory
  t2025: add a test to make sure grafts is working from a linked checkout
  checkout: don't require a work tree when checking out into a new one
  git_path(): keep "info/sparse-checkout" per work-tree
  count-objects: report unused files in $GIT_DIR/worktrees/...
  gc: support prune --worktrees
  gc: factor out gc.pruneexpire parsing code
  gc: style change -- no SP before closing parenthesis
  checkout: clean up half-prepared directories in --to mode
  checkout: reject if the branch is already checked out elsewhere
  prune: strategies for linked checkouts
  checkout: support checking out into a new working directory
  ...
2015-05-11 14:23:39 -07:00
Junio C Hamano 3d4a3ffe64 Git 2.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-04-30 11:25:06 -07:00
Junio C Hamano fb3e7d5515 Sync with 2.3.7 2015-04-27 12:26:21 -07:00
Junio C Hamano 16018ae5fb Git 2.3.7
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-04-27 12:25:36 -07:00
Junio C Hamano fb896362cc Sync with maint 2015-04-21 12:58:50 -07:00
Junio C Hamano ba63bfaa59 Git 2.3.6
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-04-21 12:17:09 -07:00
Junio C Hamano cf8a8c6bd5 Sync with 2.3.5
* maint:
  Git 2.3.5
  docs: clarify what git-rebase's "-p" / "--preserve-merges" does
2015-03-31 14:58:38 -07:00
Junio C Hamano 52735a6892 Git 2.3.5
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-31 14:57:10 -07:00
Junio C Hamano 2217579cde Merge branch 'nd/doc-git-index-version' into maint
Doc clean-up.

* nd/doc-git-index-version:
  git.txt: list index versions in plain English
2015-03-28 09:33:13 -07:00
Junio C Hamano 9f389aa492 Merge branch 'jk/prune-with-corrupt-refs' into maint
"git prune" used to largely ignore broken refs when deciding which
objects are still being used, which could spread an existing small
damage and make it a larger one.

* jk/prune-with-corrupt-refs:
  refs.c: drop curate_packed_refs
  repack: turn on "ref paranoia" when doing a destructive repack
  prune: turn on ref_paranoia flag
  refs: introduce a "ref paranoia" flag
  t5312: test object deletion code paths in a corrupted repository
2015-03-28 09:33:06 -07:00
Junio C Hamano 6ce3cc5d33 Merge branch 'nd/doc-git-index-version'
Doc clean-up.

* nd/doc-git-index-version:
  git.txt: list index versions in plain English
2015-03-25 12:54:28 -07:00
Junio C Hamano 05e816e37f Merge branch 'jk/prune-with-corrupt-refs'
"git prune" used to largely ignore broken refs when deciding which
objects are still being used, which could spread an existing small
damage and make it a larger one.

* jk/prune-with-corrupt-refs:
  refs.c: drop curate_packed_refs
  repack: turn on "ref paranoia" when doing a destructive repack
  prune: turn on ref_paranoia flag
  refs: introduce a "ref paranoia" flag
  t5312: test object deletion code paths in a corrupted repository
2015-03-25 12:54:26 -07:00
Nguyễn Thái Ngọc Duy 70320541ec git.txt: list index versions in plain English
At the first look, a user may think the default version is "23". Even
with UNIX background, there's no reference anywhere close that may
indicate this is glob or regex.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-24 08:06:00 -07:00
Junio C Hamano f53fc38c08 Sync with v2.3.4 2015-03-23 11:37:49 -07:00
Junio C Hamano aa65b86025 Merge branch 'nd/config-doc-camelCase'
Documentation updates.

* nd/config-doc-camelCase:
  *config.txt: stick to camelCase naming convention
2015-03-23 11:28:12 -07:00
Junio C Hamano 3a52578eef Git 2.3.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-23 11:27:27 -07:00
Jeff King 49672f26d9 refs: introduce a "ref paranoia" flag
Most operations that iterate over refs are happy to ignore
broken cruft. However, some operations should be performed
with knowledge of these broken refs, because it is better
for the operation to choke on a missing object than it is to
silently pretend that the ref did not exist (e.g., if we are
computing the set of reachable tips in order to prune
objects).

These processes could just call for_each_rawref, except that
ref iteration is often hidden behind other interfaces. For
instance, for a destructive "repack -ad", we would have to
inform "pack-objects" that we are destructive, and then it
would in turn have to tell the revision code that our
"--all" should include broken refs.

It's much simpler to just set a global for "dangerous"
operations that includes broken refs in all iterations.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-20 12:40:49 -07:00
Junio C Hamano bb8577532a Git 2.3.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-13 22:57:25 -07:00
Nguyễn Thái Ngọc Duy da0005b885 *config.txt: stick to camelCase naming convention
This should improve readability. Compare "thislongname" and
"thisLongName". The following keys are left in unchanged. We can
decide what to do with them later.

 - am.keepcr
 - core.autocrlf .safecrlf .trustctime
 - diff.dirstat .noprefix
 - gitcvs.usecrlfattr
 - gui.blamehistoryctx .trustmtime
 - pull.twohead
 - receive.autogc
 - sendemail.signedoffbycc .smtpsslcertpath .suppresscc

Helped-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-13 22:13:46 -07:00
Junio C Hamano 1165ae6f3d Git 2.3.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-06 14:58:14 -08:00
Junio C Hamano 8004647a21 Git 2.3.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-02-24 22:14:42 -08:00
Junio C Hamano 9874fca712 Git 2.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-02-05 13:23:56 -08:00
Junio C Hamano def6dd9bc6 Sync with 2.2.2 2015-01-12 14:08:42 -08:00
Junio C Hamano fdf96a20ac Git 2.2.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-01-12 14:06:12 -08:00
Junio C Hamano 86362f7205 Merge branch 'jk/credential-quit'
Credential helpers are asked in turn until one of them give
positive response, which is cumbersome to turn off when you need to
run Git in an automated setting.  The credential helper interface
learned to allow a helper to say "stop, don't ask other helpers."
Also GIT_TERMINAL_PROMPT environment can be set to false to disable
our built-in prompt mechanism for passwords.

* jk/credential-quit:
  prompt: respect GIT_TERMINAL_PROMPT to disable terminal prompts
  credential: let helpers tell us to quit
2014-12-22 12:27:20 -08:00
Junio C Hamano 3f1509809e Sync with v2.2.1
* maint:
  Git 2.2.1
  Git 2.1.4
  Git 2.0.5
  Git 1.9.5
  Git 1.8.5.6
  fsck: complain about NTFS ".git" aliases in trees
  read-cache: optionally disallow NTFS .git variants
  path: add is_ntfs_dotgit() helper
  fsck: complain about HFS+ ".git" aliases in trees
  read-cache: optionally disallow HFS+ .git variants
  utf8: add is_hfs_dotgit() helper
  fsck: notice .git case-insensitively
  t1450: refactor ".", "..", and ".git" fsck tests
  verify_dotfile(): reject .git case-insensitively
  read-tree: add tests for confusing paths like ".." and ".git"
  unpack-trees: propagate errors adding entries to the index
2014-12-18 12:30:53 -08:00
Junio C Hamano 9b7cbb3159 Git 2.2.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-12-17 11:49:34 -08:00
Junio C Hamano 77933f4449 Sync with v2.1.4
* maint-2.1:
  Git 2.1.4
  Git 2.0.5
  Git 1.9.5
  Git 1.8.5.6
  fsck: complain about NTFS ".git" aliases in trees
  read-cache: optionally disallow NTFS .git variants
  path: add is_ntfs_dotgit() helper
  fsck: complain about HFS+ ".git" aliases in trees
  read-cache: optionally disallow HFS+ .git variants
  utf8: add is_hfs_dotgit() helper
  fsck: notice .git case-insensitively
  t1450: refactor ".", "..", and ".git" fsck tests
  verify_dotfile(): reject .git case-insensitively
  read-tree: add tests for confusing paths like ".." and ".git"
  unpack-trees: propagate errors adding entries to the index
2014-12-17 11:46:57 -08:00
Junio C Hamano 8e36a6d575 Git 2.1.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-12-17 11:44:59 -08:00
Junio C Hamano 58f1d950e3 Sync with v2.0.5
* maint-2.0:
  Git 2.0.5
  Git 1.9.5
  Git 1.8.5.6
  fsck: complain about NTFS ".git" aliases in trees
  read-cache: optionally disallow NTFS .git variants
  path: add is_ntfs_dotgit() helper
  fsck: complain about HFS+ ".git" aliases in trees
  read-cache: optionally disallow HFS+ .git variants
  utf8: add is_hfs_dotgit() helper
  fsck: notice .git case-insensitively
  t1450: refactor ".", "..", and ".git" fsck tests
  verify_dotfile(): reject .git case-insensitively
  read-tree: add tests for confusing paths like ".." and ".git"
  unpack-trees: propagate errors adding entries to the index
2014-12-17 11:42:28 -08:00
Junio C Hamano 9a8c2b67cd Git 2.0.5
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-12-17 11:30:46 -08:00
Junio C Hamano 5e519fb8b0 Sync with v1.9.5
* maint-1.9:
  Git 1.9.5
  Git 1.8.5.6
  fsck: complain about NTFS ".git" aliases in trees
  read-cache: optionally disallow NTFS .git variants
  path: add is_ntfs_dotgit() helper
  fsck: complain about HFS+ ".git" aliases in trees
  read-cache: optionally disallow HFS+ .git variants
  utf8: add is_hfs_dotgit() helper
  fsck: notice .git case-insensitively
  t1450: refactor ".", "..", and ".git" fsck tests
  verify_dotfile(): reject .git case-insensitively
  read-tree: add tests for confusing paths like ".." and ".git"
  unpack-trees: propagate errors adding entries to the index
2014-12-17 11:28:54 -08:00
Junio C Hamano 83332636f5 Git 1.9.5
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-12-17 11:22:32 -08:00
Junio C Hamano 6898b79721 Sync with v1.8.5.6
* maint-1.8.5:
  Git 1.8.5.6
  fsck: complain about NTFS ".git" aliases in trees
  read-cache: optionally disallow NTFS .git variants
  path: add is_ntfs_dotgit() helper
  fsck: complain about HFS+ ".git" aliases in trees
  read-cache: optionally disallow HFS+ .git variants
  utf8: add is_hfs_dotgit() helper
  fsck: notice .git case-insensitively
  t1450: refactor ".", "..", and ".git" fsck tests
  verify_dotfile(): reject .git case-insensitively
  read-tree: add tests for confusing paths like ".." and ".git"
  unpack-trees: propagate errors adding entries to the index
2014-12-17 11:20:31 -08:00
Junio C Hamano 5c8213a769 Git 1.8.5.6
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-12-17 11:18:45 -08:00
Junio C Hamano 09d60d785c Merge branch 'tq/git-ssh-command'
Allow passing extra set of arguments when ssh is invoked to create
an encrypted & authenticated connection by introducing a new environment
variable GIT_SSH_COMMAND, whose contents is interpreted by shells.

This is not possible with existing GIT_SSH mechanism whose
invocation bypasses shells, which was designed more to match what
other programs with similar variables did, not necessarily to be
more useful.

* tq/git-ssh-command:
  git_connect: set ssh shell command in GIT_SSH_COMMAND
2014-12-05 11:39:25 -08:00
Jeff King e652c0eb5d prompt: respect GIT_TERMINAL_PROMPT to disable terminal prompts
If you run git as part of an automated system, you might
prefer git to die rather than try to issue a prompt on the
terminal (because there would be nobody to see it and
respond, and the process would hang forever).

This usually works out of the box because getpass() (and our
more featureful replacements) will fail when there is no
tty, but this does not cover all cases. For example, a batch
system run via ssh might have a tty, even when the user does
not expect it.

Let's provide an environment variable the user can set to
avoid even trying to touch the tty at all.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-12-04 10:22:42 -08:00
Nguyễn Thái Ngọc Duy 529fef20cf checkout: support checking out into a new working directory
"git checkout --to" sets up a new working directory with a .git file
pointing to $GIT_DIR/worktrees/<id>. It then executes "git checkout"
again on the new worktree with the same arguments except "--to" is
taken out. The second checkout execution, which is not contaminated
with any info from the current repository, will actually check out and
everything that normal "git checkout" does.

Helped-by: Marc Branchaud <marcnarc@xiplink.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-12-01 11:00:16 -08:00
Nguyễn Thái Ngọc Duy c7b3a3d2fe $GIT_COMMON_DIR: a new environment variable
This variable is intended to support multiple working directories
attached to a repository. Such a repository may have a main working
directory, created by either "git init" or "git clone" and one or more
linked working directories. These working directories and the main
repository share the same repository directory.

In linked working directories, $GIT_COMMON_DIR must be defined to point
to the real repository directory and $GIT_DIR points to an unused
subdirectory inside $GIT_COMMON_DIR. File locations inside the
repository are reorganized from the linked worktree view point:

 - worktree-specific such as HEAD, logs/HEAD, index, other top-level
   refs and unrecognized files are from $GIT_DIR.

 - the rest like objects, refs, info, hooks, packed-refs, shallow...
   are from $GIT_COMMON_DIR (except info/sparse-checkout, but that's
   a separate patch)

Scripts are supposed to retrieve paths in $GIT_DIR with "git rev-parse
--git-path", which will take care of "$GIT_DIR vs $GIT_COMMON_DIR"
business.

The redirection is done by git_path(), git_pathdup() and
strbuf_git_path(). The selected list of paths goes to $GIT_COMMON_DIR,
not the other way around in case a developer adds a new
worktree-specific file and it's accidentally promoted to be shared
across repositories (this includes unknown files added by third party
commands)

The list of known files that belong to $GIT_DIR are:

ADD_EDIT.patch BISECT_ANCESTORS_OK BISECT_EXPECTED_REV BISECT_LOG
BISECT_NAMES CHERRY_PICK_HEAD COMMIT_MSG FETCH_HEAD HEAD MERGE_HEAD
MERGE_MODE MERGE_RR NOTES_EDITMSG NOTES_MERGE_WORKTREE ORIG_HEAD
REVERT_HEAD SQUASH_MSG TAG_EDITMSG fast_import_crash_* logs/HEAD
next-index-* rebase-apply rebase-merge rsync-refs-* sequencer/*
shallow_*

Path mapping is NOT done for git_path_submodule(). Multi-checkouts are
not supported as submodules.

Helped-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-12-01 11:00:13 -08:00
Junio C Hamano b260d265e1 Git 2.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-11-26 13:18:34 -08:00
Thomas Quinot 39942766ab git_connect: set ssh shell command in GIT_SSH_COMMAND
It may be impractical to install a wrapper script for GIT_SSH
when additional parameters need to be passed. Provide an alternative
way of specifying a shell command to be run, including command line
arguments, by means of the GIT_SSH_COMMAND environment variable,
which behaves like GIT_SSH but is passed to the shell.

The special circuitry to modify parameters in the case of using
PuTTY's plink/tortoiseplink is activated only when using GIT_SSH;
in the case of using GIT_SSH_COMMAND, it is deliberately left up to
the user to make any required parameters adaptation before calling
the underlying ssh implementation.

Signed-off-by: Thomas Quinot <thomas@quinot.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-11-10 08:55:10 -08:00
Junio C Hamano 36666ce4da Sync with Git 2.1.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-10-29 10:50:17 -07:00
Junio C Hamano 49c3e92634 Git 2.1.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-10-29 10:48:45 -07:00
Junio C Hamano 1cb3324e61 Merge branch 'po/everyday-doc'
"git help everyday" to show the Everyday Git document.

* po/everyday-doc:
  doc: add 'everyday' to 'git help'
  doc: Makefile regularise OBSOLETE_HTML list building
  doc: modernise everyday.txt wording and format in man page style
2014-10-16 14:16:42 -07:00
Philip Oakley 673151a9bb doc: add 'everyday' to 'git help'
The "Everyday GIT With 20 Commands Or So" is not accessible via the
Git help system.  Move everyday.txt to giteveryday.txt so that "git
help everyday" works, and create a new placeholder file everyday.html
to refer people who follow existing URLs to the updated location.

giteveryday.txt now formats well with AsciiDoc as a man page and
refreshed content to a more command modern style.

Add 'everyday' to the help --guides list and update git(1) and 5
other links to giteveryday.

Signed-off-by: Philip Oakley <philipoakley@iee.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-10-10 16:02:26 -07:00
Junio C Hamano 80b616d04b Git 2.1.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-09-29 22:15:00 -07:00
Junio C Hamano 349cb50963 Git 2.1.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-09-19 14:21:31 -07:00
Junio C Hamano 04cd47f553 Merge branch 'jk/command-line-config-empty-string' into maint
* jk/command-line-config-empty-string:
  config: teach "git -c" to recognize an empty string

Conflicts:
	config.c
2014-09-19 14:05:10 -07:00
Junio C Hamano 6c4ab27f23 Git 2.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-08-15 15:09:12 -07:00
Junio C Hamano a789ca70e7 config: teach "git -c" to recognize an empty string
In a config file, you can do:

  [foo]
  bar

to turn the "foo.bar" boolean flag on, and you can do:

  [foo]
  bar=

to set "foo.bar" to the empty string. However, git's "-c"
parameter treats both:

  git -c foo.bar

and

  git -c foo.bar=

as the boolean flag, and there is no way to set a variable
to the empty string. This patch enables the latter form to
do that.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-08-05 10:09:17 -07:00
Junio C Hamano aa544bfbc6 Sync with 2.0.4
* maint:
  Git 2.0.4
  commit --amend: test specifies authorship but forgets to check
2014-07-30 14:25:46 -07:00
Junio C Hamano 32f56600bb Git 2.0.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-07-30 14:19:53 -07:00
Junio C Hamano 996b0fdbb4 Sync with v2.0.3
* maint:
  Git 2.0.3
  .mailmap: combine Stefan Beller's emails
  git.1: switch homepage for stats
2014-07-23 11:36:40 -07:00
Junio C Hamano 740c281d21 Git 2.0.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-07-23 11:33:16 -07:00
Stefan Beller 405869d0d5 git.1: switch homepage for stats
According to http://meta.ohloh.net/2014/07/black-duck-open-hub/
the site name of ohloh changed to openhub.

Change the man page accordingly.

Signed-off-by: Stefan Beller <stefanbeller@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-07-23 11:26:52 -07:00
Junio C Hamano 9f2de9c121 Merge branch 'kb/perf-trace'
* kb/perf-trace:
  api-trace.txt: add trace API documentation
  progress: simplify performance measurement by using getnanotime()
  wt-status: simplify performance measurement by using getnanotime()
  git: add performance tracing for git's main() function to debug scripts
  trace: add trace_performance facility to debug performance issues
  trace: add high resolution timer function to debug performance issues
  trace: add 'file:line' to all trace output
  trace: move code around, in preparation to file:line output
  trace: add current timestamp to all trace output
  trace: disable additional trace output for unit tests
  trace: add infrastructure to augment trace output with additional info
  sha1_file: change GIT_TRACE_PACK_ACCESS logging to use trace API
  Documentation/git.txt: improve documentation of 'GIT_TRACE*' variables
  trace: improve trace performance
  trace: remove redundant printf format attribute
  trace: consistently name the format parameter
  trace: move trace declarations from cache.h to new trace.h
2014-07-22 10:59:19 -07:00
Junio C Hamano f2c9f21369 Sync with 2.0.2
* maint:
  Git 2.0.2
  annotate: use argv_array
2014-07-16 11:48:16 -07:00
Junio C Hamano ebc5da3208 Git 2.0.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-07-16 11:19:56 -07:00
Karsten Blees 578da0391a git: add performance tracing for git's main() function to debug scripts
Use trace_performance to measure and print execution time and command line
arguments of the entire main() function. In constrast to the shell's 'time'
utility, which measures total time of the parent process, this logs all
involved git commands recursively. This is particularly useful to debug
performance issues of scripted commands (i.e. which git commands were
called with which parameters, and how long did they execute).

Due to git's deliberate use of exit(), the implementation uses an atexit
routine rather than just adding trace_performance_since() at the end of
main().

Usage example: > GIT_TRACE_PERFORMANCE=~/git-trace.log git stash list

Creates a log file like this:
23:57:38.638765 trace.c:405 performance: 0.000310107 s: git command: 'git' 'rev-parse' '--git-dir'
23:57:38.644387 trace.c:405 performance: 0.000261759 s: git command: 'git' 'rev-parse' '--show-toplevel'
23:57:38.646207 trace.c:405 performance: 0.000304468 s: git command: 'git' 'config' '--get-colorbool' 'color.interactive'
23:57:38.648491 trace.c:405 performance: 0.000241667 s: git command: 'git' 'config' '--get-color' 'color.interactive.help' 'red bold'
23:57:38.650465 trace.c:405 performance: 0.000243063 s: git command: 'git' 'config' '--get-color' '' 'reset'
23:57:38.654850 trace.c:405 performance: 0.025126313 s: git command: 'git' 'stash' 'list'

Signed-off-by: Karsten Blees <blees@dcon.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-07-13 21:25:21 -07:00
Karsten Blees 67dc598ec4 sha1_file: change GIT_TRACE_PACK_ACCESS logging to use trace API
This changes GIT_TRACE_PACK_ACCESS functionality as follows:
 * supports the same options as GIT_TRACE (e.g. printing to stderr)
 * no longer supports relative paths
 * appends to the trace file rather than overwriting

Signed-off-by: Karsten Blees <blees@dcon.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-07-13 21:25:18 -07:00
Karsten Blees eb9250dfd5 Documentation/git.txt: improve documentation of 'GIT_TRACE*' variables
Separate GIT_TRACE description into what it prints and how to configure
where trace output is printed to. Change other GIT_TRACE_* descriptions to
refer to GIT_TRACE.

Add descriptions for GIT_TRACE_SETUP and GIT_TRACE_SHALLOW.

Signed-off-by: Karsten Blees <blees@dcon.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-07-13 21:25:18 -07:00
Junio C Hamano c47372d3a8 Sync with maint 2014-06-25 12:32:58 -07:00
Junio C Hamano 341e7e8eda Git 2.0.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-06-25 12:21:11 -07:00
Junio C Hamano ed47bbd1d0 Merge branch 'jj/command-line-adjective'
* jj/command-line-adjective:
  Documentation: use "command-line" when used as a compound adjective, and fix other minor grammatical issues
2014-06-06 11:38:48 -07:00
Junio C Hamano bce14aa132 Sync with 1.9.4 2014-05-30 10:57:52 -07:00
Junio C Hamano 34d5217584 Git 1.9.4
This is expected to be the final maintenance release for 1.9 series,
merging the remaining fixes that are relevant and are already in 2.0.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-05-30 10:13:41 -07:00
Junio C Hamano e156455ea4 Git 2.0 2014-05-28 11:04:19 -07:00
Jason St. John 06ab60c066 Documentation: use "command-line" when used as a compound adjective, and fix other minor grammatical issues
Signed-off-by: Jason St. John <jstjohn@purdue.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-05-21 13:57:10 -07:00
Junio C Hamano 7234af6e7b Sync with 1.9.3 2014-05-09 11:00:48 -07:00
Junio C Hamano eea591373e Git 1.9.3
The third maintenance release for Git 1.9; contains all the fixes
that are scheduled to appear in Git 2.0 since 1.9.2.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-05-09 10:59:07 -07:00
Junio C Hamano 68773ac915 Sync with 1.9.2
* maint:
  Git 1.9.2
  doc/http-backend: missing accent grave in literal mark-up
2014-04-09 12:06:14 -07:00
Junio C Hamano 0bc85abb7a Git 1.9.2
The second maintenance release for Git 1.9; contains all the fixes
that are scheduled to appear in Git 2.0.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-04-09 12:04:34 -07:00
Junio C Hamano 5172cb3bcb Sync with 1.9.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-03-18 14:34:25 -07:00
Junio C Hamano cee0c2750b Git 1.9.1
The version numbering scheme has changed since Git 1.9 and we
dropped the third dewey-decimal from the traditional numbering
(e.g. both 1.8.4 and 1.8.5 were major feature releases).  This
release 1.9.1 is the first maintenance relase for Git 1.9.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-03-18 14:16:16 -07:00
Thomas Gummerer 136347d718 introduce GIT_INDEX_VERSION environment variable
Respect a GIT_INDEX_VERSION environment variable, when a new index is
initialized.  Setting the environment variable will not cause existing
index files to be converted to another format, but will only affect
newly written index files.  This can be used to initialize repositories
with index-v4.

Helped-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-02-24 09:48:40 -08:00
Junio C Hamano 5f95c9f850 Git 1.9.0
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-02-14 11:35:04 -08:00
Junio C Hamano 475c52b7ac Sync with 1.8.5.5
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-02-13 13:42:26 -08:00
Junio C Hamano 7bbc4e8fdb Git 1.8.5.5
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-02-13 13:41:53 -08:00
Junio C Hamano 89ba81dc76 Sync with 1.8.5.4 2014-02-05 14:14:40 -08:00
Junio C Hamano 3330a2c4f6 Git 1.8.5.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-02-05 14:13:23 -08:00
Junio C Hamano 14598b9070 Sync with 1.8.5.3
* maint:
  Git 1.8.5.3
  pack-heuristics.txt: mark up the file header properly
2014-01-13 11:39:38 -08:00
Junio C Hamano 4224916ae9 Git 1.8.5.3 2014-01-13 11:28:26 -08:00
Junio C Hamano 6904f9aa5b Merge branch 'zk/difftool-counts'
Show the total number of paths and the number of paths shown so far
when "git difftool" prompts to launch an external diff tool, which
would give users some sense of progress.

* zk/difftool-counts:
  diff.c: fix some recent whitespace style violations
  difftool: display the number of files in the diff queue in the prompt
2013-12-27 14:58:13 -08:00
Junio C Hamano 5512ac5840 Git 1.8.5.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-12-17 11:42:12 -08:00
Zoltan Klinger ee7fb0b1d4 difftool: display the number of files in the diff queue in the prompt
When --prompt option is set, git-difftool displays a prompt for each
modified file to be viewed in an external diff program.  At that
point, it could be useful to display a counter and the total number
of files in the diff queue.

Below is the current difftool prompt for the first of 5 modified files:

    Viewing: 'diff.c'
    Launch 'vimdiff' [Y/n]:

Consider the modified prompt:

    Viewing (1/5): 'diff.c'
    Launch 'vimdiff' [Y/n]:

The current GIT_EXTERNAL_DIFF mechanism does not tell the number of
paths in the diff queue nor the current counter.  To make this
"counter/total" info available for GIT_EXTERNAL_DIFF programs
without breaking existing ones by doing the following:

 - Keep track of the number of paths shown so far in diff_options;

 - Export two new environment variables from run_external_diff() to
   show the total number of paths (from diff_queue_struct) and the
   current value of the counter (from diff_options); and

 - Update git-difftool--helper to use these two environment variables.

Signed-off-by: Zoltan Klinger <zoltan.klinger@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-12-06 14:00:27 -08:00
Junio C Hamano a155a5f075 Git 1.8.5.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-12-03 11:16:56 -08:00
Junio C Hamano be38bee862 Sync with 1.8.4.5 2013-12-02 15:34:44 -08:00
Junio C Hamano 2f93541d88 Git 1.8.4.5
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-12-02 15:33:30 -08:00
Junio C Hamano d2446dfd7f Git 1.8.5
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-11-27 12:14:45 -08:00
Junio C Hamano 039a6d2463 Sync with 1.8.4.4 2013-11-20 11:26:59 -08:00
Junio C Hamano becb4336cb Git 1.8.4.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-11-20 11:26:08 -08:00
Junio C Hamano 0ecd94d7d7 Sync with 1.8.4.3 2013-11-08 12:08:43 -08:00
Junio C Hamano d7d2c87955 Git 1.8.4.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-11-08 12:06:19 -08:00
Junio C Hamano cfd10568b0 Sync with v1.8.4.2 2013-10-28 10:51:53 -07:00
Junio C Hamano dcb11cca50 Git 1.8.4.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-28 10:21:29 -07:00
Junio C Hamano 6c2bec96a8 Merge branch 'jc/reflog-doc'
Document rules to use GIT_REFLOG_ACTION variable in the scripted
Porcelain.  git-rebase--interactive locally violates them, but it
is a leaf user that does not call out to or dot-source other
scripts, so it does not urgently need to be fixed.

* jc/reflog-doc:
  setup_reflog_action: document the rules for using GIT_REFLOG_ACTION
2013-10-18 13:50:12 -07:00
Steffen Prohaska 6fb02165a3 git.txt: fix asciidoc syntax of --*-pathspecs
Labeled lists require a double colon.

[jc] I eyeballed the output from

        git grep '[^:]:$' Documentation/\*.txt

     and the patch fixes all breakages of this kind.

Signed-off-by: Steffen Prohaska <prohaska@zib.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-15 15:47:05 -07:00
Jonathan Nieder 8de8e40caa Sync with Git 1.8.4.1 2013-09-26 15:36:57 -07:00
Jonathan Nieder 02a110ad43 Git 1.8.4.1
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-09-26 15:01:41 -07:00
Junio C Hamano 087350398e Merge branch 'nr/git-cd-to-a-directory'
Just like "make -C <directory>", make "git -C <directory> ..." to
go there before doing anything else.

* nr/git-cd-to-a-directory:
  t0056: "git -C" test updates
  git: run in a directory given with -C option
2013-09-20 12:35:42 -07:00
Junio C Hamano b02f5aeda6 Merge branch 'jl/submodule-mv'
"git mv A B" when moving a submodule A does "the right thing",
inclusing relocating its working tree and adjusting the paths in
the .gitmodules file.

* jl/submodule-mv: (53 commits)
  rm: delete .gitmodules entry of submodules removed from the work tree
  mv: update the path entry in .gitmodules for moved submodules
  submodule.c: add .gitmodules staging helper functions
  mv: move submodules using a gitfile
  mv: move submodules together with their work trees
  rm: do not set a variable twice without intermediate reading.
  t6131 - skip tests if on case-insensitive file system
  parse_pathspec: accept :(icase)path syntax
  pathspec: support :(glob) syntax
  pathspec: make --literal-pathspecs disable pathspec magic
  pathspec: support :(literal) syntax for noglob pathspec
  kill limit_pathspec_to_literal() as it's only used by parse_pathspec()
  parse_pathspec: preserve prefix length via PATHSPEC_PREFIX_ORIGIN
  parse_pathspec: make sure the prefix part is wildcard-free
  rename field "raw" to "_raw" in struct pathspec
  tree-diff: remove the use of pathspec's raw[] in follow-rename codepath
  remove match_pathspec() in favor of match_pathspec_depth()
  remove init_pathspec() in favor of parse_pathspec()
  remove diff_tree_{setup,release}_paths
  convert common_prefix() to use struct pathspec
  ...
2013-09-09 14:36:15 -07:00
Nazri Ramliy 44e1e4d67d git: run in a directory given with -C option
This is similar in spirit to "make -C dir ..." and "tar -C dir ...".

It takes more keypresses to invoke git command in a different
directory without leaving the current directory:

    1. (cd ~/foo && git status)
       git --git-dir=~/foo/.git --work-dir=~/foo status
       GIT_DIR=~/foo/.git GIT_WORK_TREE=~/foo git status
    2. (cd ../..; git grep foo)
    3. for d in d1 d2 d3; do (cd $d && git svn rebase); done

The methods shown above are acceptable for scripting but are too
cumbersome for quick command line invocations.

With this new option, the above can be done with fewer keystrokes:

    1. git -C ~/foo status
    2. git -C ../.. grep foo
    3. for d in d1 d2 d3; do git -C $d svn rebase; done

A new test script is added to verify the behavior of this option with
other path-related options like --git-dir and --work-tree.

Signed-off-by: Nazri Ramliy <ayiehere@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-09-09 09:33:17 -07:00
Junio C Hamano 9bb78de519 Merge branch 'mm/war-on-whatchanged'
* mm/war-on-whatchanged:
  whatchanged: document its historical nature
  core-tutorial: trim the section on Inspecting Changes
2013-08-30 10:08:26 -07:00
Junio C Hamano e230c568c4 Git 1.8.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-08-23 11:49:46 -07:00
Junio C Hamano 627a8b8dcd core-tutorial: trim the section on Inspecting Changes
Back when the core tutorial was written, `log` and `whatchanged`
were scripted Porcelains.  In the "Inspecting Changes" section that
talks about the plumbing commands in the diff family, it made sense
to use `log` and `whatchanged` as good examples of the use of these
plumbing commands, and because even these scripted Porcelains were
novelty (there wasn't the new end-user tutorial written), it made
some sense to illustrate uses of the `git log` (and `git
whatchanged`) scripted Porcelain commands.

But we no longer have scripted `log` and `whatchanged` to serve as
examples, and this document is not where the end users learn what
`git log` command is about.  Stop at briefly mentioning the
possibility of combining rev-list with diff-tree to build your own
log, and leave the end-user documentation of `log` to the new
tutorial and the user manual.

Also resurrect the last version of `git-log`, `git-whatchanged`, and
`git-show` to serve as examples to contrib/examples/ directory.

While at it, remove 'whatchanged' from a list of sample commands
that are affected by GIT_FLUSH environment variable. This is not
meant to be an exhaustive list but as a list of typical ones, and an
old command that is kept primarily for backward compatibility does
not belong to it.

Helped-by: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-08-13 09:01:52 -07:00
Junio C Hamano 0bde8c0c1e Git 1.8.3.4
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.10 (GNU/Linux)
 
 iQIcBAABAgAGBQJR7Xg1AAoJELC16IaWr+bLT2cQANXHMbmOLXLqaXf1/HhhcKza
 umI8UaVEBLWyD9dopiygTRTIWD5NLj8DXfEIQ6uADlRIQiZD21wG3m/HD2mfsDEg
 Dzx9AQAz5akOyRjbWTR/LEfgSZq836kkmWXI5gLPTqzAn2pG9PaIrO+9StTvLL1f
 CVPJOOO5ceyby13BNmuUynOLCTBc7+a2lU+Pw3fgQNSnkikjJHeOpvtbz3lbW+0i
 seFOZniqZJKQsOy9u5jvO4yXDiJ/Lnaxu8L+TEWKSxmks5lISTz7vybEpCp8pjHp
 AuUV2+kCHgCG7rm+uTzG0SHmWnviEgGTusTKvk7E8v+gzj6yFO812wHq/awyGgBT
 Voo4v9twflY3LoxVZPEJLRilqU3tuRKp57URlYThg2mjLaR8Jo8M5XOKTumbJjPE
 LaIj3XsADjhl6qZ3wMZnpcVETLwAhjXuSD2LsA2iYSMhtrVGsfvwUiSCfPWA7yZM
 oYK4zrs3QpWv+Ll1txP1B2I1W4LhT5bJV+YScnIr9XJRL+DboZ2ng1iVvbqdMNIv
 sk0ZrVxVi3pD9XthmWDNK8TbIzK151JYTp7fa93VwmjtCjjzIO8QNkGGPhGeWjrS
 0KUI0WsvNLhAoVvWMlHueA/aQFCjUzZyoQn+6WeCZz8MqssKSNnWl9On9BOa1HyW
 qvaD4JPNRscR0mgMkeC7
 =28j+
 -----END PGP SIGNATURE-----

Sync with Git 1.8.3.4
2013-07-22 11:34:25 -07:00
Junio C Hamano 117eea7eaa Git 1.8.3.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-22 11:21:34 -07:00
Nguyễn Thái Ngọc Duy 93d9353716 parse_pathspec: accept :(icase)path syntax
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-15 12:14:38 -07:00
Nguyễn Thái Ngọc Duy bd30c2e484 pathspec: support :(glob) syntax
:(glob)path differs from plain pathspec that it uses wildmatch with
WM_PATHNAME while the other uses fnmatch without FNM_PATHNAME. The
difference lies in how '*' (and '**') is processed.

With the introduction of :(glob) and :(literal) and their global
options --[no]glob-pathspecs, the user can:

 - make everything literal by default via --noglob-pathspecs
   --literal-pathspecs cannot be used for this purpose as it
   disables _all_ pathspec magic.

 - individually turn on globbing with :(glob)

 - make everything globbing by default via --glob-pathspecs

 - individually turn off globbing with :(literal)

The implication behind this is, there is no way to gain the default
matching behavior (i.e. fnmatch without FNM_PATHNAME). You either get
new globbing or literal. The old fnmatch behavior is considered
deprecated and discouraged to use.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-15 10:56:10 -07:00
Nguyễn Thái Ngọc Duy a16bf9dd74 pathspec: make --literal-pathspecs disable pathspec magic
--literal-pathspecs and its equivalent environment variable are
probably used for scripting. In that setting, pathspec magic may be
unwanted. Disabling globbing in individual pathspec can be done via
:(literal) magic.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-15 10:56:09 -07:00
Junio C Hamano dbc96a77a4 Sync with 1.8.3.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-15 10:45:02 -07:00
Junio C Hamano 5addd1c753 Git 1.8.3.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-15 10:39:43 -07:00
Junio C Hamano 213d25648a Merge branch 'cr/git-work-tree-sans-git-dir' into maint
* cr/git-work-tree-sans-git-dir:
  git.txt: remove stale comment regarding GIT_WORK_TREE
2013-07-03 15:41:05 -07:00
Junio C Hamano 3c36e8a40d Sync with 1.8.3.2 2013-06-28 14:57:09 -07:00
Junio C Hamano 3a461832c5 Git 1.8.3.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-06-28 14:56:30 -07:00
Junio C Hamano 8f0c843aab Merge branch 'nd/traces'
* nd/traces:
  git.txt: document GIT_TRACE_PACKET
  core: use env variable instead of config var to turn on logging pack access
2013-06-20 16:02:28 -07:00
Junio C Hamano c3e2d18996 setup_reflog_action: document the rules for using GIT_REFLOG_ACTION
The set_reflog_action helper (in git-sh-setup) is designed to be
used once at the very top of a program, like this in "git am", for
example:

	set_reflog_action am

The helper function sets the given string to GIT_REFLOG_ACTION only
when GIT_REFLOG_ACTION is not yet set.  Thanks to this, "git am",
when run as the top-level program, will use "am" in GIT_REFLOG_ACTION
and the reflog entries made by whatever it does will record the
updates of refs done by "am".

Because of the conditional assignment, when "git am" is run as a
subprogram (i.e. an implementation detail) of "git rebase" that
already sets GIT_REFLOG_ACTION to its own name, the call in "git am"
to the helper function at the beginning will *not* have any effect.

So "git rebase" can do this:

	set_reflog_action rebase
	... do its own preparation, like checking out "onto" commit
        ... decide to do "format-patch" to "am" pipeline
        	git format-patch --stdout >mbox
		git am mbox

and the reflog entries made inside "git am" invocation will say
"rebase", not "am".

Calls to "git" commands that update refs would use GIT_REFLOG_ACTION
to record who did that update.  Most such calls in scripted Porcelains
do not define custom reflog message and rely on GIT_REFLOG_ACTION to
contain its (or its caller's, when it is called as a subprogram) name.

If a scripted Porcelain wants to record a custom reflog message for
a single invocation of "git" command (e.g. when "git rebase" uses
"git checkout" to detach HEAD at the commit a series is to be
replayed on), it needs to set GIT_REFLOG_ACTION to the custom
message and export it while calling the "git" command, but such an
assignment must be restricted to that single "git" invocation and
should not be left behind to affect later codepath.

Document the rules to avoid future confusion.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-06-19 10:54:00 -07:00
Junio C Hamano b1bd929611 Merge branch 'cr/git-work-tree-sans-git-dir'
These days, "git --work-tree=there cmd" without specifying an
explicit --git-dir=here will do the usual discovery, but we had a
description of older behaviour in the documentation.

* cr/git-work-tree-sans-git-dir:
  git.txt: remove stale comment regarding GIT_WORK_TREE
2013-06-11 13:31:01 -07:00
Junio C Hamano 39fd762572 Sync with 1.8.3.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-06-10 12:35:45 -07:00
Junio C Hamano 362de916c0 Git 1.8.3.1
Primarily to push out two regression issues that seem to affect many
people, namely, the ".gitignore !directory" bug and "daemon cannot
read from $HOME owned by root" bug.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-06-10 12:34:42 -07:00
Nguyễn Thái Ngọc Duy 1dd278ce60 git.txt: document GIT_TRACE_PACKET
"This can help with debugging object negotiation or other protocol
issues."

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-06-09 16:16:06 -07:00
Nguyễn Thái Ngọc Duy b12ca9631f core: use env variable instead of config var to turn on logging pack access
5f44324 (core: log offset pack data accesses happened - 2011-07-06)
provides a way to observe pack access patterns via a config
switch. Setting an environment variable looks more obvious than a
config var, especially when you just need to _observe_, and more
inline with other tracing knobs we have.

Document it as it may be useful for remote troubleshooting.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-06-09 16:07:50 -07:00
Chris Rorvick a758a3499f git.txt: remove stale comment regarding GIT_WORK_TREE
Official support for specifying --work-tree/GIT_WORK_TREE without
--git-dir/GIT_DIR was added with v1.7.4-rc3~2^2~2.  Update description
of GIT_WORK_TREE to reflect this.

Signed-off-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-06-03 10:20:43 -07:00
Junio C Hamano 54219a4d89 Start 1.8.4 cycle
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-29 15:19:12 -07:00
Junio C Hamano c51afbbd18 Merge branch 'as/check-ignore'
Enhance "check-ignore" (1.8.2 update) to work more like "check-attr"
over bidi-pipes.

* as/check-ignore:
  t0008: use named pipe (FIFO) to test check-ignore streaming
  Documentation: add caveats about I/O buffering for check-{attr,ignore}
  check-ignore: allow incremental streaming of queries via --stdin
  check-ignore: move setup into cmd_check_ignore()
  check-ignore: add -n / --non-matching option
  t0008: remove duplicated test fixture data
2013-05-29 14:23:40 -07:00
Junio C Hamano 92758dd2a2 Git 1.8.2.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-09 13:31:17 -07:00
Junio C Hamano 4a9a4f0ec1 Git 1.8.2.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-26 12:59:36 -07:00
Thomas Ackermann d5fa1f1a69 The name of the hash function is "SHA-1", not "SHA1"
Use "SHA-1" instead of "SHA1" whenever we talk about the hash function.
When used as a programming symbol, we keep "SHA1".

Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-15 11:08:37 -07:00
Adam Spiers f1ed7fea79 Documentation: add caveats about I/O buffering for check-{attr,ignore}
check-attr and check-ignore have the potential to deadlock callers
which do not read back the output in real-time.  For example, if a
caller writes N paths out and then reads N lines back in, it risks
becoming blocked on write() to check-*, and check-* is blocked on
write back to the caller.  Somebody has to buffer; the pipe buffers
provide some leeway, but they are limited.

Thanks to Peff for pointing this out:

    http://article.gmane.org/gmane.comp.version-control.git/220534

Signed-off-by: Adam Spiers <git@adamspiers.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-11 11:11:36 -07:00
Junio C Hamano 5bda18c186 Git 1.8.2.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-07 15:27:23 -07:00
Junio C Hamano 6466fbbeef Sync with 1.8.1.6 2013-04-07 13:17:50 -07:00
Junio C Hamano 2137ce01f8 Git 1.8.1.6
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-07 08:58:30 -07:00
Junio C Hamano f4ccd9f1bd Merge branch 'maint-1.8.1' into maint
* maint-1.8.1:
  Correct the docs about GIT_SSH.
2013-03-26 13:14:11 -07:00
Dan Bornstein e39c695d87 Correct the docs about GIT_SSH.
In particular, it can get called with four arguments if you happen to
be referring to a repo using the ssh:// scheme with a non-default port
number.

Signed-off-by: Dan Bornstein <danfuzz@milk.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-03-26 07:53:13 -07:00
Junio C Hamano 239222f587 Git 1.8.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-03-13 11:28:08 -07:00
Junio C Hamano 5d4ef1721a Merge branch 'mh/maint-ceil-absolute' into maint
* mh/maint-ceil-absolute:
  Provide a mechanism to turn off symlink resolution in ceiling paths
2013-03-07 12:49:57 -08:00
Junio C Hamano 06d67b8766 Sync with 1.8.1.5 2013-03-01 13:17:18 -08:00
Junio C Hamano e6363a4992 Git 1.8.1.5
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-03-01 13:15:29 -08:00
Junio C Hamano 3e07d2683d Merge branch 'mh/maint-ceil-absolute'
An earlier workaround designed to help people who list logical
directories that will not match what getcwd(3) returns in the
GIT_CEILING_DIRECTORIES had an adverse effect when it is slow to
stat and readlink a directory component of an element listed on it.

* mh/maint-ceil-absolute:
  Provide a mechanism to turn off symlink resolution in ceiling paths
2013-02-27 09:47:28 -08:00
Junio C Hamano 5cc5f09b7b Merge branch 'mm/config-intro-in-git-doc' into maint
* mm/config-intro-in-git-doc:
  git.txt: update description of the configuration mechanism
2013-02-25 08:04:18 -08:00
Michael Haggerty 7ec30aaa5b Provide a mechanism to turn off symlink resolution in ceiling paths
Commit 1b77d83cab 'setup_git_directory_gently_1(): resolve symlinks
in ceiling paths' changed the setup code to resolve symlinks in the
entries in GIT_CEILING_DIRECTORIES.  Because those entries are
compared textually to the symlink-resolved current directory, an
entry in GIT_CEILING_DIRECTORIES that contained a symlink would have
no effect.  It was known that this could cause performance problems
if the symlink resolution *itself* touched slow filesystems, but it
was thought that such use cases would be unlikely.  The intention of
the earlier change was to deal with a case when the user has this:

	GIT_CEILING_DIRECTORIES=/home/gitster

but in reality, /home/gitster is a symbolic link to somewhere else,
e.g. /net/machine/home4/gitster. A textual comparison between the
specified value /home/gitster and the location getcwd(3) returns
would not help us, but readlink("/home/gitster") would still be
fast.

After this change was released, Anders Kaseorg <andersk@mit.edu>
reported:

> [...] my computer has been acting so slow when I’m not connected to
> the network.  I put various network filesystem paths in
> $GIT_CEILING_DIRECTORIES, such as
> /afs/athena.mit.edu/user/a/n/andersk (to avoid hitting its parents
> /afs/athena.mit.edu, /afs/athena.mit.edu/user/a, and
> /afs/athena.mit.edu/user/a/n which all live in different AFS
> volumes).  Now when I’m not connected to the network, every
> invocation of Git, including the __git_ps1 in my shell prompt, waits
> for AFS to timeout.

To allow users to work around this problem, give them a mechanism to
turn off symlink resolution in GIT_CEILING_DIRECTORIES entries.  All
the entries that follow an empty entry will not be checked for symbolic
links and used literally in comparison.  E.g. with these:

	GIT_CEILING_DIRECTORIES=:/foo/bar:/xyzzy or
	GIT_CEILING_DIRECTORIES=/foo/bar::/xyzzy

we will not readlink("/xyzzy") because it comes after an empty entry.

With the former (but not with the latter), "/foo/bar" comes after an
empty entry, and we will not readlink it, either.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-22 11:37:34 -08:00
Junio C Hamano b3600c3628 Sync with v1.8.1.4 2013-02-19 21:57:27 -08:00
Junio C Hamano dff9f8835f Git 1.8.1.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-19 21:54:22 -08:00
Junio C Hamano 48050fbe15 Merge branch 'mm/config-intro-in-git-doc'
* mm/config-intro-in-git-doc:
  git.txt: update description of the configuration mechanism
2013-02-18 16:04:58 -08:00
Matthieu Moy c0179c0d33 git.txt: update description of the configuration mechanism
The old Git version where it appeared is now useful only to historians,
not to normal users. Also, the text was mentioning only the per-repo
config file, but this is a good place to teach that customization can
also be made per-user.

While at it, remove a now-defunct e-mail from an example.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-15 09:05:55 -08:00
Junio C Hamano c86223b272 Sync with 1.8.1.3 2013-02-07 15:21:49 -08:00
Junio C Hamano f350082525 Git 1.8.1.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-07 15:21:10 -08:00
Thomas Ackermann 2de9b71138 Documentation: the name of the system is 'Git', not 'git'
Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-01 13:53:33 -08:00
Thomas Ackermann 48a8c26c62 Documentation: avoid poor-man's small caps GIT
In the earlier days, we used to spell the name of the system as GIT,
to simulate as if it were typeset with capital G and IT in small
caps.  Later we stopped doing so at around 1.6.5 days.

Let's stop doing so throughout the documentation.  The name to refer
to the whole system (and the concept it embodies) is "Git"; the
command end-users type is "git".  And document this in the coding
guideline.

Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-01 13:53:25 -08:00
Junio C Hamano eacf011775 Sync with 1.8.1.1 2013-01-14 08:22:27 -08:00
Junio C Hamano e4f59a32de Git 1.8.1.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-01-14 08:04:50 -08:00
Junio C Hamano e6f1550aa5 Merge branch 'jn/warn-on-inaccessible-loosen' into maint
When attempting to read the XDG-style $HOME/.config/git/config and
finding that $HOME/.config/git is a file, we gave a wrong error
message, instead of treating the case as "a custom config file does
not exist there" and moving on.

* jn/warn-on-inaccessible-loosen:
  config: exit on error accessing any config file
  doc: advertise GIT_CONFIG_NOSYSTEM
  config: treat user and xdg config permission problems as errors
  config, gitignore: failure to access with ENOTDIR is ok
2013-01-11 16:47:07 -08:00
Junio C Hamano 4f43e9726a Merge branch 'jn/warn-on-inaccessible-loosen'
Deal with a situation where .config/git is a file and we notice
.config/git/config is not readable due to ENOTDIR, not ENOENT.

* jn/warn-on-inaccessible-loosen:
  config: exit on error accessing any config file
  doc: advertise GIT_CONFIG_NOSYSTEM
  config: treat user and xdg config permission problems as errors
  config, gitignore: failure to access with ENOTDIR is ok
2013-01-06 22:11:16 -08:00
Junio C Hamano 971e829cd8 Merge branch 'jk/pathspec-literal'
Allow scripts to feed literal paths to commands that take
pathspecs, by disabling wildcard globbing.

* jk/pathspec-literal:
  add global --literal-pathspecs option

Conflicts:
	dir.c
2013-01-05 23:42:07 -08:00
Junio C Hamano 5d417842ef Git 1.8.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-31 14:25:57 -08:00
Junio C Hamano 15999998fb Git 1.8.0.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-27 15:57:20 -08:00
Junio C Hamano 6ecc01f26c git(1): show link to contributor summary page
We earlier removed a link to list of contributors that pointed to a
defunct page; let's use a working one from Ohloh.net to replace it
instead.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-27 15:40:09 -08:00
Jeff King 823ab40fd4 add global --literal-pathspecs option
Git takes pathspec arguments in many places to limit the
scope of an operation. These pathspecs are treated not as
literal paths, but as glob patterns that can be fed to
fnmatch. When a user is giving a specific pattern, this is a
nice feature.

However, when programatically providing pathspecs, it can be
a nuisance. For example, to find the latest revision which
modified "$foo", one can use "git rev-list -- $foo". But if
"$foo" contains glob characters (e.g., "f*"), it will
erroneously match more entries than desired. The caller
needs to quote the characters in $foo, and even then, the
results may not be exactly the same as with a literal
pathspec. For instance, the depth checks in
match_pathspec_depth do not kick in if we match via fnmatch.

This patch introduces a global command-line option (i.e.,
one for "git" itself, not for specific commands) to turn
this behavior off. It also has a matching environment
variable, which can make it easier if you are a script or
porcelain interface that is going to issue many such
commands.

This option cannot turn off globbing for particular
pathspecs. That could eventually be done with a ":(noglob)"
magic pathspec prefix. However, that level of granularity is
more cumbersome to use for many cases, and doing ":(noglob)"
right would mean converting the whole codebase to use
"struct pathspec", as the usual "const char **pathspec"
cannot represent extra per-item flags.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-19 14:58:59 -08:00
Junio C Hamano 790c83cda9 Merge branch 'maint' 2012-12-13 11:13:56 -08:00
Manlio Perillo 75940a001a git.txt: add missing info about --git-dir command-line option
Unlike other environment variables (e.g. GIT_WORK_TREE,	GIT_NAMESPACE),
the Documentation/git.txt file did not mention that the GIT_DIR
environment variable can also be set using the --git-dir command line
option.

Signed-off-by: Manlio Perillo <manlio.perillo@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-13 10:54:01 -08:00
Junio C Hamano 24a62db7bb git(1): show link to contributor summary page
We earlier removed a link to list of contributors that pointed to a
defunct page; let's use a working one from Ohloh.net to replace it
instead.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-12 11:58:17 -08:00
Junio C Hamano 3e53891f85 Git 1.8.0.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-10 13:05:47 -08:00
Junio C Hamano ac046c0e8c git(1): remove a defunct link to "list of authors"
The linked page has not been showing the promised "more complete
list" for more than 6 months by now, and nobody has resurrected
the list there nor elsewhere since then.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-09 00:33:04 -08:00
Junio C Hamano ed9fe75513 Git 1.8.0.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-25 18:40:34 -08:00
Junio C Hamano 8c7a786b6c Git 1.8.0
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-10-21 13:56:23 -07:00
Junio C Hamano 7e2010537e Git 1.7.12.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-10-17 10:36:42 -07:00
Jonathan Nieder e8ef401cd0 doc: advertise GIT_CONFIG_NOSYSTEM
On a multiuser system where mortals do not have write access to /etc,
the GIT_CONFIG_NOSYSTEM variable is the best tool we have to keep
getting work done when a syntax error or other problem renders
/etc/gitconfig buggy, until the sysadmin sorts the problem out.

Noticed while experimenting with teaching git to error out when
/etc/gitconfig is unreadable.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-10-14 10:14:46 -07:00
Junio C Hamano 234cd45662 Git 1.7.12.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-10-08 11:40:43 -07:00
Junio C Hamano d8cf053dac Git 1.7.12.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-09-29 23:20:47 -07:00
Junio C Hamano 304b7d99a7 Git 1.7.12.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-09-18 14:34:31 -07:00
Junio C Hamano c336bc104c Sync with 1.7.11.7 2012-09-14 21:20:40 -07:00
Junio C Hamano bafc478f16 Git 1.7.11.7
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-09-14 20:57:23 -07:00
Junio C Hamano 1c88a6d174 Sync with 1.7.11.6
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-09-11 11:23:54 -07:00
Junio C Hamano e09e4024a0 Git 1.7.11.6
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-09-11 11:18:48 -07:00
Junio C Hamano 2af6d98a5e Merge branch 'jc/doc-git-updates' into maint
* jc/doc-git-updates:
  Documentation: update the introductory section
2012-09-11 11:06:19 -07:00
Junio C Hamano 889d35899b Git 1.7.12
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-08-19 17:02:11 -07:00
Junio C Hamano 91e4bfe96f Merge branch 'jc/doc-git-updates' (early part)
* 'jc/doc-git-updates' (early part):
  Documentation: update URL for formatted pages
2012-08-17 13:27:10 -07:00
Junio C Hamano 7687ae98e0 Documentation: update the introductory section
The second paragraph in the git(1) description section were meant to
guide people who are not ready to dive into this page away from here.
Referring migrating CVS users to another page before they get
acquainted with Git was somewhat out of place.  Move the reference to
the "FURTHER DOCUMENTATION" section and push that section down.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-08-17 13:26:20 -07:00
Junio C Hamano c70c09b6fc Documentation: update URL for formatted pages
The one at kernel.org has not been updated for quite a while and
can no longer be called "the latest".

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-08-17 13:25:43 -07:00
Junio C Hamano cd7c0be19f Git 1.7.11.5
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-08-15 13:39:53 -07:00
Junio C Hamano 0e4c8822e9 Git 1.7.11.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-30 13:16:51 -07:00
Junio C Hamano e6dfbcf12b Git 1.7.11.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-22 13:07:40 -07:00