git-gui: fix git-gui crash due to uninitialized variable

Recently, a clone initiated via git gui on Windows crashed on me due to
an "unknown variable cdone". It turns out that there is a code path
where this variable is used uninitialized.

Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
git-gui: Use PWD if it exists on Mac OS X

The current working directory is set to / when git-gui is invoked
using the Git Gui.app bundle on Mac OS X. This means that if it is
launched from a directory which contains a repository then git-gui
won't automatically find it unless the repository happens to be
located in /.

The PWD environment variable is however preserved if the bundle is
invoked using open(1). If git-gui would check for PWD then a user
could for example type open -a 'Git Gui' on a command line in order to
launch the program and it would automatically find the repository.

Teach git-gui to use the PWD environment variable on Mac OS X.

Signed-off-by: Marcus Karlsson <mk@acc.umu.se>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
git-gui: fix a typo in po/ files

"succeeded" was misspelled in the code, which propagated throughout the
 translations.

Fixed all of them.

Signed-off-by: Benjamin Kerensa <bkerensa <at> ubuntu.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
git-gui: open console when using --trace on windows

When starting a gui program on windows stdout, stderr and stdin are not
connected to the cmd console. As a workaround tk has a console window.
Lets open this when the --trace commandline option has been given.
This is helpful for debugging.

Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
git-gui: preserve commit messages in utf-8

The commit message buffer is automatically preserved to a local file
but this uses the system encoding which may fail to properly encode
unicode text. Forcing this file to use utf-8 preserves the message
correctly.

Reported-by: Ángel José Riesgo <ajriesgo@gmail.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
git-gui: de.po: consistently add untranslated hook names within braces

The user might not really know what hook is
actually meant if it's translated. To avoid such
a confusion we should consistently write it untranslated
within braces after.

Signed-off-by: Ralf Thielow <ralf.thielow@googlemail.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
git-gui: de.po: translate "bare" as "bloß"

According to the translation in git-core, we
translate "bare" as "bloß".

Signed-off-by: Ralf Thielow <ralf.thielow@googlemail.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
git-gui: de.po: translate "remote" as "extern"

According to the translation in git-core, we
translate "remote" as "extern".

Signed-off-by: Ralf Thielow <ralf.thielow@googlemail.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Merge branch 'rt/trans'
git-gui: Fix semi-working shortcuts for unstage and revert

Make Ctrl+U for unstaging and Ctrl+J for reverting selection behave
more like Ctrl+T for adding.

They were working only when one area was focused (diff or commit message),
now they should work everywhere.

Acked-by: Bert Wesarg <bert.wesarg@googlemail.com>
Signed-off-by: Vitaly _Vi Shukela <vi0oss@gmail.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
git-gui: Fix a loose/lose mistake

Acked-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Beat Bolli <bbolli@ewanet.ch>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
git-gui: remove .git/CHERRY_PICK_HEAD after committing

Adding _git_ps1() to one's bash prompt displays various repo status
info after each command. After committing a git cherry-pick -n using
git-gui, the prompt still contains the "|CHERRY-PICKING" flag.

Delete the file causing this flag when cleaning up.

Signed-off-by: Beat Bolli <bbolli@ewanet.ch>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
http: fix segfault in handle_curl_result

When we create an http active_request_slot, we can set its
"results" pointer back to local storage. The http code will
fill in the details of how the request went, and we can
access those details even after the slot has been cleaned
up.

Commit 8809703 (http: factor out http error code handling)
switched us from accessing our local results struct directly
to accessing it via the "results" pointer of the slot. That
means we're accessing the slot after it has been marked as
finished, defeating the whole purpose of keeping the results
storage separate.

Most of the time this doesn't matter, as finishing the slot
does not actually clean up the pointer. However, when using
curl's multi interface with the dumb-http revision walker,
we might actually start a new request before handing control
back to the original caller. In that case, we may reuse the
slot, zeroing its results pointer, and leading the original
caller to segfault while looking for its results inside the
slot.

Instead, we need to pass a pointer to our local results
storage to the handle_curl_result function, rather than
relying on the pointer in the slot struct. This matches what
the original code did before the refactoring (which did not
use a separate function, and therefore just accessed the
results struct directly).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
l10n: Update Swedish translation (1964t0f0u)

Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
Merge branch 'jk/maint-http-half-auth-push'

Fixes a regression in maint-1.7.11 (v1.7.11.7), maint (v1.7.12.1)
and master (v1.8.0-rc0).

* jk/maint-http-half-auth-push:
  http: fix segfault in handle_curl_result
Update draft release notes to 1.8.0

We are almost there...

Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/RelNotes: remove "updated up to this revision" markers

These were used to keep track of the last commit a release notes
entry was written for, and should have been removed when cutting
the final release.

Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
l10n: vi.po: update from v1.8.0-rc2-4-g42e55

* translate 3 new messages
* review quotes

Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com>
Merge branch 'master' of git://github.com/vnwildman/git

* 'master' of git://github.com/vnwildman/git:
  l10n: vi.po: update from v1.8.0-rc2-4-g42e55
Merge branch 'master' of https://github.com/nafmo/git-l10n-sv

* 'master' of https://github.com/nafmo/git-l10n-sv:
  l10n: Update Swedish translation (1964t0f0u)