Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On checkout i get the location of the working directory prior to the check out rather then the checked out location #1

Closed
lee-elenbaas opened this issue Feb 18, 2013 · 3 comments

Comments

@lee-elenbaas
Copy link

I tried to use this to generate a single file that contain my current version on the branch as a way to give version information to a website.
I use the $Name$
and i get that when i switch from one branch to another - the file gets filled with the information of the branch i am leaving - instead of the branch i am checking out (i get the wrong tag name and the wrong commit hash)

@mhallak
Copy link

mhallak commented Nov 25, 2014

I have the same problem. How did you solve it? Thanks

@kimmormh
Copy link
Owner

I am unable to reproduce this behavior, however in debugging I ran into something else, which might be what you're getting at:

The problem is that even if your branch tag points to abcdef, the file has not changed.

For example, if you check the current commit with

git describe --always --tag

and then check out the log for a file:

git log file

If a file was not included in the most recent commit, it does not have a log entry for that commit, but instead uses the most recent one found. It does reflect the status of that file properly (And mimics CVS conventions in this way, which is actually what I intended to do).

SOLUTION:

Use $Commit$ instead (That shows that commit hash of the checkout, not the specific file)

@mhallak
Copy link

mhallak commented Nov 25, 2014

Hi
The problem is very well described here:
turon#10
and it seems that there is no solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants