1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-11-05 08:47:56 +01:00
Commit graph

4194 commits

Author SHA1 Message Date
Junio C Hamano
6ea23343ce git-merge knows some strategies want to skip trivial merges
Most notably "ours".  Also this makes sure we do not record
duplicated parents on the parent list of the resulting commit.

This is based on Mark Wooding's work, but does not change the UI
nor introduce new flags.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-20 00:50:37 -08:00
Junio C Hamano
dfeff66ed9 revamp git-clone.
This does two things.

 * A new flag --reference can be used to name a local repository
   that is to be used as an alternate.  This is in response to
   an inquiry by James Cloos in the message on the list
   <m3r74ykue7.fsf@lugabout.cloos.reno.nv.us>.

 * A new flag --use-separate-remote stops contaminating local
   branch namespace by upstream branch names.  The upstream
   branch heads are copied in .git/refs/remotes/ instead of
   .git/refs/heads/ and .git/remotes/origin file is set up to
   reflect this as well.  It requires to have fetch/pull update
   to understand .git/refs/remotes by Eric Wong to further
   update the repository cloned this way.

For the former change, git-fetch-pack is taught a new flag --all
to fetch from all the remote heads.  Nobody uses the git-clone-pack
with this change, so we could deprecate the command, but removal
of the command will be left to a separate round.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-20 00:21:10 -08:00
Junio C Hamano
fd662dd500 generate-cmdlist: style cleanups.
Instead of giving multiple commands concatenated with semicolon
to sed, write them on separate lines.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-19 23:54:45 -08:00
Shawn Pearce
ad52e7708d Add missing semicolon to sed command.
generate-cmdlist.sh is giving errors messages from sed on Mac OS
10.4 due to a missing semicolon.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-19 16:38:24 -08:00
Junio C Hamano
67686d9504 unpack_delta_entry(): reduce memory footprint.
Currently we unpack the delta data from the pack and then unpack
the base object to apply that delta data to it.  When getting an
object that is deeply deltified, we can reduce memory footprint
by unpacking the base object first and then unpacking the delta
data, because we will need to keep at most one delta data in
memory that way.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-19 13:43:42 -08:00
Alexandre Julliard
2b1c0ef2e5 git.el: Added a function to diff against the other heads in a merge.
git-diff-file-merge-head generates a diff against the first merge
head, or with a prefix argument against the nth head. Bound to `d h'
by default.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-19 12:30:14 -08:00
Alexandre Julliard
75a8180d4b git.el: Get the default user name and email from the repository config.
If user name or email are not set explicitly, get them from the
user.name and user.email configuration values before falling back to
the Emacs defaults.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-19 12:30:07 -08:00
Alexandre Julliard
9de83169d3 git.el: More robust handling of subprocess errors when returning strings.
Make sure that functions that call a git process and return a string
always return nil when the subprocess failed.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-19 12:30:01 -08:00
Junio C Hamano
b7986ce884 Merge branch 'master' into next
* master:
  Makefile: Add TAGS and tags targets
  ls-files: Don't require exclude files to end with a newline.
2006-03-18 14:58:20 -08:00
Fredrik Kuivinen
f81e7c626f Makefile: Add TAGS and tags targets
Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-18 14:01:46 -08:00
Alexandre Julliard
451d7b47f1 ls-files: Don't require exclude files to end with a newline.
Without this patch, the last line of an exclude file is silently
ignored if it doesn't end with a newline.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-18 14:01:37 -08:00
Paul Mackerras
eb447a126c gitk: Improve appearance of first child links
The point where the line for a parent joins to the first child
shown is visually different from the lines to the other children,
because the line doesn't branch, but terminates at the child.
Because of this, we now treat the first child a little differently
in the optimizer, and we draw its link in drawlineseg rather
than drawparentlinks.  This improves the appearance of the graph.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-03-18 23:11:37 +11:00
Junio C Hamano
2fc27528f6 Merge branch 'master' into next
* master:
  git-pull: run repo-config with dash form.
2006-03-18 02:08:10 -08:00
Junio C Hamano
f5ef535ff5 git-pull: run repo-config with dash form.
... as discussed on the list for consistency.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-18 02:07:59 -08:00
Junio C Hamano
c534c4ba7e Merge branch 'jc/cvsimport' into next
* jc/cvsimport:
  cvsimport: fix reading from rev-parse
2006-03-18 02:05:22 -08:00
Junio C Hamano
cb9594e28c cvsimport: fix reading from rev-parse
The updated code reads the tip of the current branch before and
after the import runs, but forgot to chomp what we read from the
command.  The read-tree command did not them with the trailing
LF.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-18 02:05:02 -08:00
Paul Mackerras
d8d2df08f6 gitk: Make downward-pointing arrows end in vertical line segment
It seems Tk 8.4 can't draw arrows on diagonal line segments.  This
adds code to the optimizer to make the last bit of a line go vertically
before being terminated with an arrow pointing downwards, so that
it will be drawn correctly by Tk 8.4.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-03-18 20:42:46 +11:00
Junio C Hamano
8a414ad50c Merge branch 'jc/empty'
* jc/empty:
  revision traversal: --remove-empty fix (take #2).
  revision traversal: --remove-empty fix.

Conflicts:

	revision.c (adjust for the updates by Fredrik)
2006-03-18 00:43:47 -08:00
Paul Mackerras
f4171a19f0 gitk: Don't change cursor at end of layout if find in progress
If the user is doing a find in files or patches, which changed the
cursor to a watch, don't change it back to a pointer when we reach
the end of laying out the graph.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-03-18 16:02:51 +11:00
Junio C Hamano
c816a6bc5a Merge branch 'master' into next
* master:
  3% tighter packs for free
  Rewrite synopsis to clarify the two primary uses of git-checkout.
  Fix minor typo.
  Reference git-commit-tree for env vars.
  Clarify git-rebase example commands.
  Document the default source of template files.
  Call out the two different uses of git-branch and fix a typo.
  Add git-show reference
2006-03-17 20:43:15 -08:00
Nicolas Pitre
5a1fb2ca92 3% tighter packs for free
This patch makes for 3.4% smaller pack with the git repository, and
a bit more than 3% smaller pack with the kernel repository.

And so with _no_ measurable CPU difference.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-17 20:42:39 -08:00
Jon Loeliger
71bb10336f Rewrite synopsis to clarify the two primary uses of git-checkout.
Fix a few typo/grammar problems.

Signed-off-by: Jon Loeliger <jdl@jdl.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-17 20:42:38 -08:00
Jon Loeliger
beb8e13437 Fix minor typo.
Signed-off-by: Jon Loeliger <jdl@jdl.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-17 20:42:36 -08:00
Jon Loeliger
5bfc4f23bc Reference git-commit-tree for env vars.
Signed-off-by: Jon Loeliger <jdl@jdl.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-17 20:42:35 -08:00
Jon Loeliger
228382aee4 Clarify git-rebase example commands.
Signed-off-by: Jon Loeliger <jdl@jdl.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-17 20:42:33 -08:00
Jon Loeliger
81ea3ce2ac Document the default source of template files.
Also explain a bit more about how the template option works.

Signed-off-by: Jon Loeliger <jdl@jdl.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-17 20:42:31 -08:00
Jon Loeliger
dd1811199e Call out the two different uses of git-branch and fix a typo.
Signed-off-by: Jon Loeliger <jdl@jdl.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-17 20:42:30 -08:00
Jon Loeliger
55258b5c20 Add git-show reference
Signed-off-by: Jon Loeliger <jdl@jdl.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-17 20:42:28 -08:00
Paul Mackerras
f7a3e8d254 gitk: Make commitdata an array rather than a list
This turns out to be slightly simpler and faster, and will make
things a little easier when we do multiple view support.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-03-18 10:04:48 +11:00
Junio C Hamano
8d707b6293 Merge branch 'jc/cvsimport' into next
* jc/cvsimport:
  cvsimport: honor -i and non -i upon subsequent imports
2006-03-17 14:11:17 -08:00
Junio C Hamano
d3c4519a72 Merge branch 'jc/fetch' into next
* jc/fetch:
  fetch: exit non-zero when fast-forward check fails.
2006-03-17 14:11:10 -08:00
Junio C Hamano
35a9f5d91e Merge branch 'ew/abbrev' into next
* ew/abbrev:
  ls-files: add --abbrev[=<n>] option
  ls-tree: add --abbrev[=<n>] option
  blame: Fix git-blame <directory>
  blame: Nicer output
2006-03-17 14:11:00 -08:00
Junio C Hamano
a9698bb22f fetch: exit non-zero when fast-forward check fails.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-17 14:10:36 -08:00
Eric Wong
ad0cae4cb9 ls-files: add --abbrev[=<n>] option
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-17 14:10:24 -08:00
Eric Wong
cb85bfe5df ls-tree: add --abbrev[=<n>] option
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-17 14:10:24 -08:00
Junio C Hamano
8a5f2eac52 cvsimport: honor -i and non -i upon subsequent imports
Documentation says -i is "import only", so without it,
subsequent import should update the current branch and working
tree files in a sensible way.

"A sensible way" defined by this commit is "act as if it is a
git pull from foreign repository which happens to be CVS not
git".  So:

 - If importing into the current branch (note that cvsimport
   requires the tracking branch is pristine -- you checked out
   the tracking branch but it is your responsibility not to make
   your own commits there), fast forward the branch head and
   match the index and working tree using two-way merge, just
   like "git pull" does.

 - If importing into a separate tracking branch, update that
   branch head, and merge it into your current branch, again,
   just like "git pull" does.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-17 14:10:16 -08:00
Fredrik Kuivinen
53dc463627 blame: Fix git-blame <directory>
Before this patch git-blame <directory> gave non-sensible output. (It
assigned blame to some random file in <directory>) Abort with an error
message instead.

Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-17 14:09:18 -08:00
Fredrik Kuivinen
88a8b79556 blame: Nicer output
As pointed out by Junio, it may be dangerous to cut off people's names
after 15 bytes. If the name is encoded in an encoding which uses more
than one byte per code point we may end up with outputting garbage.
Instead of trying to do something smart, just output the entire name.
We don't gain much screen space by chopping it off anyway.

Furthermore, only output the file name if we actually found any
renames.

Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-17 14:09:10 -08:00
Junio C Hamano
f2cb4004fd Merge branch 'master' into next
* master:
  fix imap-send for OSX
  Let merge set the default strategy.
2006-03-15 16:15:23 -08:00
Randal L. Schwartz
6169858d19 fix imap-send for OSX
This patch works... I've been using it to stay current.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-15 16:14:54 -08:00
Mark Hollomon
c8e2db00f9 Let merge set the default strategy.
If the user does not set a merge strategy for git-pull,
let git-merge calculate a default strategy.

[jc: with minor stylistic tweaks]

Signed-off-by: Mark Hollomon <markhollomon@comcast.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-15 16:14:33 -08:00
Junio C Hamano
64ecb6247f Merge branch 'lt/diff' into next
* lt/diff:
  diffcore-delta: 64-byte-or-EOL ultrafast replacement (hash fix).
2006-03-15 13:19:52 -08:00
Linus Torvalds
e31c9f241a diffcore-delta: 64-byte-or-EOL ultrafast replacement (hash fix).
The rotating 64-bit number was not really rotating, and worse
yet ulong was longer than 64-bit on 64-bit architectures X-<.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-15 13:19:27 -08:00
Junio C Hamano
d7da67148b Merge branch 'master' into next
* master:
  Fix broken slot reuse when fetching alternates
2006-03-15 09:12:18 -08:00
Nick Hengeveld
c982647310 Fix broken slot reuse when fetching alternates
When fetching alternates, http-fetch may reuse the slot to fetch non-http
alternates if http-alternates does not exist.  When doing so, it now needs
to update the slot's finished status so run_active_slot waits for the
non-http alternates request to finish.

Signed-off-by: Nick Hengeveld <nickh@reactrix.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-15 09:10:41 -08:00
Junio C Hamano
d09a0a3cb8 Merge branch 'lt/diff' into next
* lt/diff:
  diffcore-delta: 64-byte-or-EOL ultrafast replacement.
2006-03-15 00:38:47 -08:00
Linus Torvalds
3c7ceba4f1 diffcore-delta: 64-byte-or-EOL ultrafast replacement.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-15 00:37:57 -08:00
Junio C Hamano
ea75cb7284 Merge branch 'jc/pack'
* jc/pack:
  pack-objects: simplify "thin" pack.
  verify-pack -v: show delta-chain histogram.
2006-03-13 00:04:10 -08:00
Junio C Hamano
41ce93bea4 Merge branch 'jc/fsck'
* jc/fsck:
  fsck-objects: Remove --standalone
2006-03-13 00:04:05 -08:00
Junio C Hamano
2e158bee7a Merge branch 'nh/http'
* nh/http:
  http-push: cleanup
  http-push: support for updating remote info/refs
  http-push: improve remote lock management
  http-push: refactor remote file/directory processing
  HTTP slot reuse fixes
  http-push: fix revision walk
2006-03-13 00:01:57 -08:00