1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-11-06 09:13:01 +01:00
Commit graph

6804 commits

Author SHA1 Message Date
Junio C Hamano
94d5ca8d0c Merge branch 'np/verbose-push'
* np/verbose-push:
  make git-push a bit more verbose
2006-11-04 17:22:14 -08:00
Junio C Hamano
66fd23153a Merge branch 'lt/push-config'
* lt/push-config:
  git push: add verbose flag and allow overriding of default target repository
  Allow '-' in config variable names
2006-11-04 17:18:29 -08:00
Shawn O. Pearce
67e78c3b8a Added bash completion support for git-reset.
Completion for the --hard/--soft/--mixed modes of operation as
well as a ref name for <commit-ish> can be very useful and save
some fingers.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-04 17:17:46 -08:00
Shawn O. Pearce
dfb960920d Added completion support for git-branch.exe.
On Cygwin a user might complete the new git-branch builtin as
git-branch.exe, at which point bash requires a new completion
registration for the command.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-04 17:17:45 -08:00
Junio C Hamano
9004dcbe82 Merge branch 'pb/web'
* pb/web:
  gitweb: Support for 'forks'
2006-11-04 17:13:38 -08:00
Junio C Hamano
a622f6b35e Merge branch 'maint'
* maint:
  apply: handle "traditional" creation/deletion diff correctly.
2006-11-04 03:54:20 -08:00
Junio C Hamano
6f9f3b263b apply: handle "traditional" creation/deletion diff correctly.
We deduced a GNU diff output that does not use /dev/null convention
as creation (deletion) diff correctly by looking at the lack of context
and deleted lines (added lines), but forgot to reset the new (old) name
field properly.

This was a regression when we added a workaround for --unified=0 insanity.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-04 02:35:17 -08:00
Aneesh Kumar K.V
6768d6b847 gitweb: Remove extra "/" in path names for git_get_project_list
Without this change we get a wrong $pfxlen value and the check_export_ok()
checks with with a wrong directory name. Without this patch the below
$projects_list fails with gitweb

$projects_list = "/tmp/a/b/";

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-04 01:51:35 -08:00
Alexandre Julliard
2379d61fa6 git.el: Include MERGE_MSG in the log-edit buffer even when not committing a merge.
This lets us take advantage of the fact that git-cherry-pick now saves
the message in MERGE_MSG too.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-04 01:50:35 -08:00
Alexandre Julliard
2ac2b19601 git.el: Move point after the log message header when entering log-edit mode.
Suggested by Han-Wen Nienhuys.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-04 01:50:26 -08:00
Alexandre Julliard
b8ee51815a git.el: Added a function to open the current file in another window.
Bound to 'o' by default, compatible with pcl-cvs and
buffer-mode. Suggested by Han-Wen Nienhuys.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-04 01:50:22 -08:00
Alexandre Julliard
8a078c3f72 git.el: Added functions for moving to the next/prev unmerged file.
This is useful when doing a merge that changes many files with only a
few conflicts here and there.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-04 01:50:13 -08:00
Jakub Narebski
6255ef08ae gitweb: Better support for non-CSS aware web browsers
Add option to replace SPC (' ') with hard (non-breakable) space HTML
entity '&nbsp;' in esc_html subroutine.

Replace ' ' with '&nbsp;' for the code/diff display part in git_blob
and git_patchset_body; this is to be able to view code and diffs in
web browsers which doesn't understand "white-space: pre;" CSS
declaration.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-02 23:13:37 -08:00
Jakub Narebski
241cc599b3 gitweb: Output also empty patches in "commitdiff" view
Remove skipping over empty patches (i.e. patches which consist solely
of extended headers) in git_patchset_body, and add links to those
header-only patches in git_difftree_body (but not generate blobdiff
links when there were no change in file contents).

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-02 23:11:31 -08:00
Junio C Hamano
c954d33da1 Merge branch 'maint'
* maint:
  git-clone documentation didn't mention --origin as equivalent of -o
  Minor grammar fixes for git-diff-index.txt
  link_temp_to_file: call adjust_shared_perm() only when we created the directory
2006-11-02 18:05:33 -08:00
Jakub Narebski
cd1464083c gitweb: Use git-for-each-ref to generate list of heads and/or tags
Add two subroutines: git_get_heads_list and git_get_refs_list, which
fill out needed parts of refs info (heads and tags respectively) info
using single call to git-for-each-ref, instead of using
git-peek-remote to get list of references and using parse_ref for each
ref to get ref info, which in turn uses at least one call of git
command.

Replace call to git_get_refs_list in git_summary by call to
git_get_references, git_get_heads_list and git_get_tags_list
(simplifying this subroutine a bit). Use git_get_heads_list in
git_heads and git_get_tags_list in git_tags. Modify git_tags_body
slightly to accept output from git_get_tags_list.

Remove no longer used, and a bit hackish, git_get_refs_list.
parse_ref is no longer used, but is left for now.

Generating "summary" and "tags" views should be much faster for
projects which have large number of tags.

CHANGES IN OUTPUT: Before, if ref in refs/tags was tag pointing to
commit we used committer epoch as epoch for ref, and used tagger epoch
as epoch only for tag pointing to object of other type. If ref in
refs/tags was commit, we used committer epoch as epoch for ref (see
parse_ref; we sorted in gitweb by 'epoch' field).

Currently we use committer epoch for refs pointing to commit objects,
and tagger epoch for refs pointing to tag object, even if tag points
to commit.

Simple ab benchmark before and after this patch for my git.git
repository (git/jnareb-git.git) with some heads and tags added
as compared to git.git repository, shows around 2.4-3.0 times speedup
for "summary" and "tags" views:

 summary   3134 +/- 24.2 ms  -->   1081 +/- 30.2 ms
 tags      2886 +/- 18.9 ms  -->   1196 +/- 15.6 ms

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-02 18:04:40 -08:00
Junio C Hamano
3175aa1ec2 for-each-ref: "creator" and "creatordate" fields
This adds "creator" (which is parallel to "tagger" or "committer")
and "creatordate" (corresponds to "taggerdate" and
"committerdate").

As other "date" fields, "creatordate" sorts numerically
and displays human readably. This allows for example for
sorting together heavyweigth and lightweight tags.

Signed-off-by: Junio C Hamano <junkio@cox.net>
Acked-by: Jakub Narebski <jnareb@gmail.com>
2006-11-02 18:04:40 -08:00
Sean
34eb33407d Add --global option to git-repo-config.
Allow user to set variables in global ~/.gitconfig file
using command line.

Signed-off-by: Sean Estabrooks <seanlkml@sympatico.ca>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-02 18:04:40 -08:00
Alexandre Julliard
ca8e2d86c4 pack-refs: Store the full name of the ref even when packing only tags.
Using for_each_tag_ref() to enumerate tags is wrong since it removes
the refs/tags/ prefix, we need to always use for_each_ref() and filter
out non-tag references in the callback.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-02 18:04:40 -08:00
Andy Parkins
ba158a32b9 git-clone documentation didn't mention --origin as equivalent of -o
Signed-off-by: Andy Parkins <andyparkins@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-02 18:03:47 -08:00
Andy Parkins
44b27ec960 Minor grammar fixes for git-diff-index.txt
"what you are going to commit is" doesn't need the "is" and does need a comma.

"can trivially see" is an unecessary split infinitive and "easily" is a more
appropriate adverb.

Signed-off-by: Andy Parkins <andyparkins@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-02 18:03:31 -08:00
Johannes Schindelin
866cae0db4 link_temp_to_file: call adjust_shared_perm() only when we created the directory 2006-11-02 18:02:17 -08:00
Andy Parkins
5c1e235f0f Remove uneccessarily similar printf() from print_ref_list() in builtin-branch
Signed-off-by: Andy Parkins <andyparkins@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-02 17:39:58 -08:00
Nicolas Pitre
fa438a2eb1 make git-push a bit more verbose
Currently git-push displays progress status for the local packing of
objects to send, but nothing once it starts to push it over the
connection.  Having progress status in that later case is especially
nice when pushing lots of objects over a slow network link.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-01 15:13:10 -08:00
Junio C Hamano
7854e526ff Merge branch 'maint'
* maint:
  pack-objects doesn't create random pack names
  link_temp_to_file: don't leave the path truncated on adjust_shared_perm failure
2006-11-01 15:09:55 -08:00
Nicolas Pitre
e23ed9a8b4 pack-objects doesn't create random pack names
Documentation for pack-objects seems to be out of date in this regard.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-01 15:09:39 -08:00
Junio C Hamano
1da1b3a3e0 branch: work in subdirectories.
Noticed by Andy Whitcroft

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-01 12:53:13 -08:00
Jakub Narebski
8b4b94cc79 gitweb: Use 's' regexp modifier to secure against filenames with LF
Use 's' (treat string as single line) regexp modifier in
git_get_hash_by_path (against future changes, probably unnecessary)
and in parse_ls_tree_line (when called with '-z'=>1 option) to secure
against filenames containing newline.

[jc: the hunk on git_get_hash_by_path was unneeded, and I noticed the
 regexp was doing unnecessary capture, so fixed it up while I was at it.]

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-01 12:26:29 -08:00
Jakub Narebski
45bd0c808d gitweb: Secure against commit-ish/tree-ish with the same name as path
Add "--" after <commit-ish> or <tree-ish> argument to clearly mark it
as <commit-ish> or <tree-ish> and not pathspec, securing against refs
with the same names as files or directories in [live] repository.

Some wrapping to reduce line length as well.

[jc: with "oops, ls-tree does not want --" fix-up manually applied.]

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-01 12:15:39 -08:00
Luben Tuikov
5ad0828ca3 gitweb: esc_html() author in blame
Blame fails for example on
block/ll_rw_blk.c at v2.6.19-rc3.

Signed-off-by: Luben Tuikov <ltuikov@yahoo.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-01 11:31:55 -08:00
Junio C Hamano
56532fa147 Merge branch 'rs/cherry'
* rs/cherry:
  Make git-cherry handle root trees
  Built-in cherry
2006-11-01 09:17:37 -08:00
Junio C Hamano
e0d68cd5d9 Merge branch 'jc/refs-and-fetch'
* jc/refs-and-fetch:
  git-fetch: adjust to packed-refs.
2006-11-01 08:49:19 -08:00
Junio C Hamano
58a1e0e83b Merge branch 'lj/refs'
* lj/refs: (63 commits)
  Fix show-ref usagestring
  t3200: git-branch testsuite update
  sha1_name.c: avoid compilation warnings.
  Make git-branch a builtin
  ref-log: fix D/F conflict coming from deleted refs.
  git-revert with conflicts to behave as git-merge with conflicts
  core.logallrefupdates thinko-fix
  git-pack-refs --all
  core.logallrefupdates create new log file only for branch heads.
  Remove bashism from t3210-pack-refs.sh
  ref-log: allow ref@{count} syntax.
  pack-refs: call fflush before fsync.
  pack-refs: use lockfile as everybody else does.
  git-fetch: do not look into $GIT_DIR/refs to see if a tag exists.
  lock_ref_sha1_basic does not remove empty directories on BSD
  Do not create tag leading directories since git update-ref does it.
  Check that a tag exists using show-ref instead of looking for the ref file.
  Use git-update-ref to delete a tag instead of rm()ing the ref file.
  Fix refs.c;:repack_without_ref() clean-up path
  Clean up "git-branch.sh" and add remove recursive dir test cases.
  ...
2006-11-01 08:48:50 -08:00
Sasha Khapyorsky
ec1e468973 git-svnimport: support for partial imports
This adds support for partial svn imports. Let's assume that SVN
repository layout looks like:

  $trunk/path/to/our/project
  $branches/path/to/our/project
  $tags/path/to/our/project

, and we would like to import only tree under this specific
'path/to/our/project' and not whole tree under $trunk, $branches, etc..
Now we will be be able to do it by using '-P path/to/our/project' option
with git-svnimport.

Signed-off-by: Sasha Khapyorsky <sashak@voltaire.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-31 17:20:58 -08:00
Junio C Hamano
91c23e48d0 link_temp_to_file: don't leave the path truncated on adjust_shared_perm failure
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-31 15:56:58 -08:00
Linus Torvalds
bcc785f611 git push: add verbose flag and allow overriding of default target repository
This adds a command line flag "-v" to enable a more verbose mode, and
"--repo=" to override the default target repository for "git push" (which
otherwise always defaults to "origin").

This, together with the patch to allow dashes in config variable names,
allows me to do

	[alias]
		push-all = push -v --repo=all

in my user-global config file, and then I can (for any project I maintain)
add to the project-local config file

	[remote "all"]
		url=one.target.repo:/directory
		url=another.target:/pub/somewhere/else

and now "git push-all" just updates all the target repositories, and shows
me what it does - regardless of which repo I am in.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-30 19:39:12 -08:00
Linus Torvalds
38c5afa87e Allow '-' in config variable names
I need this in order to allow aliases of the same form as "ls-tree",
"rev-parse" etc, so that I can use

	[alias]
		my-cat=--paginate cat-file -p

to add a "git my-cat" command.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-30 19:39:12 -08:00
Junio C Hamano
83877f8d92 Merge branch 'maint'
* maint:
  revision traversal: --unpacked does not limit commit list anymore.
  Continue traversal when rev-list --unpacked finds a packed commit.
  Use memmove instead of memcpy for overlapping areas
  quote.c: ensure the same quoting across platforms.
  Surround "#define DEBUG 0" with "#ifndef DEBUG..#endif"
2006-10-30 19:38:50 -08:00
Shawn Pearce
6fb75bed5c Move deny_non_fast_forwards handling completely into receive-pack.
The 'receive.denynonfastforwards' option has nothing to do with
the repository format version.  Since receive-pack already uses
git_config to initialize itself before executing any updates we
can use the normal configuration strategy and isolate the receive
specific variables away from the core variables.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-30 19:35:16 -08:00
Junio C Hamano
9dad9d2e5b revision traversal: --unpacked does not limit commit list anymore.
This is needed to gain smaller latency back.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-30 18:58:03 -08:00
Jan Harkes
744f498522 Continue traversal when rev-list --unpacked finds a packed commit.
When getting the list of all unpacked objects by walking the commit history,
we would stop traversal whenever we hit a packed commit. However the fact
that we found a packed commit does not guarantee that all previous commits
are also packed. As a result the commit walkers did not show all reachable
unpacked objects.

Signed-off-by: Jan Harkes <jaharkes@cs.cmu.edu>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-30 17:47:36 -08:00
Edgar Toernig
79a65697be Use memmove instead of memcpy for overlapping areas
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-30 17:44:27 -08:00
Edgar Toernig
173a9cbe70 Use memmove instead of memcpy for overlapping areas
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-30 17:39:17 -08:00
Junio C Hamano
8d63d95f29 quote.c: ensure the same quoting across platforms.
We read a byte from "char *" and compared it with ' ' to decide
if it needs quoting to protect textual output.  With a platform
where char is unsigned char that would give different result.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-30 16:07:54 -08:00
Junio C Hamano
4903161fb8 Surround "#define DEBUG 0" with "#ifndef DEBUG..#endif"
Otherwise "make CFLAGS=-DDEBUG=1" is cumbersome to run.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-30 15:29:53 -08:00
Sergey Vlasov
6dcfa306f2 git-send-email: Read the default SMTP server from the GIT config file
Make the default value for --smtp-server configurable through the
'sendemail.smtpserver' option in .git/config (or $HOME/.gitconfig).

Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>
Acked-by: Ryan Anderson <rda@google.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-29 12:45:23 -08:00
Sergey Vlasov
9c572b21dd git-send-email: Document support for local sendmail instead of SMTP server
Fix the --smtp-server option description to match reality.

Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-29 12:41:38 -08:00
Robin Rosenberg
b1f33d6265 Swap the porcelain and plumbing commands in the git man page
This makes the documentation less confusing to newcomers.

Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-29 12:36:40 -08:00
Robin Rosenberg
ce4231ffa8 Mention that pull can work locally in the synopsis
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-29 12:36:27 -08:00
Jakub Narebski
151602df00 gitweb: Add "next" link to commitdiff view
Add a kind of "next" view in the bottom part of navigation bar for
"commitdiff" view.

For commitdiff between two commits:
  (from: _commit_)
For commitdiff for one single parent commit:
  (parent: _commit_)
For commitdiff for one merge commit
  (merge: _commit_ _commit_ ...)
For commitdiff for root (parentless) commit
  (initial)
where _link_ denotes hyperlink. SHA1 is shortened to 7 characters on
display, everything is perhaps unnecessary esc_html on display.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-28 14:26:00 -07:00