Commit Graph

4001 Commits

Author SHA1 Message Date
Junio C Hamano
8588452ceb git-commit --amend: allow empty commit.
When amending a commit only to update the commit log message, git-status
would rightly say "Nothing to commit."  Do not let this prevent commit to
be made.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-05 00:57:01 -08:00
Junio C Hamano
a5abcd094b Merge branch 'jc/diff' into next
* jc/diff:
  Merge jc/diff leftover bits.
2006-03-04 16:21:38 -08:00
Junio C Hamano
3ab8532b07 Merge branch 'master' into next
* master:
  Cauterize dropped or duplicate bits from next.
  Merge part of 'sp/checkout'
2006-03-04 16:21:33 -08:00
Junio C Hamano
1c7fee5d08 Cauterize dropped or duplicate bits from next.
I am very sorry to do this, but without this funky octopus, "git
log --no-merges master..next" will show commits already merged
into "master" forever.

There are some commits on the next branch (which is never to be
rewound) that are reverts of other commits on the next branch.
They are to revert the finer grained delta experiments that
turned out to have undesirable performance effects.  Also there
are some other commits that were first done as a merge into
"next" (a pull request based on next) and then cherry picked
into master.  Since they are not going to be merged into
"master" ever, they will stay forever in "log master..next".

Yuck.

So this commit records the fact that the commits currently shown
by "git log --no-merges master..next" to be merged into "master"
are already in the master, either because they really are (in
the case of git-cvsserver bits, which needed cherry-picking into
"master"), or because they are fully reverted in "next" (in the
case of finer-grained delta bits).

Here is the way I made this commit:

 (1) Inspect "gitk --no-merges --parents master..next"

     This shows what git thinks are missing from master.  It
     shows chain of commits that are already merged and chain of
     commits whose net effect should amount to a no-op.

     Look at each commits and make sure they are either unwanted
     or already merged by cherry-picking.

 (2) Record the tip of branches that I do not want.  In this
     case, the following were unwanted:

     cfcbd3427e cvsserver
     c436eb8cf1 diff-delta
     38fd0721d0 diff-delta
     f0bcd511ee cvsserver
     2b8d9347aa diff-delta

 (3) Shorten the list by finding independent ones from the
     above.

     $ git show-branch --independent $the $above $tips
     
     cfcbd3427e
     c436eb8cf1

 (4) Checkout "master" and cauterize them with "ours" strategy:

     $ git merge -s ours "`cat $this-file`" HEAD cfcbd3 c436eb
2006-03-04 16:18:43 -08:00
Junio C Hamano
ce2a34188b Merge jc/diff leftover bits. 2006-03-04 15:49:26 -08:00
Junio C Hamano
d10ed827bc Merge part of 'sp/checkout' 2006-03-04 14:58:11 -08:00
Junio C Hamano
b463ceb885 Merge branch 'master' into next
* master:
  AsciiDoc fix for tutorial
  git.el: Added customize support for all parameters.
  git.el: Added support for Signed-off-by.
  git.el: Automatically update .gitignore status.
  git.el: Set default directory before running the status mode setup hooks.
  git.el: Portability fixes for XEmacs and Emacs CVS.
  contrib/emacs: Add an Emacs VC backend.
2006-03-04 13:53:27 -08:00
Francis Daly
2eb063c933 AsciiDoc fix for tutorial
RE \^.+\^ becomes <sup>. Not wanted here

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-04 13:50:04 -08:00
Alexandre Julliard
a79656e6af git.el: Added customize support for all parameters.
Also fixed quoting of git-log-msg-separator.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-04 13:47:02 -08:00
Alexandre Julliard
45033ad9e3 git.el: Added support for Signed-off-by.
If `git-append-signed-off-by' is non-nil, automatically append a
sign-off line to the log message when editing it.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-04 13:46:52 -08:00
Alexandre Julliard
b23761d9ac git.el: Automatically update .gitignore status.
Update .gitignore files in the status list as they are created or
modified.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-04 13:46:20 -08:00
Alexandre Julliard
a944652c05 git.el: Set default directory before running the status mode setup hooks.
Also set the list-buffers-directory variable for nicer buffer list
display.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-04 13:46:13 -08:00
Alexandre Julliard
18e3e99e3d git.el: Portability fixes for XEmacs and Emacs CVS.
Fixed octal constants for XEmacs.
Added highlighting support in log-edit buffer for Emacs CVS.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-04 13:45:58 -08:00
Alexandre Julliard
486a974acc contrib/emacs: Add an Emacs VC backend.
Add a basic Emacs VC backend. It currently supports the following
commands: checkin, checkout, diff, log, revert, and annotate. There is
only limited support for working with revisions other than HEAD.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-04 13:45:37 -08:00
Junio C Hamano
cc44185f1f Merge branch 'jc/diff' into next
* jc/diff:
  diffcore-delta: make change counter to byte oriented again.
  diffcore-break: similarity estimator fix.
  count-delta: no need for this anymore.
2006-03-04 13:39:31 -08:00
Junio C Hamano
ba23bbc8ef diffcore-delta: make change counter to byte oriented again.
The textual line oriented change counter was fun but was not
very effective.  It tended to overcount the changes.  This one
changes it to a simple N-letter substring based implementation.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-04 13:34:50 -08:00
Junio C Hamano
4d0f39cecf diffcore-break: similarity estimator fix.
This is a companion patch to the previous fix to diffcore-rename.
The merging-back process should use a logic similar to what is used
there.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-04 13:26:36 -08:00
Junio C Hamano
f5948cfe67 count-delta: no need for this anymore.
This is a companion patch to e29e1147e4
which made diffcore similarity estimator independent from the packfile
deltifier.  There is no reason for us to be counting the xdelta anymore.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-04 13:26:36 -08:00
Junio C Hamano
8d6afc116a Merge branch 'master' into next
* master:
  Merge branch 'fk/blame'
  Merge branch 'lt/rev-list'
2006-03-04 13:23:24 -08:00
Junio C Hamano
f2fea68a0f Merge branch 'fk/blame'
* fk/blame:
  git-blame, take 2
  Merge part of 'lt/rev-list' into 'fk/blame'
  Add git-blame, a tool for assigning blame.
2006-03-04 13:22:01 -08:00
Junio C Hamano
21dbe12c76 Merge branch 'lt/rev-list'
* lt/rev-list:
  setup_revisions(): handle -n<n> and -<n> internally.
  git-log (internal): more options.
  git-log (internal): add approxidate.
  Rip out merge-order and make "git log <paths>..." work again.
  Tie it all together: "git log"
  Introduce trivial new pager.c helper infrastructure
  git-rev-list libification: rev-list walking
  Splitting rev-list into revisions lib, end of beginning.
  rev-list split: minimum fixup.
  First cut at libifying revlist generation
2006-03-04 13:21:17 -08:00
Junio C Hamano
41094b8eeb Merge tag 'ko-next' into next
I just rebuilt my 'next' branch from scratch, based on master without
the delta topics that were there.  This would rewind the head which is
a no-no.  This merges the original 'next' back in, to finish the "reverting"
of these two topic branches.
nothing to commit
2006-03-04 00:41:39 -08:00
Junio C Hamano
859ab4c87a Merge part of 'sp/checkout' 2006-03-04 00:32:25 -08:00
Junio C Hamano
c339e8e2cb Merge branch 'fk/blame' into next
* fk/blame:
  git-blame, take 2
  Merge part of 'lt/rev-list' into 'fk/blame'
  Add git-blame, a tool for assigning blame.
2006-03-04 00:31:46 -08:00
Junio C Hamano
6aba8fa865 Merge branch 'lt/rev-list' into next
* lt/rev-list:
  setup_revisions(): handle -n<n> and -<n> internally.
  git-log (internal): more options.
  git-log (internal): add approxidate.
  Rip out merge-order and make "git log <paths>..." work again.
  Tie it all together: "git log"
  Introduce trivial new pager.c helper infrastructure
  git-rev-list libification: rev-list walking
  Splitting rev-list into revisions lib, end of beginning.
  rev-list split: minimum fixup.
  First cut at libifying revlist generation
2006-03-04 00:31:38 -08:00
Junio C Hamano
5aad948f65 Merge branch 'jc/diff' into next
* jc/diff:
  diffcore-rename: similarity estimator fix.
  diffcore-delta: stop using deltifier for packing.
2006-03-04 00:31:28 -08:00
Marco Costalba
ed19f36722 Add a Documentation/git-tools.txt
A brief survey of useful git tools, including third-party
and external projects.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-03 23:29:56 -08:00
Martin Langhoff
91a6bf4682 cvsserver: anonymous cvs via pserver support
git-cvsserver now knows how to do the pserver auth chat when the user
is anonymous. To get it to work, add a line to your inetd.conf like

  cvspserver stream tcp nowait nobody git-cvsserver pserver

(On some inetd implementations you may have to put the pserver parameter twice.)

Commits are blocked. Naively, git-cvsserver assumes non-malicious users. Please
review the code before setting this up on an internet-accessible server.

NOTE: the <nobody> user above will need write access to the .git directory
to maintain the sqlite database. Updating of the sqlite database should be
put in an update hook to avoid this problem, so that it is maintained by
users with write access.
2006-03-04 20:30:04 +13:00
Junio C Hamano
061ad5f4de Merge branch 'master' into next
* master:
  Merge branch 'tl/anno'
  cvsserver: better error messages
  cvsserver: nested directory creation fixups for Eclipse clients
  Merge branch 'maint'
  tar-tree: file/dirmode fix.
2006-03-03 22:29:32 -08:00
Junio C Hamano
8bc63c9ad4 Merge branch 'tl/anno'
* tl/anno:
  annotate should number lines starting with 1
2006-03-03 22:29:17 -08:00
Martin Langhoff
cdb6760e6f cvsserver: better error messages
We now have different error messages when the repo is not found vs repo is
not configured to allow gitcvs. Should help users during initial checkouts.

Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-03 22:28:04 -08:00
Martin Langhoff
6be32d4791 cvsserver: nested directory creation fixups for Eclipse clients
To create nested directories without (or before) sending file entries
is rather tricky. Most clients just work. Eclipse, however, expects
a very specific sequence of events. With this patch, cvsserver meets
those expectations.

Note: we may want to reuse prepdir() in req_update -- should move it
outside of req_co. Right now prepdir() is tied to how req_co() works.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-03 21:37:31 -08:00
Junio C Hamano
be972922d0 Merge branch 'maint'
* maint:
  tar-tree: file/dirmode fix.
2006-03-03 21:36:52 -08:00
Junio C Hamano
473d404b53 tar-tree: file/dirmode fix.
This fixes two bugs introduced when we switched to generic tree
traversal code.

 (1) directory mode recorded silently became 0755, not 0777

 (2) if passed a tree object (not a commit), it emitted an
     alarming error message (but proceeded anyway).

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-03 21:36:38 -08:00
Junio C Hamano
fe041ad68d Merge branch 'tl/anno' into next
* tl/anno:
  annotate should number lines starting with 1
  contrib/git-svn: fix a copied-tree bug in an overzealous assertion
  show-branch --topics: omit more uninteresting commits.
  workaround fat/ntfs deficiencies for t3600-rm.sh (git-rm)
  git-mv: fix moves into a subdir from outside
  send-email: accept --no-signed-off-by-cc as the documentation states
  contrib/git-svn: better documenting of CLI switches
  contrib/git-svn: add --id/-i=$GIT_SVN_ID command-line switch
  contrib/git-svn: avoid re-reading the repository uuid, it never changes
  contrib/git-svn: create a more recent master if one does not exist
  contrib/git-svn: cleanup option parsing
  contrib/git-svn: allow --authors-file to be specified
  contrib/git-svn: strip 'git-svn-id:' when commiting to SVN
  contrib/git-svn: several small bug fixes and changes
  contrib/git-svn: add -b/--branch switch for branch detection
  Prevent --index-info from ignoring -z.
  manpages: insert two missing [verse] markers for multi-line SYNOPSIS
  gitview: pass the missing argument _show_clicked_cb.
  Fix test case for some sed
  git-branch: add -r switch to list refs/remotes/*
2006-03-03 15:09:17 -08:00
Luck, Tony
c6d4217ebc annotate should number lines starting with 1
C programmers are well used to counting from zero, but every
other text file tool starts counting from 1.

Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-03 15:09:04 -08:00
Eric Wong
ce4c8b24a1 contrib/git-svn: fix a copied-tree bug in an overzealous assertion
I thought passing --stop-on-copy to svn would save us from all
the trouble svn-arch-mirror had with directory (project) copies.
I was wrong, there was one thing I overlooked.

If a tree was moved from /foo/trunk to /bar/foo/trunk with no
other changes in r10, but the last change was done in r5, the
Last Changed Rev (from svn info) in /bar/foo/trunk will still be
r5, even though the copy in the repository didn't exist until
r10.

Now, if we ever detect that the Last Changed Rev isn't what
we're expecting, we'll run svn diff and only croak if there are
differences between them.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-03 15:07:12 -08:00
Junio C Hamano
f794c23466 show-branch --topics: omit more uninteresting commits.
When inspecting contents of topic branches for yet-to-be-merged
commits, a commit that is in the release/master branch is
uninteresting.  Previous round still showed them, especially,
the ones before a topic branch that was forked from the
release/master later than other topic branches.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-03 14:34:40 -08:00
Alex Riesen
d51fac5310 workaround fat/ntfs deficiencies for t3600-rm.sh (git-rm)
Signed-off-by: Alex Riesen <ariesen@harmanbecker.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-03 11:28:33 -08:00
Josef Weidendorfer
90924d55c5 git-mv: fix moves into a subdir from outside
git-mv needs to be run from the base directory so that
the check if a file is under revision also covers files
outside of a subdirectory. Previously, e.g. in the git repo,

  cd Documentation; git-mv ../README .

produced the error

  Error: '../README' not under version control

The test is extended for this case; it previously only tested
one direction.

Signed-off-by: Josef Weidendorfer <Josef.Weidendorfer@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-03 11:28:28 -08:00
Eric Wong
8e69b31e0d send-email: accept --no-signed-off-by-cc as the documentation states
--no-signed-off-cc is still supported, for backwards compatibility

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-03 11:28:12 -08:00
Eric Wong
448c81b495 contrib/git-svn: better documenting of CLI switches
Also, fix a asciidoc formatting error

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-03 11:27:30 -08:00
Eric Wong
6f0783cf94 contrib/git-svn: add --id/-i=$GIT_SVN_ID command-line switch
I ended up using GIT_SVN_ID far more than I ever thought I
would.  Typing less is good.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-03 11:27:29 -08:00
Eric Wong
1ca72aef45 contrib/git-svn: avoid re-reading the repository uuid, it never changes
If it does change, we're screwed anyways as SVN will refuse to
commit or update.  We also never access more than one SVN
repository per-invocation, so we can store it as a global, too.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-03 11:27:27 -08:00
Eric Wong
7f60b22860 contrib/git-svn: create a more recent master if one does not exist
In a new repository, the initial fetch creates a master branch
if one does not exist so HEAD has something to point to.

It now creates a master at the end of the initial fetch run,
pointing to the latest revision.  Previously it pointed to the
first revision imported, which is generally less useful.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-03 11:27:25 -08:00
Eric Wong
eeb0abe047 contrib/git-svn: cleanup option parsing
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-03 11:27:22 -08:00
Eric Wong
a9612be245 contrib/git-svn: allow --authors-file to be specified
Syntax is compatible with git-svnimport and git-cvsimport:

	normalperson = Eric Wong <normalperson@yhbt.net>

If this option is specified and git-svn encounters an SVN
committer name that it cannot parse, it git-svn will abort.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-03 11:27:20 -08:00
Eric Wong
df746c5a81 contrib/git-svn: strip 'git-svn-id:' when commiting to SVN
We regenerate and use git-svn-id: whenever we fetch or otherwise
commit to remotes/git-svn.  We don't actually know what revision
number we'll commit to SVN at commit time, so this is useless.
It won't throw off things like 'rebuild', though, which knows to
only use the last instance of git-svn-id: in a log message

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-03 11:27:18 -08:00
Eric Wong
ac8e0b910c contrib/git-svn: several small bug fixes and changes
* Fixed manually-edited commit messages not going to
   remotes/git-svn on sequential commits after the sequential
   commit optimization.
 * format help correctly after adding 'show-ignore'
 * sha1_short regexp matches down to 4 hex characters
   (from git-rev-parse --short documentation)
 * Print the first line of the commit message when we commit to
   SVN next to the sha1.
 * Document 'T' (type change) in the comments

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-03 11:27:14 -08:00
Eric Wong
69f0d91e49 contrib/git-svn: add -b/--branch switch for branch detection
I've said I don't like branches in Subversion, and I still don't.
This is a bit more flexible, though, as the argument for -b is any
arbitrary git head/tag reference.

This makes some things easier:
 * Importing git history into a brand new SVN branch.
 * Tracking multiple SVN branches via GIT_SVN_ID, even from multiple
   repositories.
 * Adding tags from SVN (still need to use GIT_SVN_ID, though).
 * Even merge tracking is supported, if and only the heads end up with
   100% equivalent tree objects.  This is more stricter but more robust
   and foolproof than parsing commit messages, imho.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-03 11:27:10 -08:00