git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Bug in "git show"?
@ 2013-07-15 11:25 Stefan Beller
  2013-07-15 12:12 ` Matthieu Moy
  0 siblings, 1 reply; 43+ messages in thread
From: Stefan Beller @ 2013-07-15 11:25 UTC (permalink / raw)
  To: git

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

so I wanted to write a script using some git commands,
but the output of the git commands is not as expected.
I am using

git --version
git version 1.8.3.2.804.g0da7a53
(current origin/master at git://github.com/gitster/git.git)

The command I am trying to use is
git --no-pager show --format="%ad" <commit>

Expected output:
sb@sb:~/OSS/git$ git show --format="%ad" 0da7a53^
Fri Jul 12 12:04:19 2013 -0700

sb@sb:~/OSS/git$ git show --format="%ad" 0da7a53^^
Fri Jul 12 12:04:17 2013 -0700

sb@sb:~/OSS/git$ git show --format="%ad" 0da7a53^^^
Fri Jul 12 12:04:16 2013 -0700

sb@sb:~/OSS/git$ git show --format="%ad" 0da7a53^^^^
Fri Jul 12 12:04:14 2013 -0700

sb@sb:~/OSS/git$ git show --format="%ad" 0da7a53^^^^^
Fri Jul 12 12:04:12 2013 -0700

sb@sb:~/OSS/git$ git show --format="%ad" 0da7a53^^^^^^
Fri Jul 12 12:04:10 2013 -0700

sb@sb:~/OSS/git$ git show --format="%ad" 0da7a53^^^^^^^
Fri Jul 12 12:04:09 2013 -0700

sb@sb:~/OSS/git$ git show --format="%ad" 0da7a53^^^^^^^^
Fri Jul 12 12:04:07 2013 -0700

However I sometimes also get:
sb@sb:~/OSS/git$ git show --format="%ad" 0da7a53
Fri Jul 12 10:49:34 2013 -0700

diff --git a/Documentation/RelNotes/1.8.4.txt
b/Documentation/RelNotes/1.8.4.txt
index 0e50df8..4250e5a 100644
- --- a/Documentation/RelNotes/1.8.4.txt
+++ b/Documentation/RelNotes/1.8.4.txt
@@ -79,6 +79,13 @@ Foreign interfaces, subsystems and ports.

 UI, Workflows & Features

+ * "gitweb" learned to optionally place extra links that point at the
+   levels higher than the Gitweb pages themselves in the breadcrumbs,
+   so that it can be used as part of a larger installation.
+
+ * "git log --format=" now honors i18n.logoutputencoding configuration
+   variable.
+
  * The "push.default=simple" mode of "git push" has been updated to
    behave like "current" without requiring a remote tracking
    information, when you push to a remote that is different from where


sb@sb:~/OSS/git$ git show --format="%ad" 0da7a53^^^^^^^^
Fri Jul 12 12:04:07 2013 -0700

diff --cc t/t5505-remote.sh
index ee5d65d,8d0f3e3..8f6e392
- --- a/t/t5505-remote.sh
+++ b/t/t5505-remote.sh
@@@ -61,25 -62,25 +61,25 @@@ test_expect_success C_LOCALE_OUTPUT 're
  '

  test_expect_success 'add another remote' '
 -(
 -      cd test &&
 -      git remote add -f second ../two &&
 -      tokens_match "origin second" "$(git remote)" &&
 -      check_tracking_branch second master side another &&
 -      git for-each-ref "--format=%(refname)" refs/remotes |
 -      sed -e "/^refs\/remotes\/origin\//d" \
 -          -e "/^refs\/remotes\/second\//d" >actual &&
 -      >expect &&




So at some commits, also the diff is shown, which should not happen
if you're using --format="%ad" to my understanding.

So far it seems to be deterministic here. (Each commit either always
behaves correctly or incorrectly). Initially I suspected it being
different for merges or no-merges, but I gut the unexpected behavior
for both merge and non-merge commits.

Can somebody confirm this behavior or has any idea, whether I am doing
something wrong here?

Thanks,
Stefan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with undefined - http://www.enigmail.net/

iQIcBAEBAgAGBQJR49xHAAoJEJQCPTzLflhqiFcP/0S5M71urjn1Fh5Cz2950wBl
cs6+r9wKF5366wv3Ombfh0KrOPQCE7Yv1GWk2r2L008BWrz0wgnsl1xnMnAT00dH
1WzmupWExxwXHAueDisq2qL4dubFrnVxKWvpwxBd3JBbsWNXeTGl5o6dl69zaXdx
JHzIHvw1/vrxoCLaflitjcQezuFITOVVoNsYawK12gznjxujONm0sej5TBFUw784
K5KTJNJqxzUf9+Z+88hg2oif7kJlugTIqtH5sRMVwXrkpc12f+HcwROg0srE5ITc
8WpK0s7xgZokUCohMhUXlLAOYJwAZju+K1LExkrQ9T32oP4iAKsJpqcRLAAX6Ig7
OeaWUQ2WX2CfYDExjuV6h+FXAU0qT87iv3PgeZWAnmgDQPUwFboIxuF1Nrpq/FOY
Ioe2YOsFOdhmuDjCHEfu0aVNOeejHS8LEkC1IUI/+PzDlEJC/b17SwEdrD4aVCPj
RZhz2zI8ZxYHP9ITvMDs1VQRP6jMSAwEtAWg7ac7ypETToOIAxRp2j9Rrjayt8A5
/TZ++wMh7G4Tm/D9+iutQnqzE8E8eiT6i7LgAcDSA3g6oq7/hUzupKU2lc+znO2J
wxiwdqYBHWtw1Jc8eaZAJC/NMfxbRzOSCx4lJbO+tpXP0pR/OPIg2f2wUXcAh3zH
JC9GdEUVIwN34j2ueoZ8
=G6Oc
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 43+ messages in thread

end of thread, other threads:[~2013-07-18  0:51 UTC | newest]

Thread overview: 43+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-15 11:25 Bug in "git show"? Stefan Beller
2013-07-15 12:12 ` Matthieu Moy
2013-07-15 12:23   ` Stefan Beller
2013-07-15 13:07   ` [PATCH 0/5] Make "git show -s" easier to discover for users Matthieu Moy
2013-07-15 13:07     ` [PATCH 1/5] diff: allow --no-patch as synonym for -s Matthieu Moy
2013-07-15 13:07     ` [PATCH 2/5] diff: allow --patch to override -s/--no-patch Matthieu Moy
2013-07-15 15:02       ` Junio C Hamano
2013-07-15 15:28         ` Matthieu Moy
2013-07-15 16:40           ` Junio C Hamano
2013-07-15 17:05             ` [PATCH v2 0/5] Make "git show -s" easier to discover for users Matthieu Moy
2013-07-15 17:05               ` [PATCH v2 1/5] diff: allow --no-patch as synonym for -s Matthieu Moy
2013-07-15 17:35                 ` Jonathan Nieder
2013-07-15 17:55                   ` [PATCH v3 0/6] Make "git show -s" easier to discover for users Matthieu Moy
2013-07-15 17:55                     ` [PATCH v3 1/6] t4000-diff-format.sh: modernize style Matthieu Moy
2013-07-15 18:00                       ` Jonathan Nieder
2013-07-15 17:55                     ` [PATCH v3 2/6] diff: allow --no-patch as synonym for -s Matthieu Moy
2013-07-15 17:55                     ` [PATCH v3 3/6] diff: allow --patch & cie to override -s/--no-patch Matthieu Moy
2013-07-15 18:09                       ` Jonathan Nieder
2013-07-15 18:23                         ` Matthieu Moy
2013-07-15 18:58                           ` Jonathan Nieder
2013-07-16  8:05                             ` [PATCH v4 0/6] Make "git show -s" easier to discover for users Matthieu Moy
2013-07-16  8:05                               ` [PATCH v4 1/6] t4000-diff-format.sh: modernize style Matthieu Moy
2013-07-16  8:05                               ` [PATCH v4 2/6] diff: allow --no-patch as synonym for -s Matthieu Moy
2013-07-16  8:05                               ` [PATCH v4 3/6] diff: allow --patch & cie to override -s/--no-patch Matthieu Moy
2013-07-16  8:05                               ` [PATCH v4 4/6] Documentation/git-show.txt: include common diff options, like git-log.txt Matthieu Moy
2013-07-16  8:05                               ` [PATCH v4 5/6] Documentation: move description of -s, --no-patch to diff-options.txt Matthieu Moy
2013-07-16  8:05                               ` [PATCH v4 6/6] Documentation/git-log.txt: capitalize section names Matthieu Moy
2013-07-16 17:46                               ` [PATCH v4 0/6] Make "git show -s" easier to discover for users Jonathan Nieder
2013-07-16 18:07                                 ` Stefan Beller
2013-07-18  0:51                               ` Junio C Hamano
2013-07-15 17:55                     ` [PATCH v3 4/6] Documentation/git-show.txt: include common diff options, like git-log.txt Matthieu Moy
2013-07-15 17:55                     ` [PATCH v3 5/6] Documentation: move description of -s, --no-patch to diff-options.txt Matthieu Moy
2013-07-15 17:55                     ` [PATCH v3 6/6] Documentation/git-log.txt: capitalize section names Matthieu Moy
2013-07-15 18:17                       ` Jonathan Nieder
2013-07-15 17:05               ` [PATCH v2 2/5] diff: allow --patch & cie to override -s/--no-patch Matthieu Moy
2013-07-15 17:05               ` [PATCH v2 3/5] Documentation/git-show.txt: include common diff options, like git-log.txt Matthieu Moy
2013-07-15 17:05               ` [PATCH v2 4/5] Documentation: move description of -s, --no-patch to diff-options.txt Matthieu Moy
2013-07-15 17:05               ` [PATCH v2 5/5] Documentation/git-log.txt: capitalize section names Matthieu Moy
2013-07-15 13:07     ` [PATCH 3/5] Documentation/git-show.txt: include common diff options, like git-log.txt Matthieu Moy
2013-07-15 14:54       ` Junio C Hamano
2013-07-15 15:06         ` Junio C Hamano
2013-07-15 13:07     ` [PATCH 4/5] Documentation: move description of -s, --no-patch to diff-options.txt Matthieu Moy
2013-07-15 13:07     ` [PATCH 5/5] Documentation/git-log.txt: capitalize section names Matthieu Moy

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).