1
0
mirror of https://github.com/git/git.git synced 2024-10-04 23:51:24 +02:00
Commit Graph

11368 Commits

Author SHA1 Message Date
René Scharfe
38c9c9b798 archive: rename attribute specfile to export-subst
As suggested by Junio and Johannes, change the name of the former
attribute specfile to export-subst to indicate its function rather
than purpose and to make clear that it is not applied to working tree
files.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-06 22:51:41 -07:00
René Scharfe
df4a394f91 archive: specfile syntax change: "$Format:%PLCHLDR$" instead of just "%PLCHLDR" (take 2)
As suggested by Johannes, --pretty=format: placeholders in specfiles
need to be wrapped in $Format:...$ now.  This syntax change restricts
the expansion of placeholders and makes it easier to use with files
that contain non-placeholder percent signs.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-06 22:51:31 -07:00
René Scharfe
b21b9f1de3 add memmem()
memmem() is a nice GNU extension for searching a length limited string
in another one.

This compat version is based on the version found in glibc 2.2 (GPL 2);
I only removed the optimization of checking the first char by hand, and
generally tried to keep the code simple.  We can add it back if memcmp
shows up high in a profile, but for now I prefer to keep it (almost
trivially) simple.

Since I don't really know which platforms beside those with a glibc
have their own memmem(), I used a heuristic: if NO_STRCASESTR is set,
then NO_MEMMEM is set, too.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-06 22:46:00 -07:00
René Scharfe
89b4256cfb Remove unused function convert_sha1_file()
convert_sha1_file() became unused by the previous patch -- remove it.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-03 16:46:23 -07:00
René Scharfe
8460b2fcd4 archive: specfile support (--pretty=format: in archive files)
Add support for a new attribute, specfile.  Files marked as being
specfiles are expanded by git-archive when they are written to an
archive.  It has no effect on worktree files.  The same placeholders
as those for the option --pretty=format: of git-log et al. can be
used.

The attribute is useful for creating auto-updating specfiles.  It is
limited by the underlying function format_commit_message(), though.
E.g. currently there is no placeholder for git-describe like output,
and expanded specfiles can't contain NUL bytes.  That can be fixed
in format_commit_message() later and will then benefit users of
git-log, too.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-03 16:46:16 -07:00
Ren,bi(B Scharfe
7b95089c0f Export format_commit_message()
Drop the parameter "msg" of format_commit_message() (as it can be
inferred from the parameter "commit"), add a parameter "template"
in order to avoid accessing the static variable user_format
directly and export the result.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-03 16:46:02 -07:00
Junio C Hamano
1e61b7640d Start 1.5.4 cycle
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-03 02:40:06 -07:00
Junio C Hamano
5587cac28b GIT 1.5.3.1: obsolete git-p4 in RPM spec file.
HPA noticed that yum does not like the newer git RPM set; it turns out
that we do not ship git-p4 anymore but existing installations do not
realize the package is gone if we do not tell anything about it.

David Kastrup suggests using Obsoletes in the spec file of the new
RPM to replace the old package, so here is a try.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
v1.5.3.1
2007-09-03 01:28:37 -07:00
Junio C Hamano
030e0e5fb7 Typofix: 1.5.3 release notes 2007-09-02 15:03:26 -07:00
Junio C Hamano
86bab9615c GIT 1.5.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
v1.5.3
2007-09-02 00:00:00 -07:00
Junio C Hamano
4e837a98b6 Merge branch 'jp/send-email-cc'
* jp/send-email-cc:
  git-send-email --cc-cmd
2007-09-01 13:15:27 -07:00
Robin Rosenberg
a94eda65d3 Mention -m as an abbreviation for --merge
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-01 10:36:56 -07:00
Junio C Hamano
947ad2e1de Update my contact address as the maintainer. 2007-09-01 04:09:51 -07:00
Junio C Hamano
f368f5a6bc Documentation: minor AsciiDoc mark-up fixes.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-01 04:06:13 -07:00
Luben Tuikov
2e7766655a URL: allow port specification in ssh:// URLs
Allow port specification in ssh:// URLs in the
usual notation:

	ssh://[user@]host.domain[:<port>]/<path>

This allows git to be used over ssh-tunneling
networks.

Signed-off-by: Luben Tuikov <ltuikov@yahoo.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-01 03:35:29 -07:00
Junio C Hamano
c7965afd3d Avoid one-or-more (\+) non BRE in sed scripts.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-01 02:35:30 -07:00
Johannes Sixt
7afa845edc rebase -m: Fix incorrect short-logs of already applied commits.
When a topic branch is rebased, some of whose commits are already
cherry-picked upstream:

    o--X--A--B--Y    <- master
     \
      A--B--Z        <- topic

then 'git rebase -m master' would report:

    Already applied: 0001 Y
    Already applied: 0002 Y

With this fix it reports the expected:

    Already applied: 0001 A
    Already applied: 0002 B

As an added bonus, this change also avoids 'echo' of a commit message,
which might contain escapements.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-01 02:23:05 -07:00
Junio C Hamano
aecbf914c4 git-diff: resurrect the traditional empty "diff --git" behaviour
The warning message to suggest "Consider running git-status" from
"git-diff" that we experimented with during the 1.5.3 cycle turns
out to be a bad idea.  It robbed cache-dirty information from people
who valued it, while still asking users to run "update-index --refresh".
It was hoped that the new behaviour would at least have some educational
value, but not showing the cache-dirty paths like before meant that the
user would not even know easily which paths were cache-dirty, and it
made the need to refresh the index look like even more unnecessary chore.

This commit reinstates the traditional behaviour, but with a twist.

By default, the empty "diff --git" output is totally squelched out
from "git diff" output.  At the end of the command, it automatically
runs "update-index --refresh" as needed, without even bothering the
user.  In other words, people who do not care about the cache-dirtyness
do not even have to see the warning.

The traditional behaviour to see the stat-dirty output and to bypassing
the overhead of content comparison can be specified by setting the
configuration variable diff.autorefreshindex to false.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-31 23:30:14 -07:00
Carlos Rica
18e32b5b7a git-tag: Fix -l option to use better shell style globs.
This patch removes certain behaviour of "git tag -l foo", currently
listing every tag name having "foo" as a substring.  The same
thing now could be achieved doing "git tag -l '*foo*'".

This feature was added recently when git-tag.sh got the -n option
for showing tag annotations, because that commit also replaced the
old "grep pattern" behaviour with a more preferable "shell pattern"
behaviour (although slightly modified as you can see).
Thus, the following builtin-tag.c implemented it in order to
ensure that tests were passing unchanged with both programs.

Since common "shell patterns" match names with a given substring
_only_ when * is inserted before and after (as in "*substring*"), and
the "plain" behaviour cannot be achieved easily with the current
implementation, this is mostly the right thing to do, in order to
make it more flexible and consistent.

Tests for "git tag" were also changed to reflect this.

Signed-off-by: Carlos Rica <jasampler@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-31 23:24:16 -07:00
Eric Wong
751eb39590 git-svn: fix dcommit clobbering upstream when committing multiple changes
Although dcommit could detect if the first commit in the series
would conflict with the HEAD revision in SVN, it could not
detect conflicts in further commits it made.

Now we rebase each uncommitted change after each revision is
committed to SVN to ensure that we are up-to-date.  git-rebase
will bail out on conflict errors if our next change cannot be
applied and committed to SVN cleanly, preventing accidental
clobbering of changes on the SVN-side.

--no-rebase users will have trouble with this, and are thus
warned if they are committing more than one commit.  Fixing this
for (hopefully uncommon) --no-rebase users would be more complex
and will probably happen at a later date.

Thanks to David Watson for finding this and the original test.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-31 23:22:51 -07:00
Junio C Hamano
eeebd8d8c5 git-svn: Protect against "diff.color = true".
If the configuration of the user has "diff.color = true", the
output from "log" we invoke internally added color codes, which
broke the parser.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
Tested-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Acked-by: Eric Wong <normalperson@yhbt.net>
2007-08-31 23:22:51 -07:00
Johannes Schindelin
f95eef15f2 filter-branch: introduce convenience function "skip_commit"
With this function, a commit filter can leave out unwanted commits
(such as temporary commits).  It does _not_ undo the changeset
corresponding to that commit, but it _skips_ the revision.  IOW
no tree object is changed by this.

If you like to commit early and often, but want to filter out all
intermediate commits, marked by "@@@" in the commit message, you can
now do this with

	git filter-branch --commit-filter '
		if git cat-file commit $GIT_COMMIT | grep '@@@' > /dev/null;
		then
			skip_commit "$@";
		else
			git commit-tree "$@";
		fi' newbranch

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-31 23:22:51 -07:00
Johannes Schindelin
7e0f1704b8 filter-branch: provide the convenience functions also for commit filters
Move the convenience functions to the top of git-filter-branch.sh, and
return from the script when the environment variable SOURCE_FUNCTIONS is
set.

By sourcing git-filter-branch with that variable set automatically, all
commit filters may access the convenience functions like "map".

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-31 23:22:51 -07:00
Johannes Schindelin
f0fd889d7f rebase -i: mention the option to split commits in the man page
The interactive mode of rebase can be used to split commits.  Tell the
interested parties about it, with a dedicated section in the man page.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-31 23:22:51 -07:00
Johannes Schindelin
082036688f filter-branch: fix remnants of old syntax in documentation
Some time ago, filter-branch's syntax changed so that more than one
ref can be rewritten at the same time.  This involved the removal of
the ref name for the result; instead, the refs are rewritten in-place.

This updates the last leftovers in the documentation to reflect the
new behavior.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-31 23:22:51 -07:00
Shawn O. Pearce
88e21dc746 Teach bash about completing arguments for git-tag
Lately I have been doing a lot of calls to `git tag -d` and also to
`git tag -v`.  In both such cases being able to complete the names
of existing tags saves the fingers some typing effort.  We now look
for the -d or -v option to git-tag in the bash completion support
and offer up existing tag names as possible choices for these.

When creating a new tag we now also offer bash completion support
for the second argument to git-tag (the object to be tagged) as this
can often be a specific existing branch name and is not necessarily
the current HEAD.

If the -f option is being used to recreate an existing tag we now
also offer completion support on the existing tag names for the
first argument of git-tag, helping to the user to reselect the
prior tag name that they are trying to replace.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-08-31 23:47:01 -04:00
Junio C Hamano
e340d7d3fa Hopefully the final update to draft release notes for 1.5.3.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-31 00:36:43 -07:00
Junio C Hamano
a65f2005a6 Make "git-log --" without paths behave the same as "git-log" without --
"git log" family of commands, even when run from a subdirectory,
do not limit the revision range with the current directory as
the path limiter, but with double-dash without any paths after
it, i.e. "git log --" do so.  It was a mistake to have a
difference between "git log --" and "git log" introduced in
commit ae563542bf10fa8c33abd2a354e4b28aca4264d7 (First cut at
libifying revlist generation).

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-31 00:26:41 -07:00
Junio C Hamano
75d2449903 git-init: autodetect core.symlinks
We already autodetect if filemode is reliable on the filesystem
to deal with VFAT and friends.  Do the same for symbolic link
support.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-31 00:25:04 -07:00
Miles Bader
608403d7a5 Make git-archimport log entries more consistent
When appending the "git-archimport-id:" line to the end of log entries,
git-archimport would use two blank lines as a separator when there was no
body in the arch log (only a Summary: line), and zero blank lines when there
was a body (making it hard to see the break between the actual log message
and the git-archimport-id: line).

This patch makes git-archimport generate one blank line as a separator in all
cases.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-30 19:22:02 -07:00
Nicolas Pitre
9e2d57a04a fix same sized delta logic
The code favoring shallower deltas when size is equal was triggered
only when previous delta was also cached.  There should be no relation
between cached deltas and same sized deltas.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-30 19:18:31 -07:00
Junio C Hamano
55ced83d8a filter-branch: make sure orig_namespace ends with a single slash.
Later in a loop any existing ref whose path begins with it is
removed.  It would be a disaster if you allowed it to say refs/head
for example.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-30 19:17:42 -07:00
Giuseppe Bilotta
5433235dae git-filter-branch: document --original option
Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-30 19:15:39 -07:00
Giuseppe Bilotta
26a65dea3e git-filter-branch: more detailed USAGE
Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-30 19:15:33 -07:00
Junio C Hamano
fa8fe28c60 Makefile: do not allow gnu make to remove test-*.o files
It appears parallel build (-j) gets confused.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-30 19:14:31 -07:00
Alex Riesen
8dabdfcc1b Temporary fix for stack smashing in mailinfo
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-30 18:46:37 -07:00
Tom Clarke
7d3c82a761 Fixing comment in merge strategies
Comments in both these strategies refer to the wrong number
of remotes

Signed-off-by: Tom Clarke <tom@u2i.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-30 17:18:22 -07:00
Junio C Hamano
93e23fea2d ls-files --error-unmatch: do not barf if the same pattern is given twice.
This is most visible when you do "git commit Makefile Makefile"; it
may be a stupid request, but that is not a reason to fail the command.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-29 23:12:38 -07:00
Junio C Hamano
9656153b87 Merge branch 'master' of git://git.kernel.org/pub/scm/gitk/gitk
* 'master' of git://git.kernel.org/pub/scm/gitk/gitk:
  gitk: Fix bug causing undefined variable error when cherry-picking
2007-08-29 13:27:10 -07:00
Johannes Schindelin
7d37b5bf4e completion: also complete git-log's --left-right and --cherry-pick option
Both --left-right and --cherry-pick are particularly long to type, so
help the user there.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-29 13:19:41 -07:00
Paul Mackerras
719c2b9d92 gitk: Fix bug causing undefined variable error when cherry-picking
When "Show nearby tags" is turned off and the user did a cherry-pick,
we were trying to access variables relating to the descendent/ancestor
tag & head computations in addnewchild though they hadn't been set.
This makes sure we don't do that.  Reported by Johannes Sixt.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-08-29 22:41:34 +10:00
Junio C Hamano
bdd7379566 git-daemon(1): assorted improvements.
Jari Aalto noticed a handful places in git-daemon documentation
that need to be improved.

 * --inetd makes --pid-file to be ignored, in addition to --user
   and --group

 * receive-pack service was not described at all.  We should, if
   only to warn about the security implications of it.

 * There was no example of per repository configuration.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-29 03:32:12 -07:00
Junio C Hamano
99c7ff3525 GIT 1.5.3-rc7
Signed-off-by: Junio C Hamano <gitster@pobox.com>
v1.5.3-rc7
2007-08-29 00:11:27 -07:00
David Kastrup
d37a8de018 git-svn.txt: fix an obvious misspelling.
Signed-off-by: David Kastrup <dak@gnu.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-29 00:08:47 -07:00
David Kågedal
1ff55ff27b git.el: Added colors for dark background
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-29 00:08:32 -07:00
Junio C Hamano
2f6a382370 format-patch documentation: reword to hint "--root <one-commit>" more clearly
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-28 21:58:53 -07:00
Junio C Hamano
04b508f22b Merge branch 'jc/logsemantics'
* jc/logsemantics:
  "format-patch --root rev" is the way to show everything.
  Porcelain level "log" family should recurse when diffing.
2007-08-28 21:49:01 -07:00
Junio C Hamano
0c783f66df Documentation/git-diff: A..B and A...B cannot take tree-ishes
As pointed out by Linus, these notations require the endpoints
given by the end user to be commits.  Clarify.

Also, three-dots in AsciiDoc are turned into ellipses unless
quoted with bq.  Be careful.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-28 21:47:08 -07:00
Petr Baudis
9d5fc59d12 git-add: Make the filename globbing note a bit clearer
I think the trick with Git-side filename globbing is important and perhaps
not that well known.  Clarify a bit in git-add documentation what it means.

Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-28 21:16:57 -07:00
Petr Baudis
b39c53e662 git-add: Make the "tried to add ignored file" error message less confusing
Currently the error message seems to imply (at least to me) that only
the listed files were withheld and the rest of the files was added to the
index, even though that's obviously not the case.

Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-28 21:15:25 -07:00