Commit graph

35588 commits

Author SHA1 Message Date
Junio C Hamano 4b14ec878a request-pull: pick up tag message as before
The previous two steps were meant to stop updating the explicit
refname the user gave to the command to a different ref that points
at it.  Most notably, we no longer substitute a branch name the user
used with a name of the tag that points at the commit at the tip of
the branch (it still can be done with "local-branch:remote-tag").

However, they also lost the code that included the message in a
tag when the user _did_ ask the tag to be pulled.  Resurrect it.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-02-25 12:53:40 -08:00
Linus Torvalds dc2eacc58c request-pull: allow "local:remote" to specify names on both ends
This allows a user to say that a local branch has a different name on
the remote server, using the same syntax that "git push" uses to create
that situation.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-02-25 12:52:59 -08:00
Linus Torvalds 024d34cb08 request-pull: more strictly match local/remote branches
The current 'request-pull' will try to find matching commit on the given
remote, and rewrite the "please pull" line to match that remote ref.

That may be very helpful if your local tree doesn't match the layout of
the remote branches, but for the common case it's been a recurring
disaster, when "request-pull" is done against a delayed remote update, and
it rewrites the target branch randomly to some other branch name that
happens to have the same expected SHA1 (or more commonly, leaves it
blank).

To avoid that recurring problem, this changes "git request-pull" so that
it matches the ref name to be pulled against the *local* repository, and
then warns if the remote repository does not have that exact same branch
or tag name and content.

This means that git request-pull will never rewrite the ref-name you gave
it.  If the local branch name is "xyzzy", that is the only branch name
that request-pull will ask the other side to fetch.

If the remote has that branch under a different name, that's your problem
and git request-pull will not try to fix it up (but git request-pull will
warn about the fact that no exact matching branch is found, and you can
edit the end result to then have the remote name you want if it doesn't
match your local one).

The new "find local ref" code will also complain loudly if you give an
ambiguous refname (eg you have both a tag and a branch with that same
name, and you don't specify "heads/name" or "tags/name").

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-02-25 12:52:28 -08:00
Johannes Sixt b594c975c7 Makefile: Fix compilation of Windows resource file
If the git version number consists of less than three period
separated numbers, then the Windows resource file compilation
issues a syntax error:

  $ touch git.rc
  $ make V=1 git.res
  GIT_VERSION = 1.9.rc0
  windres -O coff \
            -DMAJOR=1 -DMINOR=9 -DPATCH=rc0 \
            -DGIT_VERSION="\\\"1.9.rc0\\\"" git.rc -o git.res
  C:\msysgit\msysgit\mingw\bin\windres.exe: git.rc:2: syntax error
  make: *** [git.res] Error 1
  $

Note that -DPATCH=rc0.

The values passed via -DMAJOR=, -DMINOR=, and -DPATCH= are used in
FILEVERSION and PRODUCTVERSION statements, which expect up to four numeric
values. These version numbers are intended for machine consumption. They
are typically inspected by installers to decide whether a file to be
installed is newer than one that exists on the system, but are not used
for much else.

We can be pretty certain that there are no tools that look at these
version numbers, not even the installer of Git for Windows does.
Therefore, to fix the syntax error, fill in only the first two numbers,
which we are guaranteed to find in Git version numbers.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Acked-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-01-23 10:00:28 -08:00
Junio C Hamano b21c0bc8e6 Merge git://git.bogomips.org/git-svn
* 'master' of git://git.bogomips.org/git-svn:
  git-svn: memoize _rev_list and rebuild
2014-01-23 08:51:14 -08:00
Junio C Hamano 2dbfa676f0 Merge git://ozlabs.org/~paulus/gitk
* 'master' of git://ozlabs.org/~paulus/gitk:
  gitk: Indent word-wrapped lines in commit display header
  gitk: Comply with XDG base directory specification
  gitk: Replace "next" and "prev" buttons with down and up arrows
  gitk: chmod +x po2msg.sh
  gitk: Update copyright dates
  gitk: Add Bulgarian translation (304t)
  gitk: Fix mistype
2014-01-23 08:50:50 -08:00
Paul Mackerras 76d64ca6b5 gitk: Indent word-wrapped lines in commit display header
In the cases where the lines starting with Precedes:, Follows: and
Branches: in the commit display are long enough to be word-wrapped,
this adds a 1cm margin on the left of the wrapped lines, to make
the display more readable.  Suggested by Stephen Rothwell.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2014-01-23 22:06:22 +11:00
lin zuojian ab0bcec987 git-svn: memoize _rev_list and rebuild
According to profile data, _rev_list and rebuild consume a large
portion of time.  Memoize the results of _rev_list and memoize
rebuild internals to avoid subprocess invocation.

When importing 15152 revisions on a LAN, time improved from 10
hours to 3-4 hours.

Signed-off-by: lin zuojian <manjian2006@gmail.com>
Signed-off-by: Eric Wong <normalperson@yhbt.net>
2014-01-23 02:54:26 +00:00
Michael Haggerty f21e1c5d36 Add cross-references between docs for for-each-ref and show-ref
Add cross-references between the manpages for git-for-each-ref(1) and
git-show-ref(1).

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-01-22 12:08:39 -08:00
Astril Hayato 8f86339858 gitk: Comply with XDG base directory specification
Write the gitk config data to $XDG_CONFIG_HOME/git/gitk ($HOME/.config/git/gitk
by default) in line with the XDG specification. This makes it consistent with
git which also follows the spec.

If $HOME/.gitk already exists use that for backward compatibility, so only new
installations are affected.

Signed-off-by: Astril Hayato <astrilhayato@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2014-01-22 22:05:32 +11:00
Junio C Hamano d9bb4be53b git-gui 0.19.0
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.14 (GNU/Linux)
 
 iQCVAwUAUtq6P2B90JXwhOSJAQK3zQP/T+cOevbKCwFl9mif3EtgPgCoFS9Yd/93
 FYgoKxZh3t9i0Smo9EUggyEkx22v7vONwglGP1wCmCmniQRoaoTW4WBxJFJlEegt
 Li/7OilkwTrSgu1RFZTtpW7zYpg08YrkehFTo6Ntye5gyxZeHsmgFv56f6Ef9Egj
 qEf8xXLyjX4=
 =IBoS
 -----END PGP SIGNATURE-----

Merge tag 'gitgui-0.19.0' of http://repo.or.cz/r/git-gui

git-gui 0.19.0

* tag 'gitgui-0.19.0' of http://repo.or.cz/r/git-gui:
  git-gui 0.19
  git-gui: chmod +x po2msg, windows/git-gui.sh
  git-gui: fallback right pane to packed widgets with Tk 8.4
  git-gui i18n: Added Bulgarian translation
  git-gui l10n: Add 29 more terms to glossary
  git-gui i18n: Initial glossary in Bulgarian
2014-01-21 13:16:17 -08:00
Marc Branchaud 786f15c849 gitk: Replace "next" and "prev" buttons with down and up arrows
Users often find that "next" and "prev" do the opposite of what they
expect.  For example, "next" moves to the next match down the list, but
that is almost always backwards in time.  Replacing the text with arrows
makes it clear where the buttons will take the user.

Signed-off-by: Marc Branchaud <marcnarc@xiplink.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2014-01-21 22:18:23 +11:00
Jonathan Nieder c61f3a97b1 gitk: chmod +x po2msg.sh
The Makefile only runs it using tclsh, but because the fallback po2msg
script has the usual tcl preamble starting with #!/bin/sh it can also
be run directly.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2014-01-21 22:14:42 +11:00
Paul Mackerras 6c626a031a gitk: Update copyright dates
Signed-off-by: Paul Mackerras <paulus@samba.org>
2014-01-21 22:02:27 +11:00
Alexander Shopov 45f884c346 gitk: Add Bulgarian translation (304t)
Signed-off-by: Alexander Shopov <ash@kambanaria.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2014-01-21 22:00:29 +11:00
Max Kirillov 1f3c8726cd gitk: Fix mistype
Signed-off-by: Max Kirillov <max@max630.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2014-01-21 21:57:03 +11:00
Pat Thoyts 1b2c79e63e git-gui 0.19
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2014-01-18 17:29:34 +00:00
Jonathan Nieder c64a0ad385 git-gui: chmod +x po2msg, windows/git-gui.sh
The Makefile only runs po/po2msg.sh using tclsh, but because the
script has the usual tcl preamble starting with #!/bin/sh it can also
be run directly.

The Windows git-gui wrapper is usable in-place for the same reason.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2014-01-18 17:06:41 +00:00
Max Kirillov 02f6cfbd16 git-gui: fallback right pane to packed widgets with Tk 8.4
Since 918dbf58, git-gui crashes if started with Tk 8.4. The reason is that
tk < 8.5 does not support -stretch option for panedwindow.

Without the option it's not possible to properly expand the right half -
the commit area is expanded, while desired behavior is to expand the diff
area. So the whole feature should be disabled with Tk
version less than 8.5.

Signed-off-by: Max Kirillov <max@max630.net>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2014-01-18 16:51:15 +00:00
Alexander Shopov 1ea11f0e45 git-gui i18n: Added Bulgarian translation
Signed-off-by: Alexander Shopov <ash@kambanaria.org>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2014-01-18 16:32:13 +00:00
Alexander Shopov 15a745305f git-gui l10n: Add 29 more terms to glossary
Signed-off-by: Alexander Shopov <ash@kambanaria.org>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2014-01-18 16:32:09 +00:00
Alexander Shopov 99337ef22c git-gui i18n: Initial glossary in Bulgarian
Signed-off-by: Alexander Shopov <ash@kambanaria.org>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2014-01-18 16:32:04 +00:00
Junio C Hamano 79fcbf7e70 Git 1.9-rc0
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-01-17 12:30:14 -08:00
Junio C Hamano d98c916e8f Merge branch 'maint'
* maint:
  git-svn: workaround for a bug in svn serf backend
2014-01-17 12:21:39 -08:00
Junio C Hamano 1aeb10a14d Merge branch 'fp/submodule-checkout-mode'
"submodule.*.update=checkout", when propagated from .gitmodules to
.git/config, turned into a "submodule.*.update=none", which did not
make much sense.

* fp/submodule-checkout-mode:
  git-submodule.sh: 'checkout' is a valid update mode
2014-01-17 12:21:20 -08:00
Junio C Hamano 92251b1b5b Merge branch 'nd/shallow-clone'
Fetching from a shallow-cloned repository used to be forbidden,
primarily because the codepaths involved were not carefully vetted
and we did not bother supporting such usage. This attempts to allow
object transfer out of a shallow-cloned repository in a controlled
way (i.e. the receiver become a shallow repository with truncated
history).

* nd/shallow-clone: (31 commits)
  t5537: fix incorrect expectation in test case 10
  shallow: remove unused code
  send-pack.c: mark a file-local function static
  git-clone.txt: remove shallow clone limitations
  prune: clean .git/shallow after pruning objects
  clone: use git protocol for cloning shallow repo locally
  send-pack: support pushing from a shallow clone via http
  receive-pack: support pushing to a shallow clone via http
  smart-http: support shallow fetch/clone
  remote-curl: pass ref SHA-1 to fetch-pack as well
  send-pack: support pushing to a shallow clone
  receive-pack: allow pushes that update .git/shallow
  connected.c: add new variant that runs with --shallow-file
  add GIT_SHALLOW_FILE to propagate --shallow-file to subprocesses
  receive/send-pack: support pushing from a shallow clone
  receive-pack: reorder some code in unpack()
  fetch: add --update-shallow to accept refs that update .git/shallow
  upload-pack: make sure deepening preserves shallow roots
  fetch: support fetching from a shallow repository
  clone: support remote shallow repository
  ...
2014-01-17 12:21:20 -08:00
Junio C Hamano d8cf714c0e Merge branch 'jk/pull-rebase-using-fork-point'
Finishing touches so that an expected error message will not leak to
the UI.

* jk/pull-rebase-using-fork-point:
  pull: suppress error when no remoteref is found
2014-01-17 12:04:29 -08:00
John Keeping ffc2b483de pull: suppress error when no remoteref is found
Commit 48059e4 (pull: use merge-base --fork-point when appropriate,
2013-12-08) incorrectly assumes that get_remote_merge_branch will either
yield a non-empty string or return an error, but there are circumstances
where it will yield an empty string.

The previous code then invoked git-rev-list with no arguments, which
results in an error suppressed by redirecting stderr to /dev/null.  Now
we invoke git-merge-base with an empty branch name, which also results
in an error.  Suppress this in the same way.

Signed-off-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-01-17 12:03:32 -08:00
Roman Kagan ac930287ff git-svn: workaround for a bug in svn serf backend
Subversion serf backend in versions 1.8.5 and below has a bug(*) that the
function creating the descriptor of a file change -- add_file() --
doesn't make a copy of its third argument when storing it on the
returned descriptor.  As a result, by the time this field is used (in
transactions of file copying or renaming) it may well be released, and
the memory reused.

One of its possible manifestations is the svn assertion triggering on an
invalid path, with a message

svn_fspath__skip_ancestor: Assertion
`svn_fspath__is_canonical(child_fspath)' failed.

This patch works around this bug, by storing the value to be passed as
the third argument to add_file() in a local variable with the same scope
as the file change descriptor, making sure their lifetime is the same.

* [ew: fixed in Subversion r1553376 as noted by Jonathan Nieder]

Cc: Benjamin Pabst <benjamin.pabst85@gmail.com>
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Roman Kagan <rkagan@mail.ru>
2014-01-17 11:24:30 -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 864085aaf6 Update draft release notes to 1.9
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-01-13 11:39:09 -08:00
Junio C Hamano e8a2f5f271 Merge branch 'jk/t5531-prepare-to-default-to-non-matching'
* jk/t5531-prepare-to-default-to-non-matching:
  t5531: further "matching" fixups
2014-01-13 11:35:10 -08:00
Junio C Hamano 7fe5e637ab Merge branch 'sb/diff-orderfile-config'
Finishing touches to avoid casting unnecessary detail in stone.

* sb/diff-orderfile-config:
  diff test: reading a directory as a file need not error out
2014-01-13 11:34:54 -08:00
Junio C Hamano 540cc75f38 Merge branch 'mh/shorten-unambigous-ref'
* mh/shorten-unambigous-ref:
  shorten_unambiguous_ref(): tighten up pointer arithmetic
  gen_scanf_fmt(): delete function and use snprintf() instead
  shorten_unambiguous_ref(): introduce a new local variable
2014-01-13 11:34:08 -08:00
Junio C Hamano 272220ff67 Merge branch 'mm/mv-file-to-no-such-dir-with-slash'
Finishing touches to do the same on windows.

* mm/mv-file-to-no-such-dir-with-slash:
  mv: let 'git mv file no-such-dir/' error out on Windows, too
2014-01-13 11:33:51 -08:00
Junio C Hamano a65a53bf04 Merge branch 'jl/submodule-mv-checkout-caveat'
With a submodule that was initialized in an old fashioned way
without gitlinks, switching branches in the superproject between
the one with and without the submodule may leave the submodule
working tree with its embedded repository behind, as there may be
unexpendable state there. Document and warn users about this.

* jl/submodule-mv-checkout-caveat:
  rm: better document side effects when removing a submodule
  mv: better document side effects when moving a submodule
2014-01-13 11:33:47 -08:00
Junio C Hamano 5e72e7168c Merge branch 'jk/pull-rebase-using-fork-point'
Finishing touches.

* jk/pull-rebase-using-fork-point:
  rebase: fix fork-point with zero arguments
2014-01-13 11:33:40 -08:00
Junio C Hamano ca46578a1d Merge branch 'rr/completion-format-coverletter'
The bash/zsh completion code did not know about format.coverLetter
among many format.* configuration variables.

* rr/completion-format-coverletter:
  completion: complete format.coverLetter
2014-01-13 11:33:38 -08:00
Junio C Hamano ff724276cd Merge branch 'ow/stash-with-ifs'
The implementation of 'git stash $cmd "stash@{...}"' did not quote
the stash argument properly and left it split at IFS whitespace.

* ow/stash-with-ifs:
  stash: handle specifying stashes with $IFS
2014-01-13 11:33:37 -08:00
Junio C Hamano 9fac0777e1 Merge branch 'jn/pager-lv-default-env'
Just like we give a reasonable default for "less" via the LESS
environment variable, specify a reasonable default for "lv" via the
"LV" environment variable when spawning the pager.

* jn/pager-lv-default-env:
  pager: set LV=-c alongside LESS=FRSX
2014-01-13 11:33:35 -08:00
Junio C Hamano 0a8cb03555 Merge branch 'br/sha1-name-40-hex-no-disambiguation'
When parsing a 40-hex string into the object name, the string is
checked to see if it can be interpreted as a ref so that a warning
can be given for ambiguity. The code kicked in even when the
core.warnambiguousrefs is set to false to squelch this warning, in
which case the cycles spent to look at the ref namespace were an
expensive no-op, as the result was discarded without being used.

* br/sha1-name-40-hex-no-disambiguation:
  sha1_name: don't resolve refs when core.warnambiguousrefs is false
2014-01-13 11:33:29 -08:00
Junio C Hamano 4224916ae9 Git 1.8.5.3 2014-01-13 11:28:26 -08:00
Junio C Hamano 7fd90e0e72 Merge branch 'nd/daemon-informative-errors-typofix' into maint
The "--[no-]informative-errors" options to "git daemon" were parsed
a bit too loosely, allowing any other string after these option
names.

* nd/daemon-informative-errors-typofix:
  daemon: be strict at parsing parameters --[no-]informative-errors
2014-01-13 11:23:07 -08:00
Junio C Hamano 3b72885bd8 Merge branch 'km/gc-eperm' into maint
A "gc" process running as a different user should be able to stop a
new "gc" process from starting.

* km/gc-eperm:
  gc: notice gc processes run by other users
2014-01-13 11:23:04 -08:00
Junio C Hamano f5678f1333 Merge branch 'jk/credential-plug-leak' into maint
An earlier "clean-up" introduced an unnecessary memory leak.

* jk/credential-plug-leak:
  Revert "prompt: clean up strbuf usage"
2014-01-13 11:23:01 -08:00
Junio C Hamano ada6ebb6e9 Merge branch 'mm/mv-file-to-no-such-dir-with-slash' into maint
"git mv A B/", when B does not exist as a directory, should error
out, but it didn't.

* mm/mv-file-to-no-such-dir-with-slash:
  mv: let 'git mv file no-such-dir/' error out on Windows, too
  mv: let 'git mv file no-such-dir/' error out
2014-01-13 11:22:48 -08:00
Junio C Hamano be941a2c34 Merge branch 'jk/rev-parse-double-dashes' into maint
"git rev-parse <revs> -- <paths>" did not implement the usual
disambiguation rules the commands in the "git log" family used in
the same way.

* jk/rev-parse-double-dashes:
  rev-parse: be more careful with munging arguments
  rev-parse: correctly diagnose revision errors before "--"
2014-01-13 11:22:38 -08:00
Junio C Hamano 6845e8a62d Merge branch 'jk/cat-file-regression-fix' into maint
"git cat-file --batch=", an admittedly useless command, did not
behave very well.

* jk/cat-file-regression-fix:
  cat-file: handle --batch format with missing type/size
  cat-file: pass expand_data to print_object_or_die
2014-01-13 11:22:21 -08:00
Thomas Ackermann ebba6c0ca6 pack-heuristics.txt: mark up the file header properly
AsciiDoc wants these header-lines left-aligned.

Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-01-13 11:18:34 -08:00
Jeff King 0b1985050e t5531: further "matching" fixups
Commit 43eb920 switched one of the sub-repository in this
test to matching to prepare for a world where the default
becomes "simple". However, the main repository needs a
similar change.

We did not notice any test failure when merged with b2ed944
(push: switch default from "matching" to "simple", 2013-01-04)
because t5531.6 is trying to provoke a failure of "git push"
due to a submodule check. When combined with b2ed944 the
push still fails, but for the wrong reason (because our
upstream setup does not exist, not because of the submodule).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-01-13 09:35:45 -08:00