gitweb.git
Documentation: be precise about which date --pretty... Nikolaus Schulz Sat, 5 Jul 2008 00:00:13 +0000 (02:00 +0200)

Documentation: be precise about which date --pretty uses

This makes it explicit that the --pretty formats 'medium' and 'email' use the
author date (and ignore the committer date).

Signed-off-by: Junio C Hamano <gitster@pobox.com>

manpages: use teletype font for sample command linesJonathan Nieder Thu, 3 Jul 2008 06:06:23 +0000 (01:06 -0500)

manpages: use teletype font for sample command lines

I think that some of these uses of italics were meant to be
rendered in quotation marks, anyway.

Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

manpages: italicize git subcommand names (which were... Jonathan Nieder Thu, 3 Jul 2008 05:59:09 +0000 (00:59 -0500)

manpages: italicize git subcommand names (which were in teletype font)

Italicize those git subcommand names already in teletype we missed.

Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

manpages: italicize nongit command names (if they are... Jonathan Nieder Thu, 3 Jul 2008 05:55:07 +0000 (00:55 -0500)

manpages: italicize nongit command names (if they are in teletype font)

Some manual pages use teletype font to set command names. We
change them to use italics, instead. This creates a visual
distinction between names of commands and command lines that
can be typed at the command line. It is also more consistent
with other man pages outside Git.

In this patch, the commands named are non-git commands like bash.

Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

manpages: italicize gitk's name (where it was in telety... Jonathan Nieder Thu, 3 Jul 2008 05:49:55 +0000 (00:49 -0500)

manpages: italicize gitk's name (where it was in teletype font)

The name `gitk` is sometimes meant to be entered at the command
prompt, but most uses are just referring to the program with that
name (not the incantation to start it).

Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

manpages: italicize git command names (which were in... Jonathan Nieder Thu, 3 Jul 2008 05:41:41 +0000 (00:41 -0500)

manpages: italicize git command names (which were in teletype font)

The names of git commands are not meant to be entered at the
commandline; they are just names. So we render them in italics,
as is usual for command names in manpages.

Using

doit () {
perl -e 'for (<>) { s/\`(git-[^\`.]*)\`/'\''\1'\''/g; print }'
}
for i in git*.txt config.txt diff*.txt blame*.txt fetch*.txt i18n.txt \
merge*.txt pretty*.txt pull*.txt rev*.txt urls*.txt
do
doit <"$i" >"$i+" && mv "$i+" "$i"
done
git diff

.

Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

manpages: italicize command namesJonathan Nieder Thu, 3 Jul 2008 05:37:18 +0000 (00:37 -0500)

manpages: italicize command names

This includes nongit commands like RCS 'merge'. This patch only
italicizes names of commands if they had no formatting before.

Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

manpages: italicize command names in synopsesJonathan Nieder Thu, 3 Jul 2008 05:36:04 +0000 (00:36 -0500)

manpages: italicize command names in synopses

To tell command names from options in a glance.

Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

gitdiffcore(7): fix awkward wordingJonathan Nieder Thu, 3 Jul 2008 05:30:25 +0000 (00:30 -0500)

gitdiffcore(7): fix awkward wording

The phrase "diff outputs" sounds awkward to my ear (I think
"output" is meant to be used as a substantive noun.)

Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation: more "git-" versus "git " changesJonathan Nieder Thu, 3 Jul 2008 05:28:15 +0000 (00:28 -0500)

Documentation: more "git-" versus "git " changes

With git-commands moving out of $(bindir), it is useful to make a
clearer distinction between the git subcommand 'git-whatever' and
the command you type, `git whatever <options>`. So we use a dash
after "git" when referring to the former and not the latter.

I already sent a patch doing this same thing, but I missed some
spots.

Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation: rewrap to prepare for "git-" vs "git... Jonathan Nieder Thu, 3 Jul 2008 05:20:21 +0000 (00:20 -0500)

Documentation: rewrap to prepare for "git-" vs "git " change

Rewrap lines in preparation for added dashes.

Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-commit(1): depersonalize descriptionJonathan Nieder Thu, 3 Jul 2008 05:13:45 +0000 (00:13 -0500)

git-commit(1): depersonalize description

The intent is to make git-commit(1) feel more like a manual page. The
change also makes the page four words shorter.

Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git(1): add commaJonathan Nieder Thu, 3 Jul 2008 05:08:12 +0000 (00:08 -0500)

git(1): add comma

Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

manpages: fix bogus whitespaceJonathan Nieder Thu, 3 Jul 2008 05:03:54 +0000 (00:03 -0500)

manpages: fix bogus whitespace

It's distracting.

Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation: fix gitlinksJonathan Nieder Thu, 3 Jul 2008 04:54:38 +0000 (23:54 -0500)

Documentation: fix gitlinks

Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-format-patch(1): fix stray \ in outputJonathan Nieder Thu, 3 Jul 2008 04:47:05 +0000 (23:47 -0500)

git-format-patch(1): fix stray \ in output

In listing blocks (set off by rows of dashes), the usual
formatting characters of asciidoc are instead rendered verbatim.
When the escaped double-hyphen of olden days is moved into such a
block along with other formatting improvements, it becomes
backslash-dash-dash.

So we remove the backslash.

Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

stash: introduce 'stash save --keep-index' optionSZEDER Gábor Fri, 27 Jun 2008 14:37:15 +0000 (16:37 +0200)

stash: introduce 'stash save --keep-index' option

'git stash save' saves local modifications to a new stash, and runs 'git
reset --hard' to revert them to a clean index and work tree. When the
'--keep-index' option is specified, after that 'git reset --hard' the
previous contents of the index is restored and the work tree is updated
to match the index. This option is useful if the user wants to commit
only parts of his local modifications, but wants to test those parts
before committing.

Also add support for the completion of the new option, and add an
example use case to the documentation.

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Retire 'stupid' merge strategyMiklos Vajna Sat, 5 Jul 2008 14:43:51 +0000 (16:43 +0200)

Retire 'stupid' merge strategy

As pointed out by Linus, this strategy tries to take the best merge
base, but 'recursive' just does it better. If one needs something more
than 'resolve' then he/she should really use 'recursive' and not
'stupid'.

Cf. Message-ID: <alpine.LFD.1.10.0807030947360.18105@woody.linux-foundation.org>

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Implement "git stash branch <newbranch> <stash>"Abhijit Menon-Sen Thu, 3 Jul 2008 06:16:05 +0000 (11:46 +0530)

Implement "git stash branch <newbranch> <stash>"

Restores the stashed state on a new branch rooted at the commit on which
the stash was originally created, so that conflicts caused by subsequent
changes on the original branch can be dealt with.

(Thanks to Junio for this nice idea.)

Signed-off-by: Abhijit Menon-Sen <ams@toroid.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Fix apply --recount handling of no-EOL lineThomas Rast Fri, 4 Jul 2008 19:10:14 +0000 (21:10 +0200)

Fix apply --recount handling of no-EOL line

If a patch modifies the last line of a file that previously had no
terminating '\n', it looks like

-old text
\ No newline at end of file
+new text

Hence, a '\' line does not signal the end of the hunk. This modifies
'git apply --recount' to take this into account.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Acked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint'Junio C Hamano Fri, 4 Jul 2008 08:59:57 +0000 (01:59 -0700)

Merge branch 'maint'

* maint:
GIT 1.5.6.2
Fix executable bits in t/ scripts
Work around gcc warnings from curl headers

GIT 1.5.6.2 v1.5.6.2Junio C Hamano Fri, 4 Jul 2008 08:12:54 +0000 (01:12 -0700)

GIT 1.5.6.2

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Fix executable bits in t/ scriptsJunio C Hamano Fri, 4 Jul 2008 08:38:34 +0000 (01:38 -0700)

Fix executable bits in t/ scripts

Pointed out by Ramsay Jones.

Signed-off-by: Junio C Hamano <gitster@pobox.com>

t4127-apply-same-fn: Avoid sed -iJohannes Sixt Fri, 4 Jul 2008 06:43:19 +0000 (08:43 +0200)

t4127-apply-same-fn: Avoid sed -i

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Work around gcc warnings from curl headersJunio C Hamano Fri, 4 Jul 2008 07:37:40 +0000 (00:37 -0700)

Work around gcc warnings from curl headers

After master.k.org upgrade, I started seeing these warning messages:

transport.c: In function 'get_refs_via_curl':
transport.c:458: error: call to '_curl_easy_setopt_err_write_callback' declared with attribute warning: curl_easy_setopt expects a curl_write_callback argument for this option

It appears that the curl header wants to enforce the function signature
for callback function given to curl_easy_setopt() to be compatible with
that of (*curl_write_callback) or fwrite. This patch seems to work the
issue around.

Signed-off-by: Junio C Hamano <gitster@pobox.com>

stat_tracking_info(): clear object flags used during... Junio C Hamano Thu, 3 Jul 2008 19:09:48 +0000 (12:09 -0700)

stat_tracking_info(): clear object flags used during counting

When left-right traversal counts the commits in a diverged history, it
leaves the flags in the commits smudged, and we need to clear them before
we return. Otherwise the caller cannot inspect other branches with this
function again.

Signed-off-by: Junio C Hamano <gitster@pobox.com>

fast-export --export-marks: fix off by one errorJunio C Hamano Thu, 3 Jul 2008 07:25:23 +0000 (00:25 -0700)

fast-export --export-marks: fix off by one error

The export_marks() function iterated over a (potentially sparsely
populated) hashtable, but it accessed it starting from offset 1 and one
element beyond the end.

Noticed by SungHyun Nam.

Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-branch -v: show the remote tracking statisticsJunio C Hamano Wed, 2 Jul 2008 07:52:41 +0000 (00:52 -0700)

git-branch -v: show the remote tracking statistics

This teaches "git branch -v" to insert the remote tracking statistics in
brackets, just before the one-liner commit log message for the branch.

Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-status: show the remote tracking statisticsJunio C Hamano Wed, 2 Jul 2008 07:52:16 +0000 (00:52 -0700)

git-status: show the remote tracking statistics

This teaches "git status" to show the same remote tracking statistics
"git checkout" gives at the beginning of the output.

Now the necessary low-level machinery is properly factored out, we can do
this quite cleanly.

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Refactor "tracking statistics" code used by "git checkout"Junio C Hamano Wed, 2 Jul 2008 07:51:18 +0000 (00:51 -0700)

Refactor "tracking statistics" code used by "git checkout"

People seem to like "Your branch is ahead by N commit" report made by
"git checkout", but the interface into the statistics function was a bit
clunky. This splits the function into three parts:

* The core "commit counting" function that takes "struct branch" and
returns number of commits to show if we are ahead, behind or forked;

* Convenience "stat formating" function that takes "struct branch" and
formats the report into a given strbuf, using the above function;

* "checkout" specific function that takes "branch_info" (type that is
internal to checkout implementation), calls the above function and
print the formatted result.

in the hope that the former two can be more easily reusable.

Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-send-email: Do not attempt to STARTTLS more than... Thomas Rast Wed, 2 Jul 2008 22:11:31 +0000 (00:11 +0200)

git-send-email: Do not attempt to STARTTLS more than once

With the previous TLS patch, send-email would attempt to STARTTLS at
the beginning of every mail, despite reusing the last connection. We
simply skip further encryption checks after successful TLS initiation.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'j6t/mingw'Junio C Hamano Thu, 3 Jul 2008 04:57:52 +0000 (21:57 -0700)

Merge branch 'j6t/mingw'

* j6t/mingw: (38 commits)
compat/pread.c: Add a forward declaration to fix a warning
Windows: Fix ntohl() related warnings about printf formatting
Windows: TMP and TEMP environment variables specify a temporary directory.
Windows: Make 'git help -a' work.
Windows: Work around an oddity when a pipe with no reader is written to.
Windows: Make the pager work.
When installing, be prepared that template_dir may be relative.
Windows: Use a relative default template_dir and ETC_GITCONFIG
Windows: Compute the fallback for exec_path from the program invocation.
Turn builtin_exec_path into a function.
Windows: Use a customized struct stat that also has the st_blocks member.
Windows: Add a custom implementation for utime().
Windows: Add a new lstat and fstat implementation based on Win32 API.
Windows: Implement a custom spawnve().
Windows: Implement wrappers for gethostbyname(), socket(), and connect().
Windows: Work around incompatible sort and find.
Windows: Implement asynchronous functions as threads.
Windows: Disambiguate DOS style paths from SSH URLs.
Windows: A rudimentary poll() emulation.
Windows: Implement start_command().
...

Merge branch 'maint'Junio C Hamano Thu, 3 Jul 2008 04:57:50 +0000 (21:57 -0700)

Merge branch 'maint'

* maint:
Fix describe --tags --long so it does not segfault

Merge branch 'js/maint-clone-insteadof' into maintJunio C Hamano Thu, 3 Jul 2008 04:32:44 +0000 (21:32 -0700)

Merge branch 'js/maint-clone-insteadof' into maint

* js/maint-clone-insteadof:
clone: respect the settings in $HOME/.gitconfig and /etc/gitconfig
clone: respect url.insteadOf setting in global configs

Merge branch 'jk/maint-fetch-ref-hier' into maintJunio C Hamano Thu, 3 Jul 2008 04:32:44 +0000 (21:32 -0700)

Merge branch 'jk/maint-fetch-ref-hier' into maint

* jk/maint-fetch-ref-hier:
fetch: give a hint to the user when local refs fail to update
fetch: report local storage errors in status table

Merge branch 'jc/maint-reset' into maintJunio C Hamano Thu, 3 Jul 2008 04:32:44 +0000 (21:32 -0700)

Merge branch 'jc/maint-reset' into maint

* jc/maint-reset:
Allow "git-reset path" when unambiguous

Fix describe --tags --long so it does not segfaultShawn O. Pearce Thu, 3 Jul 2008 02:32:45 +0000 (02:32 +0000)

Fix describe --tags --long so it does not segfault

If we match a lightweight (non-annotated tag) as the name to
output and --long was requested we do not have a tag, nor do
we have a tagged object to display. Instead we must use the
object we were passed as input for the long format display.

Reported-by: Mark Burton <markb@ordern.com>
Backtraced-by: Mikael Magnusson <mikachu@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-add--interactive: manual hunk editing modeThomas Rast Wed, 2 Jul 2008 22:00:00 +0000 (00:00 +0200)

git-add--interactive: manual hunk editing mode

Adds a new option 'e' to the 'add -p' command loop that lets you edit
the current hunk in your favourite editor.

If the resulting patch applies cleanly, the edited hunk will
immediately be marked for staging. If it does not apply cleanly, you
will be given an opportunity to edit again. If all lines of the hunk
are removed, then the edit is aborted and the hunk is left unchanged.

Applying the changed hunk(s) relies on Johannes Schindelin's new
--recount option for git-apply.

Note that the "real patch" test intentionally uses
(echo e; echo n; echo d) | git add -p
even though the 'n' and 'd' are superfluous at first sight. They
serve to get out of the interaction loop if git add -p wrongly
concludes the patch does not apply.

Many thanks to Jeff King <peff@peff.net> for lots of help and
suggestions.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-add--interactive: remove hunk coalescingThomas Rast Wed, 2 Jul 2008 21:59:44 +0000 (23:59 +0200)

git-add--interactive: remove hunk coalescing

Current git-apply has no trouble at all applying chunks that have
overlapping context, as produced by the splitting feature. So we can
drop the manual coalescing.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-add--interactive: replace hunk recounting with... Thomas Rast Wed, 2 Jul 2008 21:59:16 +0000 (23:59 +0200)

git-add--interactive: replace hunk recounting with apply --recount

We recounted the postimage offsets to compensate for hunks that were
not selected. Now apply --recount can do the job for us.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

apply --root: thinkofix.Junio C Hamano Wed, 2 Jul 2008 22:28:22 +0000 (15:28 -0700)

apply --root: thinkofix.

The end of a string is string[length-1], not string[length+1].
I pointed it out during the review, but I forgot about it when applying the
patch. This should fix it.

Signed-off-by: Junio C Hamano <gitster@pobox.com>

git fetch-pack: do not complain about "no common commit... Johannes Schindelin Wed, 2 Jul 2008 17:06:56 +0000 (18:06 +0100)

git fetch-pack: do not complain about "no common commits" in an empty repo

If the repo is empty, it is obvious that there are no common commits
when fetching from _anywhere_.

So there is no use in saying it in that case, and it can even be
annoying. Therefore suppress the message unilaterally if the repository
is empty prior to the fetch.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation: Point to gitcli(7) from git(1)Brian Gernhardt Wed, 2 Jul 2008 14:13:35 +0000 (10:13 -0400)

Documentation: Point to gitcli(7) from git(1)

Signed-off-by: Brian Gernhardt <benji@silverinsanity.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-gui: Implement "Stage/Unstage Line"Johannes Sixt Fri, 27 Jun 2008 07:22:01 +0000 (09:22 +0200)

git-gui: Implement "Stage/Unstage Line"

This adds a context menu entry below "Stage/Unstage Hunk" that stages or
unstages just the line under the mouse pointer.

This is by itself useful, for example, if there are unrelated changes in
the same hunk and the hunk cannot be split by reducing the context.

The feature can also be used to split a hunk by staging a number of
additions (or unstaging a number of removals) until there are enough
context lines that the hunk gets split.

The implementation reads the complete hunk that the line lives in, and
constructs a new hunk by picking existing context lines, removing unneeded
change lines and transforming other change lines to context lines. The
resulting hunk is fed through 'git apply' just like in the "Stage/Unstage
Hunk" case.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

Teach "git apply" to prepend a prefix with "--root... Johannes Schindelin Mon, 30 Jun 2008 23:44:47 +0000 (00:44 +0100)

Teach "git apply" to prepend a prefix with "--root=<root>"

With "git apply --root=<root>", all file names in the patch are prepended
with <root>. If a "-p" value was given, the paths are stripped _before_
prepending <root>.

Wished for by HPA.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Update draft release notes for 1.6.0Junio C Hamano Wed, 2 Jul 2008 00:21:12 +0000 (17:21 -0700)

Update draft release notes for 1.6.0

Signed-off-by: Junio C Hamano <gitster@pobox.com>

gitcli: Document meaning of --cached and --indexNanako Shiraishi Tue, 1 Jul 2008 14:02:40 +0000 (23:02 +0900)

gitcli: Document meaning of --cached and --index

We saw this explanation repeated on the mailing list a few times. Even
though the description of individual options to particular commands are
explained in their manual pages, the reason behind choosing which is which
has not been clearly explained in any of the documentation.

Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation formatting and cleanupJonathan Nieder Mon, 30 Jun 2008 18:56:34 +0000 (13:56 -0500)

Documentation formatting and cleanup

Following what appears to be the predominant style, format
names of commands and commandlines both as `teletype text`.

While we're at it, add articles ("a" and "the") in some
places, italicize the name of the command in the manual page
synopsis line, and add a comma or two where it seems appropriate.

Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation: be consistent about "git-" versus "git "Jonathan Nieder Mon, 30 Jun 2008 06:09:04 +0000 (01:09 -0500)

Documentation: be consistent about "git-" versus "git "

Since the git-* commands are not installed in $(bindir), using
"git-command <parameters>" in examples in the documentation is
not a good idea. On the other hand, it is nice to be able to
refer to each command using one hyphenated word. (There is no
escaping it, anyway: man page names cannot have spaces in them.)

This patch retains the dash in naming an operation, command,
program, process, or action. Complete command lines that can
be entered at a shell (i.e., without options omitted) are
made to use the dashless form.

The changes consist only of replacing some spaces with hyphens
and vice versa. After a "s/ /-/g", the unpatched and patched
versions are identical.

Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation: prepare to be consistent about "git... Jonathan Nieder Mon, 30 Jun 2008 22:17:07 +0000 (17:17 -0500)

Documentation: prepare to be consistent about "git-" versus "git "

With the dashed forms of git commands not in $(bindir), we have
to change many instances of "git-command" to "git command". Also,
for consistency it is at times appropriate to make the opposite
change. In some cases, the change is not so simple as changing one
character.

This patch gets rid of some of those cases by rewrapping lines.

Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-daemon(1): don't assume git-daemon is in /usr/binJonathan Nieder Mon, 30 Jun 2008 22:15:57 +0000 (17:15 -0500)

git-daemon(1): don't assume git-daemon is in /usr/bin

In the example inetd.conf lines in git-daemon(1), it was
assumed that `git-daemon` resides in the user's /usr/bin.
With this patch, we only assume `git` is in /usr/bin.

The stronger assumption fails in the default installation
nowadays.

Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation: complicate example of "man git-command"Jonathan Nieder Mon, 30 Jun 2008 22:10:25 +0000 (17:10 -0500)

Documentation: complicate example of "man git-command"

The manual page for the command invoked as "git clone" is named
git-clone(1), and similarly for the rest of the git commands.
Make sure our first example of this in tutorials makes it clear
that it is the first two words of a command line that make up the
command's name (that is: for example, the effect of "git svn
dcommit" is described in git-svn(1)).

Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

whitespace fix in Documentation/git-repack.txtJonathan Nieder Mon, 30 Jun 2008 22:05:15 +0000 (17:05 -0500)

whitespace fix in Documentation/git-repack.txt

Change leading spaces to tabs to match the rest of the file.

Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation: fix links to tutorials and other new... Jonathan Nieder Mon, 30 Jun 2008 22:01:21 +0000 (17:01 -0500)

Documentation: fix links to tutorials and other new manual pages

With the conversion of HTML documentation to man pages

tutorial.html -> gittutorial (7)
tutorial-2.html -> gittutorial-2 (7)
cvs-migration.html -> gitcvs-migration (7)
diffcore.html -> gitdiffcore (7)
repository-layout.html -> gitrepository-layout (5)
hooks.html -> githooks (5)
glossary.html -> gitglossary (7)
core-tutorial.html -> gitcore-tutorial (7)

and the automatic update of references to these pages,
a little debris was left behind. We clear it away.

Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge maint inJunio C Hamano Wed, 2 Jul 2008 00:19:34 +0000 (17:19 -0700)

Merge maint in

Start draft release notes for 1.5.6.2Junio C Hamano Wed, 2 Jul 2008 00:09:21 +0000 (17:09 -0700)

Start draft release notes for 1.5.6.2

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Fix 'git show' on signed tag of signed tag of commitThomas Rast Tue, 1 Jul 2008 09:47:04 +0000 (11:47 +0200)

Fix 'git show' on signed tag of signed tag of commit

The cmd_show loop resolves tags by showing them, then pointing the
object to the 'tagged' member. However, this object is not fully
initialized; it only contains the SHA1. (This resulted in a segfault
if there were two levels of tags.) We apply parse_object to get a
full object.

Noticed by Kalle Olavi Niemitalo on IRC.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'ph/mergetool'Junio C Hamano Tue, 1 Jul 2008 23:22:42 +0000 (16:22 -0700)

Merge branch 'ph/mergetool'

* ph/mergetool:
Remove the use of '--' in merge program invocation

Merge branch 'js/apply-recount'Junio C Hamano Tue, 1 Jul 2008 23:22:39 +0000 (16:22 -0700)

Merge branch 'js/apply-recount'

* js/apply-recount:
Allow git-apply to recount the lines in a hunk (AKA recountdiff)

Merge branch 'jc/checkdiff'Junio C Hamano Tue, 1 Jul 2008 23:22:35 +0000 (16:22 -0700)

Merge branch 'jc/checkdiff'

* jc/checkdiff:
Fix t4017-diff-retval for white-space from wc
Update sample pre-commit hook to use "diff --check"
diff --check: detect leftover conflict markers
Teach "diff --check" about new blank lines at end
checkdiff: pass diff_options to the callback
check_and_emit_line(): rename and refactor
diff --check: explain why we do not care whether old side is binary

Merge branch 'kb/send-email-fifo'Junio C Hamano Tue, 1 Jul 2008 23:22:29 +0000 (16:22 -0700)

Merge branch 'kb/send-email-fifo'

* kb/send-email-fifo:
git-send-email: Accept fifos as well as files

Merge branch 'tr/send-email-ssl'Junio C Hamano Tue, 1 Jul 2008 23:22:25 +0000 (16:22 -0700)

Merge branch 'tr/send-email-ssl'

* tr/send-email-ssl:
git-send-email: prevent undefined variable warnings if no encryption is set
git-send-email: add support for TLS via Net::SMTP::SSL

Merge branch 'js/maint-clone-insteadof'Junio C Hamano Tue, 1 Jul 2008 23:22:22 +0000 (16:22 -0700)

Merge branch 'js/maint-clone-insteadof'

* js/maint-clone-insteadof:
clone: respect the settings in $HOME/.gitconfig and /etc/gitconfig
clone: respect url.insteadOf setting in global configs

Merge branch 'jc/maint-reset'Junio C Hamano Tue, 1 Jul 2008 23:22:19 +0000 (16:22 -0700)

Merge branch 'jc/maint-reset'

* jc/maint-reset:
Allow "git-reset path" when unambiguous

Merge branch 'jk/maint-fetch-ref-hier'Junio C Hamano Tue, 1 Jul 2008 23:22:14 +0000 (16:22 -0700)

Merge branch 'jk/maint-fetch-ref-hier'

* jk/maint-fetch-ref-hier:
fetch: give a hint to the user when local refs fail to update
fetch: report local storage errors in status table

Merge branch 'dz/apply-again'Junio C Hamano Tue, 1 Jul 2008 23:22:10 +0000 (16:22 -0700)

Merge branch 'dz/apply-again'

* dz/apply-again:
git-apply: handle a patch that touches the same path more than once better

Merge branch 'np/pack-default'Junio C Hamano Tue, 1 Jul 2008 23:22:07 +0000 (16:22 -0700)

Merge branch 'np/pack-default'

* np/pack-default:
pack.indexversion config option now defaults to 2
repack.usedeltabaseoffset config option now defaults to "true"

Merge branch 'jc/dashless' (early part)Junio C Hamano Tue, 1 Jul 2008 22:21:52 +0000 (15:21 -0700)

Merge branch 'jc/dashless' (early part)

* 'jc/dashless' (early part):
Prepare execv_git_cmd() for removal of builtins from the filesystem
git-shell: accept "git foo" form

Merge branch 'nd/dashless'Junio C Hamano Tue, 1 Jul 2008 22:21:40 +0000 (15:21 -0700)

Merge branch 'nd/dashless'

* nd/dashless:
Keep some git-* programs in $(bindir)
Move all dashed-form commands to libexecdir

Only use GIT_CONFIG in "git config", not other programsDaniel Barkalow Mon, 30 Jun 2008 07:37:47 +0000 (03:37 -0400)

Only use GIT_CONFIG in "git config", not other programs

For everything other than using "git config" to read or write a
git-style config file that isn't the current repo's config file,
GIT_CONFIG was actively detrimental. Rather than argue over which
programs are important enough to have work anyway, just fix all of
them at the root.

Also removes GIT_LOCAL_CONFIG, which would only be useful for programs
that do want to use global git-specific config, but not the repo's own
git-specific config, and want to use some other, presumably
git-specific config. Despite being documented, I can't find any sign that
it was ever used.

Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Add another fast-import example, this time for .zip... Johannes Schindelin Mon, 30 Jun 2008 18:50:44 +0000 (19:50 +0100)

Add another fast-import example, this time for .zip files

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

parse-opt: add PARSE_OPT_KEEP_ARGV0 parser option.Pierre Habouzit Mon, 23 Jun 2008 22:31:31 +0000 (00:31 +0200)

parse-opt: add PARSE_OPT_KEEP_ARGV0 parser option.

This way, argv[0] isn't clobbered when parse-options filters argv[].

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

parse-opt: fake short strings for callers to believe in.Pierre Habouzit Mon, 23 Jun 2008 20:55:11 +0000 (22:55 +0200)

parse-opt: fake short strings for callers to believe in.

If we begin to parse -abc and that the parser knew about -a and -b, it
will fake a -c switch for the caller to deal with.

Of course in the case of -acb (supposing -c is not taking an argument) the
caller will have to be especially clever to do the same thing. We could
think about exposing an API to do so if it's really needed, but oh well...

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

parse-opt: do not print errors on unknown options,... Pierre Habouzit Mon, 23 Jun 2008 20:46:36 +0000 (22:46 +0200)

parse-opt: do not print errors on unknown options, return -2 intead.

This way we can catch "unknown" options more easily.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

parse-opt: create parse_options_step.Pierre Habouzit Mon, 23 Jun 2008 20:38:58 +0000 (22:38 +0200)

parse-opt: create parse_options_step.

For now it's unable to stop at unknown options, this commit merely
reorganize some code around.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

parse-opt: Export a non NORETURN usage dumper.Pierre Habouzit Mon, 23 Jun 2008 20:28:04 +0000 (22:28 +0200)

parse-opt: Export a non NORETURN usage dumper.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

parse-opt: have parse_options_{start,end}.Pierre Habouzit Mon, 23 Jun 2008 19:59:37 +0000 (21:59 +0200)

parse-opt: have parse_options_{start,end}.

Make the struct optparse_t public under the better name parse_opt_ctx_t.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint'Junio C Hamano Mon, 30 Jun 2008 07:44:19 +0000 (00:44 -0700)

Merge branch 'maint'

* maint:
doc/rev-parse: clarify reflog vs --until for specifying revisions

Add test results directory to t/.gitignoreBrian Gernhardt Sun, 29 Jun 2008 20:47:56 +0000 (16:47 -0400)

Add test results directory to t/.gitignore

We don't need test results to be committed if we're fixing a test.

Signed-off-by: Brian Gernhardt <benji@silverinsanity.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

fetch: give a hint to the user when local refs fail... Jeff King Fri, 27 Jun 2008 04:01:41 +0000 (00:01 -0400)

fetch: give a hint to the user when local refs fail to update

There are basically two categories of update failures for
local refs:

1. problems outside of git, like disk full, bad
permissions, etc.

2. D/F conflicts on tracking branch ref names

In either case, there should already have been an error
message. In case '1', hopefully enough information has
already been given that the user can fix it. In the case of
'2', we can hint that the user can clean up their tracking
branch area by using 'git remote prune'.

Note that we don't actually know _which_ case we have, so
the user will receive the hint in case 1, as well. In this
case the suggestion won't do any good, but hopefully the
user is smart enough to figure out that it's just a hint.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

doc/rev-parse: clarify reflog vs --until for specifying... Jeff King Mon, 30 Jun 2008 03:27:45 +0000 (23:27 -0400)

doc/rev-parse: clarify reflog vs --until for specifying revisions

The rev-parse manpage introduces the branch@{date} syntax,
and mentions the reflog specifically. However, new users may
not be familiar with the distinction between the reflog and
the commit date, so let's help them out with a "you may be
interested in --until" pointer.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Update draft release notes for 1.6.0Junio C Hamano Sun, 29 Jun 2008 20:34:26 +0000 (13:34 -0700)

Update draft release notes for 1.6.0

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation: don't assume git-sh-setup and git-parse... jrnieder@uchicago.edu Sun, 29 Jun 2008 16:10:20 +0000 (11:10 -0500)

Documentation: don't assume git-sh-setup and git-parse-remote are in PATH

When git-parse-remote and git-sh-setup are not installed in
$(bindir) anymore, the shell script library won't be found on
user's $PATH in general.

Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t9700: skip when Test::More is not availableJunio C Hamano Sun, 29 Jun 2008 20:21:42 +0000 (13:21 -0700)

t9700: skip when Test::More is not available

Signed-off-by: Junio C Hamano <gitster@pobox.com>

clone: respect the settings in $HOME/.gitconfig and... Johannes Schindelin Fri, 27 Jun 2008 12:55:23 +0000 (13:55 +0100)

clone: respect the settings in $HOME/.gitconfig and /etc/gitconfig

After initializing the config in the newly-created repository, we
need to unset GIT_CONFIG so that the global configs are read again.

Noticed by Pieter de Bie.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Fix t4017-diff-retval for white-space from wcBrian Gernhardt Sun, 29 Jun 2008 20:49:06 +0000 (16:49 -0400)

Fix t4017-diff-retval for white-space from wc

Signed-off-by: Brian Gernhardt <benji@silverinsanity.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Make default expiration period of reflog used for stash... Junio C Hamano Sun, 29 Jun 2008 05:24:49 +0000 (22:24 -0700)

Make default expiration period of reflog used for stash infinite

This makes the default expiration period for the reflog that implements
stash infinite.

The original behaviour to autoexpire old stashes can be restored by using
the gc.refs/stash.{reflogexpire,reflogexpireunreachable} configration
variables introduced by the previous commit.

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Per-ref reflog expiry configurationJunio C Hamano Mon, 16 Jun 2008 06:48:46 +0000 (23:48 -0700)

Per-ref reflog expiry configuration

In addition to gc.reflogexpireunreachable and gc.reflogexpire, this lets
you set gc.<pattern>.reflogexpireunreachable and gc.<pattern>.reflogexpire
variables.

When "git reflog expire" expires reflog entry for $ref, the expiry timers
are taken from the first <pattern> that matches $ref (and if there isn't
the global default value is used).

For example, you could:

[gc "refs/stash"]
reflogexpire = never
reflogexpireunreachable = never

[gc "refs/remotes/*"]
reflogexpire = 7 days
reflogexpireunreachable = 3 days

[gc]
reflogexpire = 90 days
reflogexpireunreachable = 30 days

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint'Junio C Hamano Sun, 29 Jun 2008 04:08:35 +0000 (21:08 -0700)

Merge branch 'maint'

* maint:
git-svn: don't sanitize remote names in config
git-svn: avoid filling up the disk with temp files.
git cat-file: Fix memory leak in batch mode
fix git config example syntax
avoid off-by-one error in run_upload_archive

git-svn: don't sanitize remote names in configEric Wong Sun, 29 Jun 2008 03:40:32 +0000 (20:40 -0700)

git-svn: don't sanitize remote names in config

The original sanitization code was just taken from the
remotes2config.sh shell script in contrib.

Credit to Avery Pennarun for noticing this mistake, and Junio
for clarifying the rules for config section names:

Junio C Hamano wrote in <7vfxr23s6m.fsf@gitster.siamese.dyndns.org>:

> In
>
> [foo "bar"] baz = value
>
> foo and baz must be config.c::iskeychar() (and baz must be isalpha()), but
> "bar" can be almost anything.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

show_stats(): fix stats width calculationOlivier Marin Fri, 27 Jun 2008 00:18:48 +0000 (02:18 +0200)

show_stats(): fix stats width calculation

Before this patch, name_width becomes negative or null for width values
less than 15 and name_width values greater than 25 (default: 50). This
leads to output random data.

This patch checks for minimal width and name_width values.

Signed-off-by: Olivier Marin <dkr@freesurf.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation: remove {show,whatchanged}.difftree confi... Olivier Marin Fri, 27 Jun 2008 00:17:55 +0000 (02:17 +0200)

Documentation: remove {show,whatchanged}.difftree config options

This removes, from the documentation and the bash completion script, the
two config options that were introduced by the git-whatchanged.sh script
and lost in the C rewrite. Today, we can use aliases as an alternative.

Signed-off-by: Olivier Marin <dkr@freesurf.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-svn: avoid filling up the disk with temp files.Avery Pennarun Sat, 28 Jun 2008 23:33:56 +0000 (19:33 -0400)

git-svn: avoid filling up the disk with temp files.

Commit ffe256f9bac8a40ff751a9341a5869d98f72c285 ("git-svn: Speed up fetch")
introduced changes that create a temporary file for each object fetched by
svn. These files should be deleted automatically, but perl apparently
doesn't do this until the process exits (or perhaps when its garbage
collector runs).

This means that on a large fetch, especially with lots of branches, we
sometimes fill up /tmp completely, which prevents the next temp file from
being written completely. This is aggravated by the fact that a new temp
file is created for each updated file, even if that update produces a file
identical to one already in git. Thus, it can happen even if there's lots
of disk space to store the finished repository.

We weren't adequately checking for write errors, so this would result in an
invalid file getting committed, which caused git-svn to fail later with an
invalid checksum.

This patch adds a check to syswrite() so similar problems don't lead to
corruption in the future. It also unlink()'s each temp file explicitly
when we're done with it, so the disk doesn't need to fill up.

Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
Tested-by: Björn Steinbrink <B.Steinbrink@gmx.de>
Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git cat-file: Fix memory leak in batch modeBjörn Steinbrink Sun, 29 Jun 2008 01:21:25 +0000 (03:21 +0200)

git cat-file: Fix memory leak in batch mode

When run in batch mode, git cat-file never frees the memory for the blob
contents it is printing. This quickly adds up and causes git-svn to be
hardly usable for imports of large svn repos, because it uses cat-file in
batch mode and cat-file's memory usage easily reaches several hundred MB
without any good reason.

Signed-off-by: Björn Steinbrink <B.Steinbrink@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-send-email: prevent undefined variable warnings... Thomas Rast Thu, 26 Jun 2008 21:03:21 +0000 (23:03 +0200)

git-send-email: prevent undefined variable warnings if no encryption is set

With the previous patch, not configuring any encryption (either on or
off) would leave $smtp_encryption undefined. We simply set it to the
empty string in that case.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

fix git config example syntaxJoey Hess Sat, 28 Jun 2008 20:02:47 +0000 (16:02 -0400)

fix git config example syntax

git-config expects a space, not '=' between option and value.

Also, quote the value since it contains globs, which some shells will not
pass through unchanged, or will abort if the glob doesn't expand.

Signed-off-by: Joey Hess <joey@kitenet.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

avoid off-by-one error in run_upload_archiveJochen Voss Sat, 28 Jun 2008 16:04:24 +0000 (17:04 +0100)

avoid off-by-one error in run_upload_archive

Make sure that buf has enough space to store the trailing \0 of
the command line argument, too.

Signed-off-by: Jochen Voss <voss@seehuhn.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

GIT-VERSION-GEN: do not fail if a 'HEAD' file exists... Lea Wiemann Sat, 28 Jun 2008 17:13:29 +0000 (19:13 +0200)

GIT-VERSION-GEN: do not fail if a 'HEAD' file exists in the working copy

Signed-off-by: Lea Wiemann <LeWiemann@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Allow git-apply to recount the lines in a hunk (AKA... Johannes Schindelin Fri, 27 Jun 2008 17:43:09 +0000 (18:43 +0100)

Allow git-apply to recount the lines in a hunk (AKA recountdiff)

Sometimes, the easiest way to fix up a patch is to edit it directly, even
adding or deleting lines. Now, many people are not as divine as certain
benevolent dictators as to update the hunk headers correctly at the first
try.

So teach the tool to do it for us.

[jc: with tests]

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

commit-tree: lift completely arbitrary limit of 16... Johannes Schindelin Fri, 27 Jun 2008 12:24:47 +0000 (13:24 +0100)

commit-tree: lift completely arbitrary limit of 16 parents

There is no really good reason to have a merge with more than 16
parents, but we have a history of giving our users rope.

Combined with the fact that there was no good reason for that
arbitrary limit in the first place, here is an all-too-easy to fix.

Kind of wished-for by Len Brown.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>