]> git.ipfire.org Git - thirdparty/git.git/log
thirdparty/git.git
10 years agot7600: fix typo in test title
Junio C Hamano [Tue, 23 Jul 2013 17:08:40 +0000 (10:08 -0700)] 
t7600: fix typo in test title

Spotted by Ram, confirmed by Miklos.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agomerge: handle --ff/--no-ff/--ff-only as a tri-state option
Miklos Vajna [Tue, 2 Jul 2013 14:47:57 +0000 (16:47 +0200)] 
merge: handle --ff/--no-ff/--ff-only as a tri-state option

These three options mean "favor fast-forwarding when possible,
without creating an unnecessary merge", "never fast-forward and
always create a merge commit even when the commit being merged is a
strict descendant", and "we do not want to create any merge commit;
update only when the merged commit is a strict descendant".

They are "pick one out of these three possibilities" options, and
correspond to "merge.ff" configuration that is tri-state (yes, no
and only).

However, the implementation did not follow the usual convention for
the command line options (later one wins, and command line overrides
what is in the configuration).

Fix this by consolidating two variables (fast_forward_only and
allow_fast_forward) used in the implementation into one enum that
can take one of the three possible values.

Signed-off-by: Miklos Vajna <vmiklos@suse.cz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoMerge branch 'maint'
Junio C Hamano [Sun, 30 Jun 2013 22:45:43 +0000 (15:45 -0700)] 
Merge branch 'maint'

* maint:
  Start preparing for 1.8.3.3
  check-ignore doc: fix broken link to ls-files page
  test: spell 'ls-files --delete' option correctly in test descriptions

10 years agoUpdate draft release notes to 1.8.4
Junio C Hamano [Sun, 30 Jun 2013 22:45:26 +0000 (15:45 -0700)] 
Update draft release notes to 1.8.4

Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoMerge branch 'mh/ref-races'
Junio C Hamano [Sun, 30 Jun 2013 22:40:01 +0000 (15:40 -0700)] 
Merge branch 'mh/ref-races'

"git pack-refs" that races with new ref creation or deletion have
been susceptible to lossage of refs under right conditions, which
has been tightened up.

* mh/ref-races:
  for_each_ref: load all loose refs before packed refs
  get_packed_ref_cache: reload packed-refs file when it changes
  add a stat_validity struct
  Extract a struct stat_data from cache_entry
  packed_ref_cache: increment refcount when locked
  do_for_each_entry(): increment the packed refs cache refcount
  refs: manage lifetime of packed refs cache via reference counting
  refs: implement simple transactions for the packed-refs file
  refs: wrap the packed refs cache in a level of indirection
  pack_refs(): split creation of packed refs and entry writing
  repack_without_ref(): split list curation and entry writing

10 years agoMerge branch 'ap/diff-ignore-blank-lines'
Junio C Hamano [Sun, 30 Jun 2013 22:39:53 +0000 (15:39 -0700)] 
Merge branch 'ap/diff-ignore-blank-lines'

"git diff" learned a mode that ignores hunks whose change consists
only of additions and removals of blank lines, which is the same as
"diff -B" (ignore blank lines) of GNU diff.

* ap/diff-ignore-blank-lines:
  diff: add --ignore-blank-lines option

10 years agoMerge branch 'mh/loose-refs-race-with-pack-ref'
Junio C Hamano [Sun, 30 Jun 2013 22:39:47 +0000 (15:39 -0700)] 
Merge branch 'mh/loose-refs-race-with-pack-ref'

We read loose and packed rerferences in two steps, but after
deciding to read a loose ref but before actually opening it to read
it, another process racing with us can unlink it, which would cause
us to barf. Update the codepath to retry when such a race is
detected.

* mh/loose-refs-race-with-pack-ref:
  resolve_ref_unsafe(): close race condition reading loose refs
  resolve_ref_unsafe(): handle the case of an SHA-1 within loop
  resolve_ref_unsafe(): extract function handle_missing_loose_ref()

10 years agoMerge branch 'nk/name-rev-abbreviated-refs'
Junio C Hamano [Sun, 30 Jun 2013 22:39:41 +0000 (15:39 -0700)] 
Merge branch 'nk/name-rev-abbreviated-refs'

"git name-rev --refs=tags/v*" were forbidden, which was a bit
inconvenient (you had to give a pattern to match refs fully, like
--refs=refs/tags/v*).

* nk/name-rev-abbreviated-refs:
  name-rev: allow to specify a subpath for --refs option

10 years agoMerge branch 'jk/submodule-subdirectory-ok'
Junio C Hamano [Sun, 30 Jun 2013 22:39:35 +0000 (15:39 -0700)] 
Merge branch 'jk/submodule-subdirectory-ok'

Allow various subcommands of "git submodule" to be run not from the
top of the working tree of the superproject.

* jk/submodule-subdirectory-ok:
  submodule: drop the top-level requirement
  rev-parse: add --prefix option
  submodule: show full path in error message
  t7403: add missing && chaining
  t7403: modernize style
  t7401: make indentation consistent

10 years agoStart preparing for 1.8.3.3
Junio C Hamano [Sun, 30 Jun 2013 22:36:03 +0000 (15:36 -0700)] 
Start preparing for 1.8.3.3

Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoMerge branch 'fc/macos-x-clipped-write' into maint
Junio C Hamano [Sun, 30 Jun 2013 22:33:40 +0000 (15:33 -0700)] 
Merge branch 'fc/macos-x-clipped-write' into maint

Mac OS X does not like to write(2) more than INT_MAX number of
bytes; work it around by chopping write(2) into smaller pieces.

* fc/macos-x-clipped-write:
  compate/clipped-write.c: large write(2) fails on Mac OS X/XNU

10 years agoMerge branch 'da/darwin' into maint
Junio C Hamano [Sun, 30 Jun 2013 22:33:13 +0000 (15:33 -0700)] 
Merge branch 'da/darwin' into maint

Newer MacOS X encourages the programs to compile and link with their
CommonCrypto, not with OpenSSL.

* da/darwin:
  imap-send: eliminate HMAC deprecation warnings on Mac OS X
  cache.h: eliminate SHA-1 deprecation warnings on Mac OS X
  Makefile: add support for Apple CommonCrypto facility
  Makefile: fix default regex settings on Darwin

10 years agocheck-ignore doc: fix broken link to ls-files page
Ramkumar Ramachandra [Sun, 30 Jun 2013 12:05:28 +0000 (17:35 +0530)] 
check-ignore doc: fix broken link to ls-files page

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agotest: spell 'ls-files --delete' option correctly in test descriptions
SZEDER Gábor [Sun, 30 Jun 2013 10:45:25 +0000 (12:45 +0200)] 
test: spell 'ls-files --delete' option correctly in test descriptions

The option is spelled '--deleted'.

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoSync with 1.8.3.2
Junio C Hamano [Fri, 28 Jun 2013 21:57:09 +0000 (14:57 -0700)] 
Sync with 1.8.3.2

10 years agoGit 1.8.3.2 v1.8.3.2
Junio C Hamano [Fri, 28 Jun 2013 21:56:30 +0000 (14:56 -0700)] 
Git 1.8.3.2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoconfigure: fix option help message for --disable-pthreads
Stefano Lattarini [Fri, 28 Jun 2013 17:19:42 +0000 (19:19 +0200)] 
configure: fix option help message for --disable-pthreads

The configure option to disable threading is '--disable-pthreads',
not '--without-pthreads'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoMerge branch 'nd/clone-connectivity-shortcut' (early part) into maint
Junio C Hamano [Fri, 28 Jun 2013 17:00:00 +0000 (10:00 -0700)] 
Merge branch 'nd/clone-connectivity-shortcut' (early part) into maint

Cloning with "git clone --depth N" while fetch.fsckobjects (or
transfer.fsckobjects) is set to true did not tell the cut-off points
of the shallow history to the process that validates the objects and
the history received, causing the validation to fail.

* 'nd/clone-connectivity-shortcut' (early part):
  fetch-pack: prepare updated shallow file before fetching the pack
  clone: let the user know when check_everything_connected is run

10 years agoMerge branch 'maint'
Junio C Hamano [Thu, 27 Jun 2013 21:48:54 +0000 (14:48 -0700)] 
Merge branch 'maint'

* maint:
  Start preparing for 1.8.3.2

10 years agoStart preparing for 1.8.3.2
Junio C Hamano [Thu, 27 Jun 2013 21:48:14 +0000 (14:48 -0700)] 
Start preparing for 1.8.3.2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoMerge branch 'ks/difftool-dir-diff-copy-fix' into maint
Junio C Hamano [Thu, 27 Jun 2013 21:38:22 +0000 (14:38 -0700)] 
Merge branch 'ks/difftool-dir-diff-copy-fix' into maint

* ks/difftool-dir-diff-copy-fix:
  difftool --dir-diff: allow changing any clean working tree file

10 years agoMerge branch 'rr/push-head' into maint
Junio C Hamano [Thu, 27 Jun 2013 21:38:17 +0000 (14:38 -0700)] 
Merge branch 'rr/push-head' into maint

* rr/push-head:
  push: make push.default = current use resolved HEAD
  push: fail early with detached HEAD and current
  push: factor out the detached HEAD error message

10 years agoMerge branch 'fc/show-branch-in-rebase-am' into maint
Junio C Hamano [Thu, 27 Jun 2013 21:38:16 +0000 (14:38 -0700)] 
Merge branch 'fc/show-branch-in-rebase-am' into maint

* fc/show-branch-in-rebase-am:
  prompt: fix for simple rebase

10 years agoMerge branch 'tg/maint-zsh-svn-remote-prompt' into maint
Junio C Hamano [Thu, 27 Jun 2013 21:38:14 +0000 (14:38 -0700)] 
Merge branch 'tg/maint-zsh-svn-remote-prompt' into maint

* tg/maint-zsh-svn-remote-prompt:
  prompt: fix show upstream with svn and zsh

10 years agoMerge branch 'nd/urls-doc-no-file-hyperlink-fix' into maint
Junio C Hamano [Thu, 27 Jun 2013 21:38:12 +0000 (14:38 -0700)] 
Merge branch 'nd/urls-doc-no-file-hyperlink-fix' into maint

* nd/urls-doc-no-file-hyperlink-fix:
  urls.txt: avoid auto converting to hyperlink

10 years agoMerge branch 'tr/push-no-verify-doc' into maint
Junio C Hamano [Thu, 27 Jun 2013 21:38:09 +0000 (14:38 -0700)] 
Merge branch 'tr/push-no-verify-doc' into maint

* tr/push-no-verify-doc:
  Document push --no-verify

10 years agoMerge branch 'rs/commit-m-no-edit' into maint
Junio C Hamano [Thu, 27 Jun 2013 21:38:07 +0000 (14:38 -0700)] 
Merge branch 'rs/commit-m-no-edit' into maint

* rs/commit-m-no-edit:
  commit: don't start editor if empty message is given with -m

10 years agoMerge branch 'jc/strbuf-branchname-fix' into maint
Junio C Hamano [Thu, 27 Jun 2013 21:38:02 +0000 (14:38 -0700)] 
Merge branch 'jc/strbuf-branchname-fix' into maint

* jc/strbuf-branchname-fix:
  strbuf_branchname(): do not double-expand @{-1}~22

10 years agoMerge branch 'mk/combine-diff-context-horizon-fix' into maint
Junio C Hamano [Thu, 27 Jun 2013 21:37:55 +0000 (14:37 -0700)] 
Merge branch 'mk/combine-diff-context-horizon-fix' into maint

* mk/combine-diff-context-horizon-fix:
  combine-diff.c: Fix output when changes are exactly 3 lines apart

10 years agoMerge branch 'kb/ancestry-path-threedots' into maint
Junio C Hamano [Thu, 27 Jun 2013 21:37:52 +0000 (14:37 -0700)] 
Merge branch 'kb/ancestry-path-threedots' into maint

* kb/ancestry-path-threedots:
  revision.c: treat A...B merge bases as if manually specified
  t6019: demonstrate --ancestry-path A...B breakage

10 years agoMerge branch 'jk/subtree-do-not-push-if-split-fails' into maint
Junio C Hamano [Thu, 27 Jun 2013 21:37:44 +0000 (14:37 -0700)] 
Merge branch 'jk/subtree-do-not-push-if-split-fails' into maint

* jk/subtree-do-not-push-if-split-fails:
  contrib/subtree: don't delete remote branches if split fails

10 years agoMerge branch 'mh/fetch-into-shallow' into maint
Junio C Hamano [Thu, 27 Jun 2013 21:37:41 +0000 (14:37 -0700)] 
Merge branch 'mh/fetch-into-shallow' into maint

* mh/fetch-into-shallow:
  t5500: add test for fetching with an unknown 'shallow'
  upload-pack: ignore 'shallow' lines with unknown obj-ids

10 years agoMerge branch 'jh/checkout-auto-tracking' into maint
Junio C Hamano [Thu, 27 Jun 2013 21:37:21 +0000 (14:37 -0700)] 
Merge branch 'jh/checkout-auto-tracking' into maint

* jh/checkout-auto-tracking:
  glossary: Update and rephrase the definition of a remote-tracking branch
  branch.c: Validate tracking branches with refspecs instead of refs/remotes/*
  t9114.2: Don't use --track option against "svn-remote"-tracking branches
  t7201.24: Add refspec to keep --track working
  t3200.39: tracking setup should fail if there is no matching refspec.
  checkout: Use remote refspecs when DWIMming tracking branches
  t2024: Show failure to use refspec when DWIMming remote branch names
  t2024: Add tests verifying current DWIM behavior of 'git checkout <branch>'

10 years agoUpdate draft release notes to 1.8.4
Junio C Hamano [Thu, 27 Jun 2013 21:32:59 +0000 (14:32 -0700)] 
Update draft release notes to 1.8.4

Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoMerge branch 'jk/add-i-custom-diff-algo'
Junio C Hamano [Thu, 27 Jun 2013 21:30:07 +0000 (14:30 -0700)] 
Merge branch 'jk/add-i-custom-diff-algo'

* jk/add-i-custom-diff-algo:
  add -i: add extra options at the right place in "diff" command line
  add--interactive: respect diff.algorithm

10 years agoMerge branch 'rr/cherry-pick-fast-forward-reflog-message'
Junio C Hamano [Thu, 27 Jun 2013 21:29:59 +0000 (14:29 -0700)] 
Merge branch 'rr/cherry-pick-fast-forward-reflog-message'

The reflog message created when "git cherry-pick" fast-forwarded
did not say anything but "cherry-pick", but it now says
"cherry-pick: fast-forward".

* rr/cherry-pick-fast-forward-reflog-message:
  sequencer: write useful reflog message for fast-forward

10 years agoMerge branch 'mt/send-email-cc-match-fix'
Junio C Hamano [Thu, 27 Jun 2013 21:29:57 +0000 (14:29 -0700)] 
Merge branch 'mt/send-email-cc-match-fix'

Logic used by git-send-email to suppress cc mishandled names that
need RFC2047 quoting.

* mt/send-email-cc-match-fix:
  send-email: sanitize author when writing From line
  send-email: add test for duplicate utf8 name

10 years agoMerge branch 'jk/pull-into-dirty-unborn'
Junio C Hamano [Thu, 27 Jun 2013 21:29:52 +0000 (14:29 -0700)] 
Merge branch 'jk/pull-into-dirty-unborn'

"git pull" into nothing trashed "local changes" that were in the
index, and this avoids it.

* jk/pull-into-dirty-unborn:
  pull: merge into unborn by fast-forwarding from empty tree
  pull: update unborn branch tip after index

10 years agoMerge branch 'bc/http-keep-memory-given-to-curl'
Junio C Hamano [Thu, 27 Jun 2013 21:29:49 +0000 (14:29 -0700)] 
Merge branch 'bc/http-keep-memory-given-to-curl'

Older cURL wanted piece of memory we call it with to be stable, but
we updated the auth material after handing it to a call.

* bc/http-keep-memory-given-to-curl:
  http.c: don't rewrite the user:passwd string multiple times

10 years agoMerge branch 'bc/checkout-tracking-name-plug-leak'
Junio C Hamano [Thu, 27 Jun 2013 21:29:46 +0000 (14:29 -0700)] 
Merge branch 'bc/checkout-tracking-name-plug-leak'

Plug a small leak in checkout.

* bc/checkout-tracking-name-plug-leak:
  t/t9802: explicitly name the upstream branch to use as a base
  builtin/checkout.c: don't leak memory in check_tracking_name

10 years agoMerge branch 'rr/rebase-stash-store'
Junio C Hamano [Thu, 27 Jun 2013 21:29:41 +0000 (14:29 -0700)] 
Merge branch 'rr/rebase-stash-store'

Finishing touches for the "git rebase --autostash" feature
introduced earlier.

* rr/rebase-stash-store:
  rebase: use 'git stash store' to simplify logic
  stash: introduce 'git stash store'
  stash: simplify option parser for create
  stash doc: document short form -p in synopsis
  stash doc: add a warning about using create

10 years agoUpdate draft release notes to 1.8.4
Junio C Hamano [Wed, 26 Jun 2013 22:10:17 +0000 (15:10 -0700)] 
Update draft release notes to 1.8.4

Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoMerge branch 'tr/maint-apply-non-git-patch-parsefix'
Junio C Hamano [Wed, 26 Jun 2013 22:08:09 +0000 (15:08 -0700)] 
Merge branch 'tr/maint-apply-non-git-patch-parsefix'

Fix for the codepath to parse patches that add new files, generated
by programs other than Git.  THis is an old breakage in v1.7.11 and
will need to be merged down to the maintanance tracks.

* tr/maint-apply-non-git-patch-parsefix:
  apply: carefully strdup a possibly-NULL name

10 years agoMerge branch 'ys/cygstart'
Junio C Hamano [Wed, 26 Jun 2013 22:08:01 +0000 (15:08 -0700)] 
Merge branch 'ys/cygstart'

On Cygwin, recognize "cygstart" as a possible way to start a web
browser (used in "help -w" and "instaweb" among others).

* ys/cygstart:
  web--browse: support /usr/bin/cygstart on Cygwin

10 years agoMerge branch 'wk/doc-git-has-grown'
Junio C Hamano [Wed, 26 Jun 2013 22:07:55 +0000 (15:07 -0700)] 
Merge branch 'wk/doc-git-has-grown'

* wk/doc-git-has-grown:
  user-manual: Update download size for Git and the kernel

10 years agoMerge branch 'vl/typofix'
Junio C Hamano [Wed, 26 Jun 2013 22:07:52 +0000 (15:07 -0700)] 
Merge branch 'vl/typofix'

* vl/typofix:
  random typofixes (committed missing a 't', successful missing an 's')

10 years agoMerge branch 'ph/builtin-srcs-are-in-subdir-these-days'
Junio C Hamano [Wed, 26 Jun 2013 22:07:48 +0000 (15:07 -0700)] 
Merge branch 'ph/builtin-srcs-are-in-subdir-these-days'

* ph/builtin-srcs-are-in-subdir-these-days:
  fix "builtin-*" references to be "builtin/*"

10 years agoMerge branch 'mm/merge-in-dirty-worktree-doc'
Junio C Hamano [Wed, 26 Jun 2013 22:07:43 +0000 (15:07 -0700)] 
Merge branch 'mm/merge-in-dirty-worktree-doc'

* mm/merge-in-dirty-worktree-doc:
  Documentation/git-merge.txt: weaken warning about uncommited changes

10 years agoMerge branch 'kb/diff-blob-blob-doc'
Junio C Hamano [Wed, 26 Jun 2013 22:07:41 +0000 (15:07 -0700)] 
Merge branch 'kb/diff-blob-blob-doc'

* kb/diff-blob-blob-doc:
  Documentation: Move "git diff <blob> <blob>"

10 years agoMerge branch 'mm/push-force-is-dangerous'
Junio C Hamano [Wed, 26 Jun 2013 22:07:38 +0000 (15:07 -0700)] 
Merge branch 'mm/push-force-is-dangerous'

* mm/push-force-is-dangerous:
  Documentation/git-push.txt: explain better cases where --force is dangerous

10 years agoMerge branch 'fg/submodule-non-ascii-path'
Junio C Hamano [Wed, 26 Jun 2013 22:07:35 +0000 (15:07 -0700)] 
Merge branch 'fg/submodule-non-ascii-path'

Many "git submodule" operations do not work on a submodule at a
path whose name is not in ASCII.

* fg/submodule-non-ascii-path:
  t7400: test of UTF-8 submodule names pass under Mac OS
  handle multibyte characters in name

10 years agoUpdate draft release notes to 1.8.4
Junio C Hamano [Mon, 24 Jun 2013 20:53:03 +0000 (13:53 -0700)] 
Update draft release notes to 1.8.4

For now, comment out the description on two "git status" UI
configuration, until the reverted topic can be resurrected.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoMerge branch 'rr/am-quit-empty-then-abort-fix'
Junio C Hamano [Mon, 24 Jun 2013 20:49:00 +0000 (13:49 -0700)] 
Merge branch 'rr/am-quit-empty-then-abort-fix'

Recent "rebase --autostash" update made it impossible to recover
with "git am --abort" from a repository where "git am" without mbox
was run by mistake and then was killed with "^C".

* rr/am-quit-empty-then-abort-fix:
  t/am: use test_path_is_missing() where appropriate
  am: handle stray $dotest directory

10 years agoMerge branch 'rt/cherry-pick-continue-advice-in-status'
Junio C Hamano [Mon, 24 Jun 2013 20:48:57 +0000 (13:48 -0700)] 
Merge branch 'rt/cherry-pick-continue-advice-in-status'

* rt/cherry-pick-continue-advice-in-status:
  wt-status: give better advice when cherry-pick is in progress

10 years agoMerge branch 'nk/config-local-doc'
Junio C Hamano [Mon, 24 Jun 2013 20:48:55 +0000 (13:48 -0700)] 
Merge branch 'nk/config-local-doc'

* nk/config-local-doc:
  config: Add description of --local option

10 years agoMerge branch 'jk/mergetool-lib-refactor'
Junio C Hamano [Mon, 24 Jun 2013 20:48:53 +0000 (13:48 -0700)] 
Merge branch 'jk/mergetool-lib-refactor'

Code cleanup.

* jk/mergetool-lib-refactor:
  mergetool--lib: refactor {diff,merge}_cmd logic

10 years agoMerge branch 'jk/doc-build-move-infordir-def'
Junio C Hamano [Mon, 24 Jun 2013 20:48:51 +0000 (13:48 -0700)] 
Merge branch 'jk/doc-build-move-infordir-def'

Makefile cleanup.

* jk/doc-build-move-infordir-def:
  Documentation/Makefile: move infodir to be with other '*dir's
  Documentation/Makefile: fix spaces around assignments

10 years agoMerge branch 'fg/submodule-fixup'
Junio C Hamano [Mon, 24 Jun 2013 20:48:50 +0000 (13:48 -0700)] 
Merge branch 'fg/submodule-fixup'

Code cleanup.

* fg/submodule-fixup:
  git-submodule.sh: remove duplicate call to set_rev_name

10 years agoMerge branch 'dk/version-gen-gitdir'
Junio C Hamano [Mon, 24 Jun 2013 20:48:48 +0000 (13:48 -0700)] 
Merge branch 'dk/version-gen-gitdir'

Allow packaging a tarball in a working tree with $GIT_DIR set elsewhere.

* dk/version-gen-gitdir:
  GIT-VERSION-GEN: support non-standard $GIT_DIR path

10 years agoMerge branch 'dk/maint-t5150-dirname'
Junio C Hamano [Mon, 24 Jun 2013 20:48:46 +0000 (13:48 -0700)] 
Merge branch 'dk/maint-t5150-dirname'

Fix a test script.

* dk/maint-t5150-dirname:
  tests: allow sha1's as part of the path

10 years agoMerge branch 'rs/unpack-trees-tree-walk-conflict-field'
Junio C Hamano [Mon, 24 Jun 2013 20:48:44 +0000 (13:48 -0700)] 
Merge branch 'rs/unpack-trees-tree-walk-conflict-field'

Code clean-up.

* rs/unpack-trees-tree-walk-conflict-field:
  unpack-trees: don't shift conflicts left and right

10 years agoMerge branch 'rr/rebase-sha1-by-string-query'
Junio C Hamano [Mon, 24 Jun 2013 20:48:40 +0000 (13:48 -0700)] 
Merge branch 'rr/rebase-sha1-by-string-query'

Allow various commit objects to be given to "git rebase" by ':/look
for this string' syntax, e.g. "git rebase --onto ':/there'".

* rr/rebase-sha1-by-string-query:
  rebase: use peel_committish() where appropriate
  sh-setup: add new peel_committish() helper
  t/rebase: add failing tests for a peculiar revision

10 years agoMerge branch 'mm/rm-coalesce-errors'
Junio C Hamano [Mon, 24 Jun 2013 20:48:35 +0000 (13:48 -0700)] 
Merge branch 'mm/rm-coalesce-errors'

Give a single message followed by list of paths from "git rm" to
report multiple paths that cannot be removed.

* mm/rm-coalesce-errors:
  rm: introduce advice.rmHints to shorten messages
  rm: better error message on failure for multiple files

10 years agoMerge branch 'jh/libify-note-handling'
Junio C Hamano [Mon, 24 Jun 2013 20:48:30 +0000 (13:48 -0700)] 
Merge branch 'jh/libify-note-handling'

Make it possible to call into copy-notes API from the sequencer code.

* jh/libify-note-handling:
  Move create_notes_commit() from notes-merge.c into notes-utils.c
  Move copy_note_for_rewrite + friends from builtin/notes.c to notes-utils.c
  finish_copy_notes_for_rewrite(): Let caller provide commit message

10 years agoMerge branch 'fc/sequencer-plug-leak'
Junio C Hamano [Mon, 24 Jun 2013 20:48:28 +0000 (13:48 -0700)] 
Merge branch 'fc/sequencer-plug-leak'

Plug a small leak in an error codepath.

* fc/sequencer-plug-leak:
  sequencer: avoid leaking message buffer when refusing to create an empty commit
  sequencer: remove useless indentation

10 years agoRevert "Merge branch 'jg/status-config'"
Junio C Hamano [Mon, 24 Jun 2013 15:18:07 +0000 (08:18 -0700)] 
Revert "Merge branch 'jg/status-config'"

This reverts commit 1a22bd31f0a5130ce6c934951a5526ceb774c2be, reversing
changes made to 3e7a5b489e45ae8a3a0b222893d58b172d883136.

It makes it impossible to "git commit" when status.short is set, and
also "git status --porcelain" output is affected by status.branch.

10 years agoUpdate draft release notes to 1.8.4
Junio C Hamano [Sun, 23 Jun 2013 21:55:45 +0000 (14:55 -0700)] 
Update draft release notes to 1.8.4

Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoMerge branch 'mz/rebase-tests'
Junio C Hamano [Sun, 23 Jun 2013 21:53:26 +0000 (14:53 -0700)] 
Merge branch 'mz/rebase-tests'

* mz/rebase-tests:
  rebase topology tests: fix commit names on case-insensitive file systems
  tests: move test for rebase messages from t3400 to t3406
  t3406: modernize style
  add tests for rebasing merged history
  add tests for rebasing root
  add tests for rebasing of empty commits
  add tests for rebasing with patch-equivalence present
  add simple tests of consistency across rebase types

10 years agoMerge branch 'jk/unpack-entry-fallback-to-another'
Junio C Hamano [Sun, 23 Jun 2013 21:53:20 +0000 (14:53 -0700)] 
Merge branch 'jk/unpack-entry-fallback-to-another'

* jk/unpack-entry-fallback-to-another:
  unpack_entry: do not die when we fail to apply a delta
  t5303: drop "count=1" from corruption dd

10 years agoMerge branch 'jk/apache-test-for-2.4'
Junio C Hamano [Sun, 23 Jun 2013 21:53:17 +0000 (14:53 -0700)] 
Merge branch 'jk/apache-test-for-2.4'

* jk/apache-test-for-2.4:
  lib-httpd/apache.conf: check version only after mod_version loads
  t/lib-httpd/apache.conf: configure an MPM module for apache 2.4
  t/lib-httpd/apache.conf: load compat access module in apache 2.4
  t/lib-httpd/apache.conf: load extra auth modules in apache 2.4
  t/lib-httpd/apache.conf: do not use LockFile in apache >= 2.4

10 years agoMerge branch 'cm/remote-mediawiki-perlcritique'
Junio C Hamano [Sun, 23 Jun 2013 21:53:13 +0000 (14:53 -0700)] 
Merge branch 'cm/remote-mediawiki-perlcritique'

* cm/remote-mediawiki-perlcritique: (31 commits)
  git-remote-mediawiki: make error message more precise
  git-remote-mediawiki: add a perlcritic rule in Makefile
  git-remote-mediawiki: add a .perlcriticrc file
  git-remote-mediawiki: clearly rewrite double dereference
  git-remote-mediawiki: fix a typo ("mediwiki" instead of "mediawiki")
  git-remote-mediawiki: put non-trivial numeric values in constants.
  git-remote-mediawiki: don't use quotes for empty strings
  git-remote-mediawiki: replace "unless" statements with negated "if" statements
  git-remote-mediawiki: brace file handles for print for more clarity
  git-remote-mediawiki: modify strings for a better coding-style
  git-remote-mediawiki: put long code into a subroutine
  git-remote-mediawiki: remove import of unused open2
  git-remote-mediawiki: check return value of open
  git-remote-mediawiki: assign a variable as undef and make proper indentation
  git-remote-mediawiki: rename a variable ($last) which has the name of a keyword
  git-remote-mediawiki: remove unused variable $entry
  git-remote-mediawiki: turn double-negated expressions into simple expressions
  git-remote-mediawiki: change the name of a variable
  git-remote-mediawiki: add newline in the end of die() error messages
  git-remote-mediawiki: change style in a regexp
  ...

10 years agoMerge branch 'bp/remote-mw-tests'
Junio C Hamano [Sun, 23 Jun 2013 21:53:11 +0000 (14:53 -0700)] 
Merge branch 'bp/remote-mw-tests'

* bp/remote-mw-tests:
  git-remote-mediawiki: remove hardcoded version number in the test suite

10 years agoMerge branch 'rr/rebase-autostash'
Junio C Hamano [Sun, 23 Jun 2013 21:53:07 +0000 (14:53 -0700)] 
Merge branch 'rr/rebase-autostash'

* rr/rebase-autostash:
  rebase: finish_rebase() in noop rebase
  rebase: finish_rebase() in fast-forward rebase
  rebase: guard against missing files in read_basic_state()

10 years agoMerge branch 'rr/prompt-rebase-breakage-fix'
Junio C Hamano [Sun, 23 Jun 2013 21:53:05 +0000 (14:53 -0700)] 
Merge branch 'rr/prompt-rebase-breakage-fix'

* rr/prompt-rebase-breakage-fix:
  prompt: squelch error output from cat

10 years agoMerge branch 'jg/status-config'
Junio C Hamano [Sun, 23 Jun 2013 21:51:58 +0000 (14:51 -0700)] 
Merge branch 'jg/status-config'

"git status" learned status.branch and status.short configuration
variables to use --branch and --short options by default (override
with --no-branch and --no-short options from the command line).

* jg/status-config:
  status: introduce status.branch to enable --branch by default
  status: introduce status.short to enable --short by default

10 years agoadd -i: add extra options at the right place in "diff" command line
Junio C Hamano [Sun, 23 Jun 2013 19:19:05 +0000 (12:19 -0700)] 
add -i: add extra options at the right place in "diff" command line

Appending "--diff-algorithm=histogram" at the end of canned command
line for various modes of "diff" is correct for most of them but not
for "stash" that has a non-option already wired in, like so:

'stash' => {
DIFF => 'diff-index -p HEAD',

Appending an extra option after non-option may happen to work due to
overly lax command line parser, but that is not something we should
rely on.  Instead, splice in the extra argument immediately after the
command name (i.e. 'diff-index', 'diff-files', etc.).

Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agouser-manual: Update download size for Git and the kernel
W. Trevor King [Wed, 19 Jun 2013 01:55:22 +0000 (21:55 -0400)] 
user-manual: Update download size for Git and the kernel

They've grown since d19fbc3 (Documentation: add git user's manual,
2007-01-07) when the stats were initially added.  I've rounded
download sizes up to the nearest multiple of ten MiB to decrease the
precision and give a bit of growing room.  Exact sizes:

  $ git clone git://git.kernel.org/pub/scm/git/git.git
  Initialized empty Git repository in /tmp/git/.git/
  remote: Counting objects: 156872, done.
  remote: Compressing objects: 100% (40826/40826), done.
  remote: Total 156872 (delta 115322), reused 155492 (delta 114094)
  Receiving objects: 100% (156872/156872), 37.29 MiB | 7.54 MiB/s, done.
  Resolving deltas: 100% (115322/115322), done.

  $ git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
  Initialized empty Git repository in /tmp/linux/.git/
  remote: Counting objects: 3057404, done.
  remote: Compressing objects: 100% (474769/474769), done.
  Receiving objects: 100% (3057404/3057404), 634.33 MiB | 27.95 MiB/s, done.
  remote: Total 3057404 (delta 2570385), reused 3040910 (delta 2554408)
  Resolving deltas: 100% (2570385/2570385), done.
  Checking out files: 100% (43012/43012), done.

Signed-off-by: W. Trevor King <wking@tremily.us>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agolib-httpd/apache.conf: check version only after mod_version loads
Jeff King [Fri, 21 Jun 2013 18:12:51 +0000 (14:12 -0400)] 
lib-httpd/apache.conf: check version only after mod_version loads

Commit 0442743 introduced an <IfVersion> directive near the
top of the apache config file. However, at that point we
have not yet checked for and loaded the mod_version module.
This means that the directive will behave oddly if
mod_version is dynamically loaded, failing to match when it
should.

We can fix this by moving the whole block below the
LoadModule directive for mod_version.

Reported-by: Brian Gernhardt <brian@gernhardtsoftware.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoSync with maint
Junio C Hamano [Fri, 21 Jun 2013 18:26:41 +0000 (11:26 -0700)] 
Sync with maint

* maint:
  completion: complete diff --word-diff

10 years agoweb--browse: support /usr/bin/cygstart on Cygwin
Yaakov Selkowitz [Fri, 21 Jun 2013 07:24:32 +0000 (02:24 -0500)] 
web--browse: support /usr/bin/cygstart on Cygwin

While both GUI and console Cygwin browsers do exist, anecdotal evidence
suggests most users rely on their native Windows browser.  cygstart,
which is a long-standing part of the base Cygwin installation, will
cause the page to be opened in the default Windows browser (the one
registered to open .html files).

Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agotransport-helper: be quiet on read errors from helpers
Jeff King [Fri, 21 Jun 2013 07:05:39 +0000 (03:05 -0400)] 
transport-helper: be quiet on read errors from helpers

Prior to commit 81d340d4, we did not print any error message
if a remote transport helper died unexpectedly. If a helper
did not print any error message (e.g., because it crashed),
the user could be left confused. That commit tried to
rectify the situation by printing a note that the helper
exited unexpectedly.

However, this makes a much more common case worse: when a
helper does die with a useful message, we print the extra
"Reading from 'git-remote-foo failed" message. This can also
end up confusing users, as they may not even know what
remote helpers are (e.g., the fact that http support comes
through git-remote-https is purely an implementation detail
that most users do not know or care about).

Since we do not have a good way of knowing whether the
helper printed a useful error, and since the common failure
mode is for it to do so, let's default to remaining quiet.
Debuggers can dig further by setting GIT_TRANSPORT_HELPER_DEBUG.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agocompletion: complete diff --word-diff
Ramkumar Ramachandra [Tue, 18 Jun 2013 19:24:05 +0000 (00:54 +0530)] 
completion: complete diff --word-diff

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoapply: carefully strdup a possibly-NULL name
Thomas Rast [Fri, 21 Jun 2013 11:38:00 +0000 (13:38 +0200)] 
apply: carefully strdup a possibly-NULL name

2901bbe (apply: free patch->{def,old,new}_name fields, 2012-03-21)
cleaned up the memory management of filenames in the patches, but
forgot that find_name_traditional() can return NULL as a way of saying
"I couldn't find a name".

That NULL unfortunately gets passed into xstrdup() next, resulting in
a segfault.  Use null_strdup() so as to safely propagate the null,
which will let us emit the correct error message.

Reported-by: DevHC on #git
Signed-off-by: Thomas Rast <trast@inf.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoUpdate draft release notes to 1.8.4
Junio C Hamano [Thu, 20 Jun 2013 23:13:41 +0000 (16:13 -0700)] 
Update draft release notes to 1.8.4

10 years agoMerge branch 'cm/remote-mediawiki'
Junio C Hamano [Thu, 20 Jun 2013 23:02:42 +0000 (16:02 -0700)] 
Merge branch 'cm/remote-mediawiki'

* cm/remote-mediawiki:
  git-remote-mediawiki: display message when launched directly

10 years agoMerge branch 'rs/match-trees-refactor'
Junio C Hamano [Thu, 20 Jun 2013 23:02:40 +0000 (16:02 -0700)] 
Merge branch 'rs/match-trees-refactor'

Code cleanup.

* rs/match-trees-refactor:
  match-trees: factor out fill_tree_desc_strict

10 years agoMerge branch 'rs/logical-vs-binary-or'
Junio C Hamano [Thu, 20 Jun 2013 23:02:38 +0000 (16:02 -0700)] 
Merge branch 'rs/logical-vs-binary-or'

Code cleanup.

* rs/logical-vs-binary-or:
  use logical OR (||) instead of binary OR (|) in logical context

10 years agoMerge branch 'mm/color-auto-default'
Junio C Hamano [Thu, 20 Jun 2013 23:02:33 +0000 (16:02 -0700)] 
Merge branch 'mm/color-auto-default'

Flip the default for color.ui to 'auto', which is what many
tutorials recommend new users to do.

* mm/color-auto-default:
  make color.ui default to 'auto'
  config: refactor management of color.ui's default value

10 years agoMerge branch 'rs/discard-index-discard-array'
Junio C Hamano [Thu, 20 Jun 2013 23:02:30 +0000 (16:02 -0700)] 
Merge branch 'rs/discard-index-discard-array'

* rs/discard-index-discard-array:
  read-cache: free cache in discard_index
  read-cache: add simple performance test

10 years agoMerge branch 'nd/traces'
Junio C Hamano [Thu, 20 Jun 2013 23:02:28 +0000 (16:02 -0700)] 
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

10 years agoMerge branch 'fc/show-non-empty-errors-in-test'
Junio C Hamano [Thu, 20 Jun 2013 23:02:24 +0000 (16:02 -0700)] 
Merge branch 'fc/show-non-empty-errors-in-test'

* fc/show-non-empty-errors-in-test:
  test: test_must_be_empty helper

10 years agoMerge branch 'fc/makefile'
Junio C Hamano [Thu, 20 Jun 2013 23:02:21 +0000 (16:02 -0700)] 
Merge branch 'fc/makefile'

Makefile simplification.

* fc/makefile:
  Makefile: use $^ to avoid listing prerequisites on the command line
  build: do not install git-remote-testgit
  build: generate and clean test scripts

10 years agoMerge branch 'js/test-ln-s-add'
Junio C Hamano [Thu, 20 Jun 2013 23:02:18 +0000 (16:02 -0700)] 
Merge branch 'js/test-ln-s-add'

Many tests that check the behaviour of symbolic links stored in the
index or the tree objects do not have to be skipped on a filesystem
that lack symbolic link support.

* js/test-ln-s-add:
  t4011: remove SYMLINKS prerequisite
  t6035: use test_ln_s_add to remove SYMLINKS prerequisite
  t3509, t4023, t4114: use test_ln_s_add to remove SYMLINKS prerequisite
  t3100: use test_ln_s_add to remove SYMLINKS prerequisite
  t3030: use test_ln_s_add to remove SYMLINKS prerequisite
  t0000: use test_ln_s_add to remove SYMLINKS prerequisite
  tests: use test_ln_s_add to remove SYMLINKS prerequisite (trivial cases)
  tests: introduce test_ln_s_add
  t3010: modernize style
  test-chmtime: Fix exit code on Windows

10 years agoMerge branch 'nd/make-wildmatch-default'
Junio C Hamano [Thu, 20 Jun 2013 23:02:14 +0000 (16:02 -0700)] 
Merge branch 'nd/make-wildmatch-default'

* nd/make-wildmatch-default:
  Makefile: promote wildmatch to be the default fnmatch implementation

10 years agopull: merge into unborn by fast-forwarding from empty tree
Thomas Rast [Thu, 20 Jun 2013 22:38:28 +0000 (18:38 -0400)] 
pull: merge into unborn by fast-forwarding from empty tree

The logic for pulling into an unborn branch was originally
designed to be used on a newly-initialized repository
(d09e79c, git-pull: allow pulling into an empty repository,
2006-11-16).  It thus did not initially deal with
uncommitted changes in the unborn branch.  The case of an
_unstaged_ untracked file was fixed by 4b3ffe5 (pull: do not
clobber untracked files on initial pull, 2011-03-25).
However, it still clobbered existing staged files, both when
the file exists in the merged commit (it will be
overwritten), and when it does not (it will be deleted).

We fix this by doing a two-way merge, where the "current"
side of the merge is an empty tree, and the "target" side is
HEAD (already updated to FETCH_HEAD at this point).  This
amounts to claiming that all work in the index was done vs.
an empty tree, and thus all content of the index is
precious.

Note that this use of read-tree just gives us protection
against overwriting index and working tree changes. It will
not actually result in a 3-way merge conflict in the index.
This is fine, as this is a rare situation, and the conflict
would not be interesting anyway (it must, by definition, be
an add/add conflict with the whole content conflicting). And
it makes it simpler for the user to recover, as they have no
HEAD to "git reset" back to.

Reported-by: Stefan Schüßler <mail@stefanschuessler.de>
Signed-off-by: Thomas Rast <trast@inf.ethz.ch>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agopull: update unborn branch tip after index
Jeff King [Thu, 20 Jun 2013 22:36:31 +0000 (18:36 -0400)] 
pull: update unborn branch tip after index

When commit d09e79c taught git to pull into an unborn
branch, it first updated the unborn branch to point at the
pulled commit, and then used read-tree to update the index
and working tree. That ordering made sense, since any
failure of the latter step would be due to filesystem
errors, and one could then recover with "git reset --hard".

Later, commit 4b3ffe5 added extra safety for existing files
in the working tree by asking read-tree to bail out when it
would overwrite such a file. This error mode is much less
"your pull failed due to random errors" and more like "we
reject this pull because it would lose data". In that case,
it makes sense not to update the HEAD ref, just as a regular
rejected merge would do.

This patch reverses the order of the update-ref and
read-tree calls, so that we do not touch the HEAD ref at all if a
merge is rejected. This also means that we would not update
HEAD in case of a transient filesystem error, but those are
presumably less rare (and one can still recover by repeating
the pull, or by accessing FETCH_HEAD directly).

While we're reorganizing the code, we can drop the "exit 1"
from the end of our command chain. We exit immediately
either way, and just calling exit without an argument will
use the exit code from the last command.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agofor_each_ref: load all loose refs before packed refs
Jeff King [Thu, 20 Jun 2013 08:37:53 +0000 (10:37 +0200)] 
for_each_ref: load all loose refs before packed refs

If we are iterating through the refs using for_each_ref (or
any of its sister functions), we can get into a race
condition with a simultaneous "pack-refs --prune" that looks
like this:

  0. We have a large number of loose refs, and a few packed
     refs. refs/heads/z/foo is loose, with no matching entry
     in the packed-refs file.

  1. Process A starts iterating through the refs. It loads
     the packed-refs file from disk, then starts lazily
     traversing through the loose ref directories.

  2. Process B, running "pack-refs --prune", writes out the
     new packed-refs file. It then deletes the newly packed
     refs, including refs/heads/z/foo.

  3. Meanwhile, process A has finally gotten to
     refs/heads/z (it traverses alphabetically). It
     descends, but finds nothing there.  It checks its
     cached view of the packed-refs file, but it does not
     mention anything in "refs/heads/z/" at all (it predates
     the new file written by B in step 2).

The traversal completes successfully without mentioning
refs/heads/z/foo at all (the name, of course, isn't
important; but the more refs you have and the farther down
the alphabetical list a ref is, the more likely it is to hit
the race). If refs/heads/z/foo did exist in the packed refs
file at state 0, we would see an entry for it, but it would
show whatever sha1 the ref had the last time it was packed
(which could be an arbitrarily long time ago).

This can be especially dangerous when process A is "git
prune", as it means our set of reachable tips will be
incomplete, and we may erroneously prune objects reachable
from that tip (the same thing can happen if "repack -ad" is
used, as it simply drops unreachable objects that are
packed).

This patch solves it by loading all of the loose refs for
our traversal into our in-memory cache, and then refreshing
the packed-refs cache. Because a pack-refs writer will
always put the new packed-refs file into place before
starting the prune, we know that any loose refs we fail to
see will either truly be missing, or will have already been
put in the packed-refs file by the time we refresh.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoget_packed_ref_cache: reload packed-refs file when it changes
Jeff King [Thu, 20 Jun 2013 08:37:52 +0000 (10:37 +0200)] 
get_packed_ref_cache: reload packed-refs file when it changes

Once we read the packed-refs file into memory, we cache it
to save work on future ref lookups. However, our cache may
be out of date with respect to what is on disk if another
process is simultaneously packing the refs. Normally it
is acceptable for us to be a little out of date, since there
is no guarantee whether we read the file before or after the
simultaneous update. However, there is an important special
case: our packed-refs file must be up to date with respect
to any loose refs we read. Otherwise, we risk the following
race condition:

  0. There exists a loose ref refs/heads/master.

  1. Process A starts and looks up the ref "master". It
     first checks $GIT_DIR/master, which does not exist. It
     then loads (and caches) the packed-refs file to see if
     "master" exists in it, which it does not.

  2. Meanwhile, process B runs "pack-refs --all --prune". It
     creates a new packed-refs file which contains
     refs/heads/master, and removes the loose copy at
     $GIT_DIR/refs/heads/master.

  3. Process A continues its lookup, and eventually tries
     $GIT_DIR/refs/heads/master.  It sees that the loose ref
     is missing, and falls back to the packed-refs file. But
     it examines its cached version, which does not have
     refs/heads/master. After trying a few other prefixes,
     it reports master as a non-existent ref.

There are many variants (e.g., step 1 may involve process A
looking up another ref entirely, so even a fully qualified
refname can fail). One of the most interesting ones is if
"refs/heads/master" is already packed. In that case process
A will not see it as missing, but rather will report
whatever value happened to be in the packed-refs file before
process B repacked (which might be an arbitrarily old
value).

We can fix this by making sure we reload the packed-refs
file from disk after looking at any loose refs. That's
unacceptably slow, so we can check its stat()-validity as a
proxy, and read it only when it appears to have changed.

Reading the packed-refs file after performing any loose-ref
system calls is sufficient because we know the ordering of
the pack-refs process: it always makes sure the newly
written packed-refs file is installed into place before
pruning any loose refs. As long as those operations by B
appear in their executed order to process A, by the time A
sees the missing loose ref, the new packed-refs file must be
in place.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoadd a stat_validity struct
Michael Haggerty [Thu, 20 Jun 2013 08:37:51 +0000 (10:37 +0200)] 
add a stat_validity struct

It can sometimes be useful to know whether a path in the
filesystem has been updated without going to the work of
opening and re-reading its content. We trust the stat()
information on disk already to handle index updates, and we
can use the same trick here.

This patch introduces a "stat_validity" struct which
encapsulates the concept of checking the stat-freshness of a
file. It is implemented on top of "struct stat_data" to
reuse the logic about which stat entries to trust for a
particular platform, but hides the complexity behind two
simple functions: check and update.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoExtract a struct stat_data from cache_entry
Michael Haggerty [Thu, 20 Jun 2013 08:37:50 +0000 (10:37 +0200)] 
Extract a struct stat_data from cache_entry

Add public functions fill_stat_data() and match_stat_data() to work
with it.  This infrastructure will later be used to check the validity
of other types of file.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>