Commit Graph

33775 Commits

Author SHA1 Message Date
Junio C Hamano
adfc1857bd describe: fix --contains when a tag is given as input
"git describe" takes a commit and gives it a name based on tags in
its neighbourhood.  The command does take a commit-ish but when
given a tag that points at a commit, it should dereference the tag
before computing the name for the commit.

As the whole processing is internally delegated to name-rev, if we
unwrap tags down to the underlying commit when invoking name-rev, it
will make the name-rev issue an error message based on the unwrapped
object name (i.e. either 40-hex object name, or "$tag^0") that is
different from what the end-user gave to the command when the commit
cannot be described.  Introduce an internal option --peel-tag to the
name-rev to tell it to unwrap a tag in its input from the command
line.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-18 15:16:23 -07:00
Junio C Hamano
118aa4acff name-rev: differentiate between tags and commits they point at
"git name-rev --stdin" has been fixed to convert an object name that
points at a tag to a refname of the tag.  The codepath to handle its
command line arguments, however, fed the commit that the tag points
at to the underlying naming machinery.

With this fix, you will get this:

    $ git name-rev --refs=tags/\* --name-only $(git rev-parse v1.8.3 v1.8.3^0)
    v1.8.3
    v1.8.3^0

which is the same as what you would get from the fixed "--stdin" variant:

    $ git rev-parse v1.8.3 v1.8.3^0 | git name-rev --refs=tags/\* --name-only
    v1.8.3
    v1.8.3^0

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-18 15:16:23 -07:00
Junio C Hamano
45bc950b43 describe: use argv-array
Instead of using a hand allocated args[] array, use argv-array API
to manage the dynamically created list of arguments when invoking
name-rev.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-09 08:15:28 -07:00
Junio C Hamano
b23e0b9353 name-rev: allow converting the exact object name at the tip of a ref
"git name-rev" is supposed to convert given object names into
strings that name the same objects based on refs, that can be fed to
"git rev-parse" to get the same object names back, so the output for
the commit object v1.8.3^0 (i.e. the commit tagged as v1.8.3)

    $ git rev-parse v1.8.3 v1.8.3^0 | git name-rev --stdin
    8af06057d0c31a24e8737ae846ac2e116e8bafb9
    edca415256 (tags/v1.8.3^0)

has to have "^0" at the end, as "edca41" is a commit, not the tag
that references it.  But we do not get anything for the tag object
(8af0605) itself.

This is because the command however did not bother to see if the
object is at the tip of some ref, and failed to convert a tag
object.

Teach it to show this instead:

    $ git rev-parse v1.8.3 v1.8.3^0 | git name-rev --stdin
    8af06057d0c31a24e8737ae846ac2e116e8bafb9 (tags/v1.8.3)
    edca415256 (tags/v1.8.3^0)

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-09 08:14:05 -07:00
Junio C Hamano
9608a190c0 name-ref: factor out name shortening logic from name_ref()
The logic will be used in a new codepath for showing exact matches.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-07 15:32:23 -07:00
Junio C Hamano
96ffd4ca93 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
2013-06-30 15:39:41 -07:00
Junio C Hamano
d9857bfd4d 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
2013-06-30 15:39:35 -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
Stefano Lattarini
94b540479a 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>
2013-06-28 10:49:26 -07:00
Junio C Hamano
6653aa9ecd 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
2013-06-28 10:00:00 -07:00
Junio C Hamano
ebeea52870 Merge branch 'maint'
* maint:
  Start preparing for 1.8.3.2
2013-06-27 14:48:54 -07:00
Junio C Hamano
e2652c0bcf Start preparing for 1.8.3.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-06-27 14:48:14 -07:00
Junio C Hamano
88f90f8286 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
2013-06-27 14:38:23 -07:00
Junio C Hamano
6be17ec582 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
2013-06-27 14:38:17 -07:00
Junio C Hamano
c9cae1e28a Merge branch 'fc/show-branch-in-rebase-am' into maint
* fc/show-branch-in-rebase-am:
  prompt: fix for simple rebase
2013-06-27 14:38:16 -07:00
Junio C Hamano
f79467ef36 Merge branch 'tg/maint-zsh-svn-remote-prompt' into maint
* tg/maint-zsh-svn-remote-prompt:
  prompt: fix show upstream with svn and zsh
2013-06-27 14:38:14 -07:00
Junio C Hamano
fc78791b7c 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
2013-06-27 14:38:12 -07:00
Junio C Hamano
1ec379fff8 Merge branch 'tr/push-no-verify-doc' into maint
* tr/push-no-verify-doc:
  Document push --no-verify
2013-06-27 14:38:09 -07:00
Junio C Hamano
ee1a1ddf38 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
2013-06-27 14:38:07 -07:00
Junio C Hamano
872f5bfb08 Merge branch 'jc/strbuf-branchname-fix' into maint
* jc/strbuf-branchname-fix:
  strbuf_branchname(): do not double-expand @{-1}~22
2013-06-27 14:38:02 -07:00
Junio C Hamano
a0bf40ddc9 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
2013-06-27 14:37:56 -07:00
Junio C Hamano
81de16a5d5 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
2013-06-27 14:37:52 -07:00
Junio C Hamano
7f3447cce8 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
2013-06-27 14:37:44 -07:00
Junio C Hamano
0fb2c97c20 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
2013-06-27 14:37:41 -07:00
Junio C Hamano
11fbc0b1e1 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>'
2013-06-27 14:37:21 -07:00
Junio C Hamano
a75f9f053d Update draft release notes to 1.8.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-06-27 14:32:59 -07:00
Junio C Hamano
91fc159745 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
2013-06-27 14:30:07 -07:00
Junio C Hamano
644daa9428 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
2013-06-27 14:30:00 -07:00
Junio C Hamano
b29dc5c671 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
2013-06-27 14:29:57 -07:00
Junio C Hamano
833cd7fc9f 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
2013-06-27 14:29:52 -07:00
Junio C Hamano
dc2ed04c23 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
2013-06-27 14:29:49 -07:00
Junio C Hamano
9df9bdda3a 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
2013-06-27 14:29:46 -07:00
Junio C Hamano
fa4bf9edb9 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
2013-06-27 14:29:41 -07:00
Junio C Hamano
85318f521f Update draft release notes to 1.8.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-06-26 15:10:17 -07:00
Junio C Hamano
ad76feb55e 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
2013-06-26 15:08:09 -07:00
Junio C Hamano
12dd2f6933 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
2013-06-26 15:08:01 -07:00
Junio C Hamano
0784466657 Merge branch 'wk/doc-git-has-grown'
* wk/doc-git-has-grown:
  user-manual: Update download size for Git and the kernel
2013-06-26 15:07:55 -07:00
Junio C Hamano
eac9a1a195 Merge branch 'vl/typofix'
* vl/typofix:
  random typofixes (committed missing a 't', successful missing an 's')
2013-06-26 15:07:52 -07:00
Junio C Hamano
2ddc898bc0 Merge branch 'ph/builtin-srcs-are-in-subdir-these-days'
* ph/builtin-srcs-are-in-subdir-these-days:
  fix "builtin-*" references to be "builtin/*"
2013-06-26 15:07:48 -07:00
Junio C Hamano
9a17e9ad15 Merge branch 'mm/merge-in-dirty-worktree-doc'
* mm/merge-in-dirty-worktree-doc:
  Documentation/git-merge.txt: weaken warning about uncommited changes
2013-06-26 15:07:43 -07:00
Junio C Hamano
a036e4ebbf Merge branch 'kb/diff-blob-blob-doc'
* kb/diff-blob-blob-doc:
  Documentation: Move "git diff <blob> <blob>"
2013-06-26 15:07:41 -07:00
Junio C Hamano
14c6ee99ae Merge branch 'mm/push-force-is-dangerous'
* mm/push-force-is-dangerous:
  Documentation/git-push.txt: explain better cases where --force is dangerous
2013-06-26 15:07:38 -07:00
Junio C Hamano
4f9ec8dd23 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
2013-06-26 15:07:36 -07:00
Junio C Hamano
9832cb9d4d 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>
2013-06-24 13:53:56 -07:00
Junio C Hamano
76689ab83b 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
2013-06-24 13:49:00 -07:00
Junio C Hamano
001d116054 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
2013-06-24 13:48:57 -07:00
Junio C Hamano
869577e5fe Merge branch 'nk/config-local-doc'
* nk/config-local-doc:
  config: Add description of --local option
2013-06-24 13:48:55 -07:00
Junio C Hamano
6f37238747 Merge branch 'jk/mergetool-lib-refactor'
Code cleanup.

* jk/mergetool-lib-refactor:
  mergetool--lib: refactor {diff,merge}_cmd logic
2013-06-24 13:48:53 -07:00
Junio C Hamano
c47d4380c7 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
2013-06-24 13:48:52 -07:00