1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-06-03 12:16:16 +02:00
Commit Graph

15598 Commits

Author SHA1 Message Date
Anand Kumria ee06427aa6 If we are in verbose mode, output what we are about to run (or return)
Signed-off-by: Anand Kumria <wildfire@progsoc.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-11 18:57:04 -07:00
Anand Kumria 21a5075385 Add a single command that will be used to construct the 'p4' command
Rather than having three locations where the 'p4' command is built up,
 refactor this into the one place. This will, eventually, allow us to
 have one place where we modify the evironment or pass extra
 command-line options to the 'p4' binary.

Signed-off-by: Anand Kumria <wildfire@progsoc.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-11 18:57:04 -07:00
Anand Kumria 87b611d5fd Utilise the new 'p4_system' function.
Signed-off-by: Anand Kumria <wildfire@progsoc.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-11 18:57:03 -07:00
Anand Kumria bf9320f151 Have a command that specifically invokes 'p4' (via system)
Similiar to our 'p4_read_pipe_lines' command, we can isolate
 specific changes to the invocation method in the one location
 with this change.

Signed-off-by: Anand Kumria <wildfire@progsoc.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-11 18:57:03 -07:00
Anand Kumria b340fa4301 Utilise the new 'p4_read_pipe_lines' command
Now that we have the new command, we can utilise it and then
 eventually, isolate any changes required to the one place.

Signed-off-by: Anand Kumria <wildfire@progsoc.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-11 18:57:03 -07:00
Anand Kumria 2318121bab Create a specific version of the read_pipe_lines command for p4 invocations
This will make it easier to isolate changes to how 'p4' is invoked
 (whether with parameters or not, etc.).

Signed-off-by: Anand Kumria <wildfire@progsoc.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-11 18:57:03 -07:00
Junio C Hamano ac39efbdf3 Merge branch 'maint'
* maint:
  Re-fix rev-list-options documentation
2008-08-11 14:28:35 -07:00
Junio C Hamano e534735a4c Re-fix rev-list-options documentation
18a2197 (Documentation: rev-list-options: Fix -g paragraph formatting,
2008-08-10) introduced the third paragraph that is continued, but it seems
to confuse docbook toolchain on FC9 machines.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-11 14:24:51 -07:00
Junio C Hamano 10d9d887ec Merge branch 'maint'
* maint:
  Documentation: fix invalid reference to 'mybranch' in user manual
  Fix deleting reflog entries from HEAD reflog
  reflog test: add more tests for 'reflog delete'
  Documentation: rev-list-options: Fix -g paragraph formatting

Conflicts:
	Documentation/user-manual.txt
2008-08-11 00:53:31 -07:00
Ivan Stankovic 4f80b27d48 Documentation: fix invalid reference to 'mybranch' in user manual
Signed-off-by: Ivan Stankovic <pokemon@fly.srk.fer.hr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-10 23:56:22 -07:00
Junio C Hamano 55beff4f53 Fix deleting reflog entries from HEAD reflog
dwim_ref() used to resolve HEAD symbolic ref to its target (i.e. current
branch).  This incorrectly removed the reflog entry from the current
branch when 'git reflog delete HEAD@{1}' was asked for.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-10 23:21:25 -07:00
Pieter de Bie 38881a9066 reflog test: add more tests for 'reflog delete'
This adds more tests for 'reflog delete' and marks it as
broken, as currently a call to 'git reflog delete HEAD@{1}'
deletes entries in the currently checked out branch's log,
not the HEAD log.

Noticed by John Wiegley

Signed-off-by: Pieter de Bie <pdebie@ai.rug.nl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-10 23:15:44 -07:00
Thomas Rast 18a2197e6d Documentation: rev-list-options: Fix -g paragraph formatting
- Add an escape to @{now}.  Without the escape, the brace does
  something magic and eats half the sentence up to the closing brace
  at 'timestamp}'.

- Join the last paragraph with a '+'.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-10 23:11:48 -07:00
Junio C Hamano 71b9979bc7 Update draft RelNotes for 1.6.0
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-09 15:11:48 -07:00
Junio C Hamano 0bb3a0ba9e Merge branch 'maint'
* maint:
  asciidoc markup fixes
  Fail properly when cloning from invalid HTTP URL

Conflicts:
	Documentation/git-push.txt
2008-08-09 01:40:08 -07:00
Junio C Hamano a9fd1383a7 mailinfo: fix MIME multi-part message boundary handling
After finding a MIME multi-part message boundary line, the handle_body()
function is supposed to first flush any accumulated contents from the
previous part to the output stream.  However, the code mistakenly output
the boundary line it found.

The old code that used one global, fixed-length buffer line[] used an
alternate static buffer newline[] for keeping track of this accumulated
contents and flushed newline[] upon seeing the boundary; when 3b6121f
(git-mailinfo: use strbuf's instead of fixed buffers, 2008-07-13)
converted a fixed-length buffer in this program to use strbuf,these two
buffers were converted to "line" and "prev" (the latter of which now has a
much more sensible name) strbufs, but the code mistakenly flushed "line"
(which contains the boundary we have just found), instead of "prev".

This resulted in the first boundary to be output in front of the first
line of the message.

The rewritten implementation of handle_boundary() lost the terminating
newline; this would then result in the second line of the message to be
stuck with the first line.

The is_multipart_boundary() was designed to catch both the internal
boundary and the terminating one (the one with trailing "--"); this also
was broken with the rewrite, and the code in the handle_boundary() to
handle the terminating boundary was never triggered.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-09 01:26:35 -07:00
Pieter de Bie 01144f2095 builtin-rm: Add a --force flag
This adds a --force flag to git-rm, making it somewhat easier for
subversion people to switch.

Signed-off-by: Pieter de Bie <pdebie@ai.rug.nl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-08 18:27:19 -07:00
Eric Wong 222566e42c git-svn: wrap long lines in a few places
Oops, I let a few patches slip by with long lines in them.
Extracted from an unrelated patch by: Marcus Griep <marcus@griep.us>

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-08 16:30:12 -07:00
Marcus Griep 570d35c26d git-svn: Allow deep branch names by supporting multi-globs
Some repositories use a deep branching strategy, such as:

    branches/1.0/1.0.rc1
    branches/1.0/1.0.rc2
    branches/1.0/1.0.rtm
    branches/1.0/1.0.gold

Only allowing a single glob stiffles this.

This change allows for a single glob 'set' to accept this deep
branching strategy.

The ref glob depth must match the branch glob depth.  When using
the -b or -t options for init or clone, this is automatically
done.

For example, using the above branches:

  svn-remote.svn.branches = branches/*/*:refs/remote/*/*

gives the following branch names:

  1.0/1.0.rc1
  1.0/1.0.rc2
  1.0/1.0.rtm
  1.0/1.0.gold

[ew:
  * removed unrelated line-wrapping changes
  * fixed line-wrapping in a few more places
  * removed trailing whitespace
  * fixed bashism in test
  * removed unnecessary httpd startup in test
  * changed copyright on tests to 2008 Marcus Griep
  * added executable permissions to new tests
]

Signed-off-by: Marcus Griep <marcus@griep.us>
Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-08 16:29:56 -07:00
Marcus Griep b47ddefe02 Fix multi-glob assertion in git-svn
Fixes bad regex match check for multiple globs (would always return
one glob regardless of actual number).

[ew: fixed a bashism in the test and some minor line-wrapping]

Signed-off-by: Marcus Griep <marcus@griep.us>
Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-08 16:23:32 -07:00
Thomas Rast 261044e85d filter-branch: be more helpful when an annotated tag changes
Previously, git-filter-branch failed if it attempted to update an
annotated tag.  Now we ignore this condition if --tag-name-filter is
given, so that we can later rewrite the tag.  If no such option was
provided, we warn the user that he might want to run with
"--tag-name-filter cat" to achieve the intended effect.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-08 16:19:51 -07:00
Thomas Rast 8afa42101d Documentation: filter-branch: document how to filter all refs
Document the '--' option that can be used to pass rev-list options
(not just arguments), and give an example usage of '-- --all'.  Remove
reference to "the new branch name"; filter-branch takes arbitrary
arguments to rev-list since dfd05e3.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-08 16:16:31 -07:00
Brandon Casey 6dc4627ef4 Makefile: add a target which will abort compilation with ancient shells
This adds a make target which can be used to try to execute certain shell
constructs which are required for compiling and running git.

This patch provides a test for the $() notation for command substition
which is used in the Makefile and extensively in the git scripts.

The make target is named in such a way as to be a hint to the user that
SHELL_PATH should be set to an appropriate shell. If the shell command
fails, the user should receive a message similar to the following:

make: *** [please_set_SHELL_PATH_to_a_more_modern_shell] Error 2

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-08 16:15:17 -07:00
SZEDER Gábor 5a7ebd4faa bash: remove redundant check for 'git stash apply' options
It will never trigger anyway because of the first check, and even if it
would, it would not offer the command line option.

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-08 16:10:39 -07:00
Junio C Hamano b13d44093b GIT-VERSION-GEN: mark the version 'dirty' only if there are modified files
We used to mark the version string with '-dirty' if the cache was not up
to date, but the only thing we want to know is if the binaries are built
from modified source.  Refresh the cache to avoid false dirtyness.

Christian Jaeger noticed this issue while building under fakeroot
environment (without -u) that lies about the file ownership data.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-08 13:31:27 -07:00
Brandon Casey c94c8e5ff6 Makefile: set SHELL to value of SHELL_PATH
Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-08 13:17:25 -07:00
Jonathan Nieder 7be73ae94e Documentation: user-manual: "git commit -a" doesn't motivate .gitignore
"git commit -a" ignores untracked files and follows all tracked
files, regardless of whether they are listed in .gitignore.  So
don't use it to motivate gitignore.

Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
Acked-by: J. Bruce Fields <bfields@fieldses.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-08 13:17:08 -07:00
Eric Wong ba24e7457a git-svn: add ability to specify --commit-url for dcommit
This allows one to use public svn:// URLs for fetch and
svn+ssh:// URLs for committing (without using the complicated
rewriteRoot option, reimporting or git-filter-branch).

Using this can also help avoid unnecessary server
authentication/encryption overhead on busy SVN servers.

Along with the new --revision option, this can also be allowed
to override the branch detection in dcommit, too.  This is
potentially dangerous and not recommended!  (And also purposely
undocumented, but the loaded gun is there in case somebody
wants to make it safe).

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-08 13:16:47 -07:00
Thomas Rast b3bc97cba4 Documentation: commit-tree: remove 16 parents restriction
ef98c5ca lifted the 16 parents restriction in builtin-commit-tree.c,
but forgot to update the documentation.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-08 03:01:52 -07:00
Junio C Hamano 0f4f4d1597 asciidoc markup fixes
I see quite a few pages on k.org site, e.g.

    http://www.kernel.org/pub/software/scm/git/docs/git-rerere.html
    (scroll down to find "After this test merge")

are misformatted to lose teletype text '+' that is followed by a comma,
and turns the following paragraph all typeset in teletype.

This patch seems to fix the issue at the site (meaning, with the
particular vintage of asciidoc and docbook toolchain), without breaking
things with the version I have at my primary development machine, but
wider testing is very much appreciated.

After this patch,

    git grep '`+`,' -- Documentation

should report noting.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-07 22:41:24 -07:00
Johannes Schindelin 468386a956 clone --mirror: avoid storing repeated tags
With --mirror, clone asks for refs/* already, so it does not need to
ask for ref/tags/*, too.

Noticed by Cesar Eduardo Barros.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-07 21:25:27 -07:00
Junio C Hamano e19b92beca Merge branch 'lt/config-fsync' into maint
* lt/config-fsync:
  Add config option to enable 'fsync()' of object files
  Split up default "i18n" and "branch" config parsing into helper routines
  Split up default "user" config parsing into helper routine
  Split up default "core" config parsing into helper routine
2008-08-07 11:40:29 -07:00
Junio C Hamano 7be9467204 Merge branch 'jc/reflog-expire' into maint
* jc/reflog-expire:
  Make default expiration period of reflog used for stash infinite
  Per-ref reflog expiry configuration
2008-08-07 11:40:22 -07:00
Junio C Hamano 1e040c0b05 Merge branch 'ag/rewrite_one' into maint
* ag/rewrite_one:
  Fix quadratic performance in rewrite_one.
2008-08-07 11:40:12 -07:00
Petr Baudis fd35e42683 Fail properly when cloning from invalid HTTP URL
Currently, when cloning from invalid HTTP URL, git clone will possibly
return curl error, then a confusing message about remote HEAD and then
return success and leave an empty repository behind, confusing either
the end-user or the automated service calling it (think repo.or.cz).

This patch changes the error() calls in get_refs_via_curl() to die()s,
akin to the other get_refs_*() functions.

Cc: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-07 11:39:14 -07:00
Junio C Hamano 1fdf6ee6f8 GIT 1.6.0-rc2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-06 14:00:36 -07:00
Brandon Casey 1fc2cbc1d8 perl/Makefile: handle paths with spaces in the NO_PERL_MAKEMAKER section
Use double quotes to protect against paths which may contain spaces.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-06 14:00:36 -07:00
Junio C Hamano f44bc33c72 Sync with 1.5.6.5 2008-08-06 13:50:48 -07:00
Junio C Hamano 781c1834f5 GIT 1.5.6.5
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-06 13:40:53 -07:00
Junio C Hamano dbd0f5c769 Files given on the command line are relative to $cwd
When running "git commit -F file" and "git tag -F file" from a
subdirectory, we should take it as relative to the directory we started
from, not relative to the top-level directory.

This adds a helper function "parse_options_fix_filename()" to make it more
convenient to fix this class of issues.  Ideally, parse_options() should
support a new type of option, "OPT_FILENAME", to do this uniformly, but
this patch is meant to go to 'maint' to fix it minimally.

One thing to note is that value for "commit template file" that comes from
the command line is taken as relative to $cwd just like other parameters,
but when it comes from the configuration varilable 'commit.template', it
is taken as relative to the working tree root as before.  I think this
difference actually is sensible (not that I particularly think
commit.template itself is sensible).

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-06 13:38:18 -07:00
Junio C Hamano d96ca27e10 Merge git://repo.or.cz/git-gui
* git://repo.or.cz/git-gui:
  git-gui: Adapt discovery of oguilib to execdir 'libexec/git-core'
  git-gui: add a part about format strings in po/README
  git-gui: update po/it.po
  git-gui: update Japanese translation
  git-gui: Update swedish translation.
  git-gui: Update git-gui.pot for 0.11 nearing release
  git-gui: Update German translation
2008-08-06 13:32:18 -07:00
Junio C Hamano 847d10f56d Merge git://git.kernel.org/pub/scm/gitk/gitk
* git://git.kernel.org/pub/scm/gitk/gitk:
  gitk: Update swedish translation.
  gitk: Updated German translation
  gitk: Fallback to selecting the head commit upon load
  gitk: Fixed automatic row selection during load
  gitk: Fixed broken exception handling in diff
  gitk: On Windows, use a Cygwin-specific flag for kill
  gitk: Arrange to kill diff-files & diff-index on quit
  gitk: Kill back-end processes on window close
2008-08-06 13:32:12 -07:00
Junio C Hamano 65ac5530ab Merge branch 'rs/archive-parse-options'
* rs/archive-parse-options:
  archive: allow --exec and --remote without equal sign
2008-08-06 13:31:38 -07:00
Junio C Hamano eabbc99a21 fix diff-tree --stdin documentation
Long time ago, the feature of "diff-tree --stdin" to take a commit and its
parents on one line was broken, and did not support the common:

    git rev-list --parents $commits... -- $paths... |
    git diff-tree --stdin -v -p

usage pattern by Porcelains properly.  For diff-tree to talk sensibly
about commits, it needs to see commits, not just trees; the code was fixed
to take list of commits on the standard input in 1.2.0.

However we left the documentation stale for a long time, until Karl
Hasselström finally noticed it very recently.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-05 23:30:11 -07:00
Steven Grimm ddd63e64e4 Optimize sha1_object_info for loose objects, not concurrent repacks
When dealing with a repository with lots of loose objects, sha1_object_info
would rescan the packs directory every time an unpacked object was referenced
before finally giving up and looking for the loose object. This caused a lot
of extra unnecessary system calls during git pack-objects; the code was
rereading the entire pack directory once for each loose object file.

This patch looks for a loose object before falling back to rescanning the
pack directory, rather than the other way around.

Signed-off-by: Steven Grimm <koreth@midwinter.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-05 21:21:20 -07:00
Brandon Casey 3d32a46b24 Teach fsck and prune that tmp_obj_ file names may not be 14 bytes long
As Shawn pointed out, not all temporary file creation routines can
ensure that the generated temporary file is of a certain length.
e.g. Java's createTempFile(prefix, suffix). So just depend on the
prefix 'tmp_obj_' for detection.

Update prune, and fix the "fix" introduced by a08c53a1 :)

Signed-off-by: Brandon "appendixless" Casey <casey@nrlssc.navy.mil>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-05 21:21:20 -07:00
Lee Marlow 1127c51cfe bash completion: Add completion for 'git mv'
Add completions for all long options specified in the docs
    --dry-run

Signed-off-by: Lee Marlow <lee.marlow@gmail.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-05 21:21:20 -07:00
Lee Marlow b1bc1494ed bash completion: Add completion for 'git ls-files'
Add completions for all long options specified in the docs
    --cached --deleted --modified --others --ignored
    --stage --directory --no-empty-directory --unmerged
    --killed --exclude= --exclude-from=
    --exclude-per-directory= --exclude-standard
    --error-unmatch --with-tree= --full-name
    --abbrev --ignored --exclude-per-directory

Signed-off-by: Lee Marlow <lee.marlow@gmail.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-05 21:21:19 -07:00
Lee Marlow b3191ce2d5 bash completion: Add completion for 'git archive'
Add completions for all long options specified in the docs
    --format= --list --verbose
    --prefix= --remote= --exec=

The --format= long option can be completed with available formats
and the --remote= can be completed with defined remote repositories.

Signed-off-by: Lee Marlow <lee.marlow@gmail.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-05 21:21:19 -07:00
Lee Marlow 95d43780cf bash completion: More completions for 'git stash'
Add branch subcommand to completions and USAGE for git-stash.sh.
Complete stash names for show, apply, drop, pop, and branch.
Add "--index" long option for apply.

Signed-off-by: Lee Marlow <lee.marlow@gmail.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-05 21:21:19 -07:00